Skip to content

Commit

Permalink
[java-matter-controller] Remove un-used PersistentStorage implementat…
Browse files Browse the repository at this point in the history
…ion (#23865)
  • Loading branch information
yufengwangca authored and pull[bot] committed Jul 8, 2023
1 parent 243606f commit 1049543
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 100 deletions.
3 changes: 0 additions & 3 deletions examples/java-matter-controller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ java_binary("java-matter-controller") {
"java/src/com/matter/controller/commands/pairing/PairingModeType.java",
"java/src/com/matter/controller/commands/pairing/PairingNetworkType.java",
"java/src/com/matter/controller/commands/pairing/UnpairCommand.java",
"java/src/com/matter/controller/config/PersistentStorage.java",
"java/src/com/matter/controller/config/PersistentStorageOpCertStore.java",
"java/src/com/matter/controller/config/PersistentStorageOperationalKeystore.java",
]

javac_flags = [ "-Xlint:deprecation" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,12 @@
package com.matter.controller.commands.common;

import chip.devicecontroller.ChipDeviceController;
import com.matter.controller.config.PersistentStorage;
import com.matter.controller.config.PersistentStorageOpCertStore;
import com.matter.controller.config.PersistentStorageOperationalKeystore;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;

public abstract class MatterCommand extends Command {
private final ChipDeviceController mChipDeviceController;
private final PersistentStorage mDefaultStorage = new PersistentStorage();
private final PersistentStorage mCommissionerStorage = new PersistentStorage();
private final PersistentStorageOperationalKeystore mOperationalKeystore =
new PersistentStorageOperationalKeystore();
private final PersistentStorageOpCertStore mOpCertStore = new PersistentStorageOpCertStore();

private final Optional<CredentialsIssuer> mCredIssuerCmds;
private final StringBuffer mCommissionerName = new StringBuffer();
private final StringBuffer mPaaTrustStorePath = new StringBuffer();
Expand Down Expand Up @@ -104,24 +95,11 @@ public ChipDeviceController currentCommissioner() {
/////////// Command Interface /////////
@Override
public void run() throws Exception {
// TODO: setup chip storage from Java, currently it is using example one from chip-tool
// maybeSetUpStack();
runCommand();
// maybeTearDownStack();
}

protected abstract void runCommand();

private void maybeSetUpStack() throws Exception {
mDefaultStorage.init();
mOperationalKeystore.init(mDefaultStorage);
mOpCertStore.init(mDefaultStorage);
}

private void maybeTearDownStack() {
// ToDo:We need to call DeviceController::Shutdown()
}

public void setTestResult(String result) {
mTestResult = Optional.of(result);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 1049543

Please sign in to comment.