summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ricky Wai <rickywai@google.com> 2022-01-13 18:29:22 +0000
committer Ricky Wai <rickywai@google.com> 2022-01-13 18:37:58 +0000
commit9d08478274d9dae1ba101a6c486c2adb6eaa0cfd (patch)
tree6ac688c4b82a91b083565437a4630076012f9aa0
parent86f682fd2f988da4baf5fe86d76fede6eb4cd79b (diff)
Do not throw exception if storage app data isolation is not enabled
As the feature is not enabled yet, we should not throw exception and block all tests. We should show error message instead. Bug: 213442885 Test: atest android.os.storage.cts.StorageManagerTest#testCallback Change-Id: I9a46c9ed1aeb59d982ba3841943016bd7a357ac5
-rw-r--r--cmds/sm/src/com/android/commands/sm/Sm.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/sm/src/com/android/commands/sm/Sm.java b/cmds/sm/src/com/android/commands/sm/Sm.java
index 260c8a47ea3c..b384e702ac4e 100644
--- a/cmds/sm/src/com/android/commands/sm/Sm.java
+++ b/cmds/sm/src/com/android/commands/sm/Sm.java
@@ -259,7 +259,8 @@ public final class Sm {
public void runDisableAppDataIsolation() throws RemoteException {
if (!SystemProperties.getBoolean(
ANDROID_VOLD_APP_DATA_ISOLATION_ENABLED_PROPERTY, false)) {
- throw new IllegalStateException("Storage app data isolation is not enabled.");
+ System.err.println("Storage app data isolation is not enabled.");
+ return;
}
final String pkgName = nextArg();
final int pid = Integer.parseInt(nextArg());