From e5bcff624fb58b6f95be8ddff7f5b6b3bf5d19c7 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Sat, 19 Jul 2014 15:44:09 -0700 Subject: Rename setApplicationBlocked to setApplicationHidden This corrects the expected behavior of the app state. Hidden apps can be installed by the store to be brought out of hidden state. Bug: 16191518 Change-Id: Id128ce971ceee99ba1dea14ba07ce03bd8d77335 --- cmds/pm/src/com/android/commands/pm/Pm.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'cmds/pm') diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index d6c17ae..faf5622 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -197,13 +197,13 @@ public final class Pm { return; } - if ("block".equals(op)) { - runSetBlockedSetting(true); + if ("hide".equals(op)) { + runSetHiddenSetting(true); return; } - if ("unblock".equals(op)) { - runSetBlockedSetting(false); + if ("unhide".equals(op)) { + runSetHiddenSetting(false); return; } @@ -1471,7 +1471,7 @@ public final class Pm { } } - private void runSetBlockedSetting(boolean state) { + private void runSetHiddenSetting(boolean state) { int userId = 0; String option = nextOption(); if (option != null && option.equals("--user")) { @@ -1492,9 +1492,9 @@ public final class Pm { return; } try { - mPm.setApplicationBlockedSettingAsUser(pkg, state, userId); - System.err.println("Package " + pkg + " new blocked state: " - + mPm.getApplicationBlockedSettingAsUser(pkg, userId)); + mPm.setApplicationHiddenSettingAsUser(pkg, state, userId); + System.err.println("Package " + pkg + " new hidden state: " + + mPm.getApplicationHiddenSettingAsUser(pkg, userId)); } catch (RemoteException e) { System.err.println(e.toString()); System.err.println(PM_NOT_RUNNING_ERR); @@ -1751,8 +1751,8 @@ 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 block [--user USER_ID] PACKAGE_OR_COMPONENT"); - System.err.println(" pm unblock [--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 PACKAGE PERMISSION"); System.err.println(" pm revoke PACKAGE PERMISSION"); System.err.println(" pm set-install-location [0/auto] [1/internal] [2/external]"); -- cgit v1.1