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
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index b4cc252..33ecc4d 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -1428,7 +1428,7 @@
         removeRestrictionsForUser(userHandle, true);
     }
 
-    private void removeRestrictionsForUser(final int userHandle, boolean unblockApps) {
+    private void removeRestrictionsForUser(final int userHandle, boolean unhideApps) {
         synchronized (mPackagesLock) {
             // Remove all user restrictions
             setUserRestrictions(new Bundle(), userHandle);
@@ -1437,12 +1437,12 @@
             // Remove any app restrictions
             cleanAppRestrictions(userHandle);
         }
-        if (unblockApps) {
-            unblockAllAppsForUser(userHandle);
+        if (unhideApps) {
+            unhideAllInstalledAppsForUser(userHandle);
         }
     }
 
-    private void unblockAllAppsForUser(final int userHandle) {
+    private void unhideAllInstalledAppsForUser(final int userHandle) {
         mHandler.post(new Runnable() {
             @Override
             public void run() {
@@ -1453,8 +1453,8 @@
                 try {
                     for (ApplicationInfo appInfo : apps) {
                         if ((appInfo.flags & ApplicationInfo.FLAG_INSTALLED) != 0
-                                && (appInfo.flags & ApplicationInfo.FLAG_BLOCKED) != 0) {
-                            mPm.setApplicationBlockedSettingAsUser(appInfo.packageName, false,
+                                && (appInfo.flags & ApplicationInfo.FLAG_HIDDEN) != 0) {
+                            mPm.setApplicationHiddenSettingAsUser(appInfo.packageName, false,
                                     userHandle);
                         }
                     }