diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-01-22 17:10:23 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-01-22 17:10:23 -0800 |
commit | fd7adedebf88427162a3ce27fcc9cfd3893c869d (patch) | |
tree | d9dfb04e5d0972a6ae7bf92431b0d48925e97b48 /cmds/pm | |
parent | cc7433470f00fac3bbe7835de3ded4b9bf121244 (diff) | |
download | frameworks_base-fd7adedebf88427162a3ce27fcc9cfd3893c869d.zip frameworks_base-fd7adedebf88427162a3ce27fcc9cfd3893c869d.tar.gz frameworks_base-fd7adedebf88427162a3ce27fcc9cfd3893c869d.tar.bz2 |
Add new disabled state for "optional" built-in apps.
The disabled state allows you to make an app disabled
except for whatever parts of the system still want to
provide access to them and automatically enable them
if the user want to use it.
Currently the input method manager service is the only
part of the system that supports this, so you can put
an IME in this state and it will generally look disabled
but still be available in the IME list and once selected
switched to the enabled state.
Change-Id: I77f01c70610d82ce9070d4aabbadec8ae2cff2a3
Diffstat (limited to 'cmds/pm')
-rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index 39539b4..f0e3370 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -135,6 +135,11 @@ public final class Pm { return; } + if ("disable-until-used".equals(op)) { + runSetEnabledSetting(PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED); + return; + } + if ("grant".equals(op)) { runGrantRevokePermission(true); return; @@ -1178,6 +1183,8 @@ public final class Pm { return "disabled"; case PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER: return "disabled-user"; + case PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED: + return "disabled-until-used"; } return "unknown"; } @@ -1459,6 +1466,7 @@ public final class Pm { System.err.println(" pm enable [--user USER_ID] PACKAGE_OR_COMPONENT"); 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 grant PACKAGE PERMISSION"); System.err.println(" pm revoke PACKAGE PERMISSION"); System.err.println(" pm set-install-location [0/auto] [1/internal] [2/external]"); |