Loading cmds/pm/src/com/android/commands/pm/Pm.java +2 −1 Original line number Diff line number Diff line Loading @@ -1218,7 +1218,8 @@ public final class Pm { ComponentName cn = ComponentName.unflattenFromString(pkg); if (cn == null) { try { mPm.setApplicationEnabledSetting(pkg, state, 0, userId); mPm.setApplicationEnabledSetting(pkg, state, 0, userId, "shell:" + android.os.Process.myUid()); System.err.println("Package " + pkg + " new state: " + enabledSettingToString( mPm.getApplicationEnabledSetting(pkg, userId))); Loading core/java/android/app/ApplicationPackageManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -1279,7 +1279,8 @@ final class ApplicationPackageManager extends PackageManager { public void setApplicationEnabledSetting(String packageName, int newState, int flags) { try { mPM.setApplicationEnabledSetting(packageName, newState, flags, mContext.getUserId()); mPM.setApplicationEnabledSetting(packageName, newState, flags, mContext.getUserId(), mContext.getBasePackageName()); } catch (RemoteException e) { // Should never happen! } Loading core/java/android/content/pm/IPackageManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,8 @@ interface IPackageManager { /** * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}. */ void setApplicationEnabledSetting(in String packageName, in int newState, int flags, int userId); void setApplicationEnabledSetting(in String packageName, in int newState, int flags, int userId, String callingPackage); /** * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}. Loading core/java/android/content/pm/PackageUserState.java +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ public class PackageUserState { public boolean installed; public int enabled; public String lastDisableAppCaller; public HashSet<String> disabledComponents; public HashSet<String> enabledComponents; Loading @@ -43,6 +45,7 @@ public class PackageUserState { stopped = o.stopped; notLaunched = o.notLaunched; enabled = o.enabled; lastDisableAppCaller = o.lastDisableAppCaller; disabledComponents = o.disabledComponents != null ? new HashSet<String>(o.disabledComponents) : null; enabledComponents = o.enabledComponents != null Loading services/java/com/android/server/DevicePolicyManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -2443,7 +2443,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED) { ipm.setApplicationEnabledSetting(packageName, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, PackageManager.DONT_KILL_APP, userId); PackageManager.DONT_KILL_APP, userId, "DevicePolicyManager"); } } catch (RemoteException e) { } Loading Loading
cmds/pm/src/com/android/commands/pm/Pm.java +2 −1 Original line number Diff line number Diff line Loading @@ -1218,7 +1218,8 @@ public final class Pm { ComponentName cn = ComponentName.unflattenFromString(pkg); if (cn == null) { try { mPm.setApplicationEnabledSetting(pkg, state, 0, userId); mPm.setApplicationEnabledSetting(pkg, state, 0, userId, "shell:" + android.os.Process.myUid()); System.err.println("Package " + pkg + " new state: " + enabledSettingToString( mPm.getApplicationEnabledSetting(pkg, userId))); Loading
core/java/android/app/ApplicationPackageManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -1279,7 +1279,8 @@ final class ApplicationPackageManager extends PackageManager { public void setApplicationEnabledSetting(String packageName, int newState, int flags) { try { mPM.setApplicationEnabledSetting(packageName, newState, flags, mContext.getUserId()); mPM.setApplicationEnabledSetting(packageName, newState, flags, mContext.getUserId(), mContext.getBasePackageName()); } catch (RemoteException e) { // Should never happen! } Loading
core/java/android/content/pm/IPackageManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,8 @@ interface IPackageManager { /** * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}. */ void setApplicationEnabledSetting(in String packageName, in int newState, int flags, int userId); void setApplicationEnabledSetting(in String packageName, in int newState, int flags, int userId, String callingPackage); /** * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}. Loading
core/java/android/content/pm/PackageUserState.java +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ public class PackageUserState { public boolean installed; public int enabled; public String lastDisableAppCaller; public HashSet<String> disabledComponents; public HashSet<String> enabledComponents; Loading @@ -43,6 +45,7 @@ public class PackageUserState { stopped = o.stopped; notLaunched = o.notLaunched; enabled = o.enabled; lastDisableAppCaller = o.lastDisableAppCaller; disabledComponents = o.disabledComponents != null ? new HashSet<String>(o.disabledComponents) : null; enabledComponents = o.enabledComponents != null Loading
services/java/com/android/server/DevicePolicyManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -2443,7 +2443,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED) { ipm.setApplicationEnabledSetting(packageName, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, PackageManager.DONT_KILL_APP, userId); PackageManager.DONT_KILL_APP, userId, "DevicePolicyManager"); } } catch (RemoteException e) { } Loading