Loading api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5457,7 +5457,6 @@ package android.app.admin { method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean); method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean); method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle); method public int setApplicationsHidden(android.content.ComponentName, android.content.Intent, boolean); method public void setBlockUninstall(android.content.ComponentName, java.lang.String, boolean); method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); core/java/android/app/admin/DevicePolicyManager.java +0 −22 Original line number Diff line number Diff line Loading @@ -2977,28 +2977,6 @@ public class DevicePolicyManager { return false; } /** * Called by profile or device owner to hide or unhide currently installed packages. This * should only be called by a profile or device owner running within a managed profile. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param intent An intent matching the app(s) to be updated. All apps that resolve for this * intent will be updated in the current profile. * @param hidden {@code true} if the packages should be hidden, {@code false} if they should * be unhidden. * @return int The number of activities that matched the intent and were updated. */ public int setApplicationsHidden(ComponentName admin, Intent intent, boolean hidden) { if (mService != null) { try { return mService.setApplicationsHidden(admin, intent, hidden); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return 0; } /** * Called by device or profile owner to determine if a package is hidden. * Loading core/java/android/app/admin/IDevicePolicyManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ interface IDevicePolicyManager { List getPermittedInputMethodsForCurrentUser(); boolean setApplicationHidden(in ComponentName admin, in String packageName, boolean hidden); int setApplicationsHidden(in ComponentName admin, in Intent intent, boolean hidden); boolean isApplicationHidden(in ComponentName admin, in String packageName); UserHandle createUser(in ComponentName who, in String name); Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −40 Original line number Diff line number Diff line Loading @@ -4593,46 +4593,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } @Override public int setApplicationsHidden(ComponentName who, Intent intent, boolean hidden) { int callingUserId = UserHandle.getCallingUserId(); synchronized (this) { if (who == null) { throw new NullPointerException("ComponentName is null"); } getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER); long id = Binder.clearCallingIdentity(); try { IPackageManager pm = AppGlobals.getPackageManager(); List<ResolveInfo> activitiesToEnable = pm.queryIntentActivities(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.GET_DISABLED_COMPONENTS | PackageManager.GET_UNINSTALLED_PACKAGES, callingUserId); if (DBG) Slog.d(LOG_TAG, "Enabling activities: " + activitiesToEnable); int numberOfAppsUnhidden = 0; if (activitiesToEnable != null) { for (ResolveInfo info : activitiesToEnable) { if (info.activityInfo != null) { numberOfAppsUnhidden++; pm.setApplicationHiddenSettingAsUser(info.activityInfo.packageName, hidden, callingUserId); } } } return numberOfAppsUnhidden; } catch (RemoteException re) { // shouldn't happen Slog.e(LOG_TAG, "Failed to setApplicationsHiddenSettingsWithIntent", re); } finally { restoreCallingIdentity(id); } return 0; } } @Override public boolean isApplicationHidden(ComponentName who, String packageName) { int callingUserId = UserHandle.getCallingUserId(); Loading Loading
api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -5457,7 +5457,6 @@ package android.app.admin { method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean); method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean); method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle); method public int setApplicationsHidden(android.content.ComponentName, android.content.Intent, boolean); method public void setBlockUninstall(android.content.ComponentName, java.lang.String, boolean); method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean);
core/java/android/app/admin/DevicePolicyManager.java +0 −22 Original line number Diff line number Diff line Loading @@ -2977,28 +2977,6 @@ public class DevicePolicyManager { return false; } /** * Called by profile or device owner to hide or unhide currently installed packages. This * should only be called by a profile or device owner running within a managed profile. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param intent An intent matching the app(s) to be updated. All apps that resolve for this * intent will be updated in the current profile. * @param hidden {@code true} if the packages should be hidden, {@code false} if they should * be unhidden. * @return int The number of activities that matched the intent and were updated. */ public int setApplicationsHidden(ComponentName admin, Intent intent, boolean hidden) { if (mService != null) { try { return mService.setApplicationsHidden(admin, intent, hidden); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return 0; } /** * Called by device or profile owner to determine if a package is hidden. * Loading
core/java/android/app/admin/IDevicePolicyManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ interface IDevicePolicyManager { List getPermittedInputMethodsForCurrentUser(); boolean setApplicationHidden(in ComponentName admin, in String packageName, boolean hidden); int setApplicationsHidden(in ComponentName admin, in Intent intent, boolean hidden); boolean isApplicationHidden(in ComponentName admin, in String packageName); UserHandle createUser(in ComponentName who, in String name); Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −40 Original line number Diff line number Diff line Loading @@ -4593,46 +4593,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } @Override public int setApplicationsHidden(ComponentName who, Intent intent, boolean hidden) { int callingUserId = UserHandle.getCallingUserId(); synchronized (this) { if (who == null) { throw new NullPointerException("ComponentName is null"); } getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER); long id = Binder.clearCallingIdentity(); try { IPackageManager pm = AppGlobals.getPackageManager(); List<ResolveInfo> activitiesToEnable = pm.queryIntentActivities(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.GET_DISABLED_COMPONENTS | PackageManager.GET_UNINSTALLED_PACKAGES, callingUserId); if (DBG) Slog.d(LOG_TAG, "Enabling activities: " + activitiesToEnable); int numberOfAppsUnhidden = 0; if (activitiesToEnable != null) { for (ResolveInfo info : activitiesToEnable) { if (info.activityInfo != null) { numberOfAppsUnhidden++; pm.setApplicationHiddenSettingAsUser(info.activityInfo.packageName, hidden, callingUserId); } } } return numberOfAppsUnhidden; } catch (RemoteException re) { // shouldn't happen Slog.e(LOG_TAG, "Failed to setApplicationsHiddenSettingsWithIntent", re); } finally { restoreCallingIdentity(id); } return 0; } } @Override public boolean isApplicationHidden(ComponentName who, String packageName) { int callingUserId = UserHandle.getCallingUserId(); Loading