Loading services/core/java/com/android/server/am/ActivityManagerService.java +14 −2 Original line number Diff line number Diff line Loading @@ -768,6 +768,7 @@ public final class ActivityManagerService extends ActivityManagerNative * For example, references to the commonly used services. */ HashMap<String, IBinder> mAppBindArgs; HashMap<String, IBinder> mIsolatedAppBindArgs; /** * Temporary to avoid allocations. Protected by main lock. Loading Loading @@ -2146,7 +2147,17 @@ public final class ActivityManagerService extends ActivityManagerNative * process when the bindApplication() IPC is sent to the process. They're * lazily setup to make sure the services are running when they're asked for. */ private HashMap<String, IBinder> getCommonServicesLocked() { private HashMap<String, IBinder> getCommonServicesLocked(boolean isolated) { // Isolated processes won't get this optimization, so that we don't // violate the rules about which services they have access to. if (isolated) { if (mIsolatedAppBindArgs == null) { mIsolatedAppBindArgs = new HashMap<String, IBinder>(); mIsolatedAppBindArgs.put("package", ServiceManager.getService("package")); } return mIsolatedAppBindArgs; } if (mAppBindArgs == null) { mAppBindArgs = new HashMap<String, IBinder>(); Loading Loading @@ -4911,7 +4922,8 @@ public final class ActivityManagerService extends ActivityManagerNative app.instrumentationArguments, app.instrumentationWatcher, app.instrumentationUiAutomationConnection, testMode, enableOpenGlTrace, isRestrictedBackupMode || !normalMode, app.persistent, new Configuration(mConfiguration), app.compat, getCommonServicesLocked(), new Configuration(mConfiguration), app.compat, getCommonServicesLocked(app.isolated), mCoreSettingsObserver.getCoreSettingsLocked()); updateLruProcessLocked(app, false, null); app.lastRequestedGc = app.lastLowMemory = SystemClock.uptimeMillis(); Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +14 −2 Original line number Diff line number Diff line Loading @@ -768,6 +768,7 @@ public final class ActivityManagerService extends ActivityManagerNative * For example, references to the commonly used services. */ HashMap<String, IBinder> mAppBindArgs; HashMap<String, IBinder> mIsolatedAppBindArgs; /** * Temporary to avoid allocations. Protected by main lock. Loading Loading @@ -2146,7 +2147,17 @@ public final class ActivityManagerService extends ActivityManagerNative * process when the bindApplication() IPC is sent to the process. They're * lazily setup to make sure the services are running when they're asked for. */ private HashMap<String, IBinder> getCommonServicesLocked() { private HashMap<String, IBinder> getCommonServicesLocked(boolean isolated) { // Isolated processes won't get this optimization, so that we don't // violate the rules about which services they have access to. if (isolated) { if (mIsolatedAppBindArgs == null) { mIsolatedAppBindArgs = new HashMap<String, IBinder>(); mIsolatedAppBindArgs.put("package", ServiceManager.getService("package")); } return mIsolatedAppBindArgs; } if (mAppBindArgs == null) { mAppBindArgs = new HashMap<String, IBinder>(); Loading Loading @@ -4911,7 +4922,8 @@ public final class ActivityManagerService extends ActivityManagerNative app.instrumentationArguments, app.instrumentationWatcher, app.instrumentationUiAutomationConnection, testMode, enableOpenGlTrace, isRestrictedBackupMode || !normalMode, app.persistent, new Configuration(mConfiguration), app.compat, getCommonServicesLocked(), new Configuration(mConfiguration), app.compat, getCommonServicesLocked(app.isolated), mCoreSettingsObserver.getCoreSettingsLocked()); updateLruProcessLocked(app, false, null); app.lastRequestedGc = app.lastLowMemory = SystemClock.uptimeMillis(); Loading