diff options
author | David Stevens <stevensd@google.com> | 2015-07-22 18:40:58 -0700 |
---|---|---|
committer | David Stevens <stevensd@google.com> | 2015-07-23 16:42:29 -0700 |
commit | f6ec60dd1e9c49f1350d0beaf042b32f9c66ef5e (patch) | |
tree | 65f6b7fb9fda9df03e4e06c377c831d381433e2c /cmds/pm | |
parent | 62561abddcf84334bb5e25d6ed33dae13f955b9c (diff) |
Add cmd to reset default component enabled setting
Change-Id: Ice5e366643bb5c536b579089dcc98e06c9bb5645
Diffstat (limited to 'cmds/pm')
-rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index 2be44bcecb26..9c34bf865045 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -188,6 +188,10 @@ public final class Pm { return runSetEnabledSetting(PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED); } + if ("default-state".equals(op)) { + return runSetEnabledSetting(PackageManager.COMPONENT_ENABLED_STATE_DEFAULT); + } + if ("hide".equals(op)) { return runSetHiddenSetting(true); } @@ -1907,6 +1911,7 @@ public final class Pm { System.err.println(" pm disable [--user USER_ID] PACKAGE_OR_COMPONENT"); System.err.println(" pm disable-user [--user USER_ID] PACKAGE_OR_COMPONENT"); System.err.println(" pm disable-until-used [--user USER_ID] PACKAGE_OR_COMPONENT"); + System.err.println(" pm default-state [--user USER_ID] PACKAGE_OR_COMPONENT"); System.err.println(" pm hide [--user USER_ID] PACKAGE_OR_COMPONENT"); System.err.println(" pm unhide [--user USER_ID] PACKAGE_OR_COMPONENT"); System.err.println(" pm grant [--user USER_ID] PACKAGE PERMISSION"); @@ -1979,9 +1984,9 @@ public final class Pm { System.err.println(""); System.err.println("pm clear: deletes all data associated with a package."); System.err.println(""); - System.err.println("pm enable, disable, disable-user, disable-until-used: these commands"); - System.err.println(" change the enabled state of a given package or component (written"); - System.err.println(" as \"package/class\")."); + System.err.println("pm enable, disable, disable-user, disable-until-used, default-state:"); + System.err.println(" these commands change the enabled state of a given package or"); + System.err.println(" component (written as \"package/class\")."); System.err.println(""); System.err.println("pm grant, revoke: these commands either grant or revoke permissions"); System.err.println(" to apps. The permissions must be declared as used in the app's"); |