Loading services/core/java/com/android/server/am/ActivityDisplay.java +5 −5 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> + " to displayId=" + mDisplayId + " position=" + position); addStackReferenceIfNeeded(stack); positionChildAt(stack, position); mSupervisor.mService.updateSleepIfNeededLocked(); mSupervisor.mService.mAm.updateSleepIfNeededLocked(); } void removeChild(ActivityStack stack) { Loading @@ -148,7 +148,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> + " from displayId=" + mDisplayId); mStacks.remove(stack); removeStackReferenceIfNeeded(stack); mSupervisor.mService.updateSleepIfNeededLocked(); mSupervisor.mService.mAm.updateSleepIfNeededLocked(); onStackOrderChanged(); } Loading Loading @@ -300,7 +300,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } } final ActivityManagerService service = mSupervisor.mService; final ActivityManagerService service = mSupervisor.mService.mAm; if (!isWindowingModeSupported(windowingMode, service.mSupportsMultiWindow, service.mSupportsSplitScreenMultiWindow, service.mSupportsFreeformWindowManagement, service.mSupportsPictureInPicture, activityType)) { Loading Loading @@ -536,7 +536,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } // Make sure the windowing mode we are trying to use makes sense for what is supported. final ActivityManagerService service = mSupervisor.mService; final ActivityManagerService service = mSupervisor.mService.mAm; boolean supportsMultiWindow = service.mSupportsMultiWindow; boolean supportsSplitScreen = service.mSupportsSplitScreenMultiWindow; boolean supportsFreeform = service.mSupportsFreeformWindowManagement; Loading Loading @@ -714,7 +714,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> boolean shouldSleep() { return (mStacks.isEmpty() || !mAllSleepTokens.isEmpty()) && (mSupervisor.mService.mRunningVoice == null); && (mSupervisor.mService.mAm.mRunningVoice == null); } /** Loading services/core/java/com/android/server/am/ActivityManagerService.java +25 −47 Original line number Diff line number Diff line Loading @@ -615,8 +615,7 @@ public class ActivityManagerService extends IActivityManager.Stub private Installer mInstaller; /** Run all ActivityStacks through this */ final ActivityStackSupervisor mStackSupervisor; final KeyguardController mKeyguardController; ActivityStackSupervisor mStackSupervisor; final InstrumentationReporter mInstrumentationReporter = new InstrumentationReporter(); Loading Loading @@ -734,7 +733,7 @@ public class ActivityManagerService extends IActivityManager.Stub public boolean canShowErrorDialogs() { return mShowDialogs && !mSleeping && !mShuttingDown && !mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY) && !mActivityTaskManager.mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY) && !mUserController.hasUserRestriction(UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS, mUserController.getCurrentUserId()) && !(UserManager.isDeviceInDemoMode(mContext) Loading Loading @@ -1286,16 +1285,6 @@ public class ActivityManagerService extends IActivityManager.Stub */ final AppOpsService mAppOpsService; /** Current sequencing integer of the configuration, for skipping old configurations. */ private int mConfigurationSeq; /** * Temp object used when global and/or display override configuration is updated. It is also * sent to outer world instead of {@link #getGlobalConfiguration} because we don't trust * anyone... */ private Configuration mTempConfig = new Configuration(); /** * Hardware-reported OpenGLES version. */ Loading Loading @@ -2595,8 +2584,8 @@ public class ActivityManagerService extends IActivityManager.Stub public void setActivityTaskManager(ActivityTaskManagerService atm) { synchronized (this) { mActivityTaskManager = atm; mStackSupervisor.setActivityTaskManager(atm); mActivityTaskManager.setActivityManagerService(this); mStackSupervisor = mActivityTaskManager.mStackSupervisor; } } Loading Loading @@ -2845,13 +2834,11 @@ public class ActivityManagerService extends IActivityManager.Stub mHandler = null; mHandlerThread = null; mIntentFirewall = null; mKeyguardController = null; mPermissionReviewRequired = false; mProcessCpuThread = null; mProcessStats = null; mProviderMap = null; mServices = null; mStackSupervisor = null; mSystemThread = null; mUiHandler = injector.getUiHandler(null); mUserController = null; Loading Loading @@ -2938,12 +2925,6 @@ public class ActivityManagerService extends IActivityManager.Stub } mTrackingAssociations = "1".equals(SystemProperties.get("debug.track-associations")); mTempConfig.setToDefaults(); mTempConfig.setLocales(LocaleList.getDefault()); mConfigurationSeq = mTempConfig.seq = 1; mStackSupervisor = createStackSupervisor(); mStackSupervisor.onConfigurationChanged(mTempConfig); mKeyguardController = mStackSupervisor.getKeyguardController(); mCompatModePackages = new CompatModePackages(this, systemDir, mHandler); mIntentFirewall = new IntentFirewall(new IntentFirewallInterface(), mHandler); Loading Loading @@ -2999,12 +2980,6 @@ public class ActivityManagerService extends IActivityManager.Stub } protected ActivityStackSupervisor createStackSupervisor() { final ActivityStackSupervisor supervisor = new ActivityStackSupervisor(this, mHandler.getLooper()); supervisor.initialize(); return supervisor; } public void setSystemServiceManager(SystemServiceManager mgr) { mSystemServiceManager = mgr; } Loading Loading @@ -10963,7 +10938,7 @@ public class ActivityManagerService extends IActivityManager.Stub final long ident = Binder.clearCallingIdentity(); try { if (mUserController.shouldConfirmCredentials(userId)) { if (mKeyguardController.isKeyguardLocked()) { if (mActivityTaskManager.mKeyguardController.isKeyguardLocked()) { // Showing launcher to avoid user entering credential twice. final int currentUserId = mUserController.getCurrentUserId(); startHomeActivityLocked(currentUserId, "notifyLockedProfile"); Loading Loading @@ -19525,8 +19500,8 @@ public class ActivityManagerService extends IActivityManager.Stub /** Update default (global) configuration and notify listeners about changes. */ private int updateGlobalConfigurationLocked(@NonNull Configuration values, boolean initLocale, boolean persistent, int userId, boolean deferResume) { mTempConfig.setTo(getGlobalConfiguration()); final int changes = mTempConfig.updateFrom(values); mActivityTaskManager.mTempConfig.setTo(getGlobalConfiguration()); final int changes = mActivityTaskManager.mTempConfig.updateFrom(values); if (changes == 0) { // Since calling to Activity.setRequestedOrientation leads to freezing the window with // setting WindowManagerService.mWaitingForConfig to true, it is important that we call Loading Loading @@ -19576,34 +19551,34 @@ public class ActivityManagerService extends IActivityManager.Stub locales.get(bestLocaleIndex))); } mConfigurationSeq = Math.max(++mConfigurationSeq, 1); mTempConfig.seq = mConfigurationSeq; mActivityTaskManager.mConfigurationSeq = Math.max(++mActivityTaskManager.mConfigurationSeq, 1); mActivityTaskManager.mTempConfig.seq = mActivityTaskManager.mConfigurationSeq; // Update stored global config and notify everyone about the change. mStackSupervisor.onConfigurationChanged(mTempConfig); mStackSupervisor.onConfigurationChanged(mActivityTaskManager.mTempConfig); Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + mTempConfig); Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + mActivityTaskManager.mTempConfig); // TODO(multi-display): Update UsageEvents#Event to include displayId. mUsageStatsService.reportConfigurationChange(mTempConfig, mUsageStatsService.reportConfigurationChange(mActivityTaskManager.mTempConfig, mUserController.getCurrentUserId()); // TODO: If our config changes, should we auto dismiss any currently showing dialogs? updateShouldShowDialogsLocked(mTempConfig); updateShouldShowDialogsLocked(mActivityTaskManager.mTempConfig); AttributeCache ac = AttributeCache.instance(); if (ac != null) { ac.updateConfiguration(mTempConfig); ac.updateConfiguration(mActivityTaskManager.mTempConfig); } // Make sure all resources in our process are updated right now, so that anyone who is going // to retrieve resource values after we return will be sure to get the new ones. This is // especially important during boot, where the first config change needs to guarantee all // resources have that config before following boot code is executed. mSystemThread.applyConfigurationToResources(mTempConfig); mSystemThread.applyConfigurationToResources(mActivityTaskManager.mTempConfig); // We need another copy of global config because we're scheduling some calls instead of // running them in place. We need to be sure that object we send will be handled unchanged. final Configuration configCopy = new Configuration(mTempConfig); final Configuration configCopy = new Configuration(mActivityTaskManager.mTempConfig); if (persistent && Settings.System.hasInterestingConfigurationChanges(changes)) { Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG); msg.obj = configCopy; Loading Loading @@ -19714,12 +19689,12 @@ public class ActivityManagerService extends IActivityManager.Stub private int performDisplayOverrideConfigUpdate(Configuration values, boolean deferResume, int displayId) { mTempConfig.setTo(mStackSupervisor.getDisplayOverrideConfiguration(displayId)); final int changes = mTempConfig.updateFrom(values); mActivityTaskManager.mTempConfig.setTo(mStackSupervisor.getDisplayOverrideConfiguration(displayId)); final int changes = mActivityTaskManager.mTempConfig.updateFrom(values); if (changes != 0) { Slog.i(TAG, "Override config changes=" + Integer.toHexString(changes) + " " + mTempConfig + " for displayId=" + displayId); mStackSupervisor.setDisplayOverrideConfiguration(mTempConfig, displayId); + mActivityTaskManager.mTempConfig + " for displayId=" + displayId); mStackSupervisor.setDisplayOverrideConfiguration(mActivityTaskManager.mTempConfig, displayId); final boolean isDensityChange = (changes & ActivityInfo.CONFIG_DENSITY) != 0; if (isDensityChange && displayId == DEFAULT_DISPLAY) { Loading @@ -19736,7 +19711,7 @@ public class ActivityManagerService extends IActivityManager.Stub // ensureActivityConfiguration(). if (mWindowManager != null) { final int[] resizedStacks = mWindowManager.setNewDisplayOverrideConfiguration(mTempConfig, displayId); mWindowManager.setNewDisplayOverrideConfiguration(mActivityTaskManager.mTempConfig, displayId); if (resizedStacks != null) { for (int stackId : resizedStacks) { resizeStackWithBoundsFromWindowManager(stackId, deferResume); Loading Loading @@ -21778,7 +21753,8 @@ public class ActivityManagerService extends IActivityManager.Stub } private final ActivityRecord resumedAppLocked() { ActivityRecord act = mStackSupervisor.getResumedActivityLocked(); final ActivityRecord act = mStackSupervisor != null ? mStackSupervisor.getResumedActivityLocked() : null; String pkg; int uid; if (act != null) { Loading Loading @@ -21860,7 +21836,9 @@ public class ActivityManagerService extends IActivityManager.Stub uidRec.reset(); } if (mStackSupervisor != null) { mStackSupervisor.rankTaskLayersIfNeeded(); } mAdjSeq++; mNewNumServiceProcs = 0; services/core/java/com/android/server/am/ActivityMetricsLogger.java +3 −3 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ class ActivityMetricsLogger { } private void checkVisibility(TaskRecord t, ActivityRecord r) { synchronized (mSupervisor.mService) { synchronized (mSupervisor.mService.mGlobalLock) { final WindowingModeTransitionInfo info = mWindowingModeTransitionInfo.get( r.getWindowingMode()); Loading Loading @@ -663,8 +663,8 @@ class ActivityMetricsLogger { private ProcessRecord findProcessForActivity(ActivityRecord launchedActivity) { return launchedActivity != null ? mSupervisor.mService.mProcessNames.get(launchedActivity.processName, launchedActivity.appInfo.uid) ? mSupervisor.mService.mAm.mProcessNames.get( launchedActivity.processName, launchedActivity.appInfo.uid) : null; } Loading services/core/java/com/android/server/am/ActivityRecord.java +4 −4 Original line number Diff line number Diff line Loading @@ -1098,7 +1098,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo return true; } // Allow the recents component to launch the home activity. final RecentTasks recentTasks = mStackSupervisor.mService.mActivityTaskManager.getRecentTasks(); final RecentTasks recentTasks = mStackSupervisor.mService.getRecentTasks(); if (recentTasks != null && recentTasks.isCallerRecents(uid)) { return true; } Loading Loading @@ -2930,16 +2930,16 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo throw new XmlPullParserException("restoreActivity error intent=" + intent); } final ActivityManagerService service = stackSupervisor.mService; final ActivityTaskManagerService service = stackSupervisor.mService; final ActivityInfo aInfo = stackSupervisor.resolveActivity(intent, resolvedType, 0, null, userId, Binder.getCallingUid()); if (aInfo == null) { throw new XmlPullParserException("restoreActivity resolver error. Intent=" + intent + " resolvedType=" + resolvedType); } final ActivityRecord r = new ActivityRecord(service.mActivityTaskManager, null /* caller */, final ActivityRecord r = new ActivityRecord(service, null /* caller */, 0 /* launchedFromPid */, launchedFromUid, launchedFromPackage, intent, resolvedType, aInfo, service.getConfiguration(), null /* resultTo */, null /* resultWho */, aInfo, service.mAm.getConfiguration(), null /* resultTo */, null /* resultWho */, 0 /* reqCode */, componentSpecified, false /* rootVoiceInteraction */, stackSupervisor, null /* options */, null /* sourceRecord */); Loading services/core/java/com/android/server/am/ActivityStack.java +1 −1 Original line number Diff line number Diff line Loading @@ -453,7 +453,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai ActivityStack(ActivityDisplay display, int stackId, ActivityStackSupervisor supervisor, int windowingMode, int activityType, boolean onTop) { mStackSupervisor = supervisor; mService = supervisor.mService.mActivityTaskManager; mService = supervisor.mService; mHandler = new ActivityStackHandler(supervisor.mLooper); mWindowManager = mService.mWindowManager; mStackId = stackId; Loading Loading
services/core/java/com/android/server/am/ActivityDisplay.java +5 −5 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> + " to displayId=" + mDisplayId + " position=" + position); addStackReferenceIfNeeded(stack); positionChildAt(stack, position); mSupervisor.mService.updateSleepIfNeededLocked(); mSupervisor.mService.mAm.updateSleepIfNeededLocked(); } void removeChild(ActivityStack stack) { Loading @@ -148,7 +148,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> + " from displayId=" + mDisplayId); mStacks.remove(stack); removeStackReferenceIfNeeded(stack); mSupervisor.mService.updateSleepIfNeededLocked(); mSupervisor.mService.mAm.updateSleepIfNeededLocked(); onStackOrderChanged(); } Loading Loading @@ -300,7 +300,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } } final ActivityManagerService service = mSupervisor.mService; final ActivityManagerService service = mSupervisor.mService.mAm; if (!isWindowingModeSupported(windowingMode, service.mSupportsMultiWindow, service.mSupportsSplitScreenMultiWindow, service.mSupportsFreeformWindowManagement, service.mSupportsPictureInPicture, activityType)) { Loading Loading @@ -536,7 +536,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } // Make sure the windowing mode we are trying to use makes sense for what is supported. final ActivityManagerService service = mSupervisor.mService; final ActivityManagerService service = mSupervisor.mService.mAm; boolean supportsMultiWindow = service.mSupportsMultiWindow; boolean supportsSplitScreen = service.mSupportsSplitScreenMultiWindow; boolean supportsFreeform = service.mSupportsFreeformWindowManagement; Loading Loading @@ -714,7 +714,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> boolean shouldSleep() { return (mStacks.isEmpty() || !mAllSleepTokens.isEmpty()) && (mSupervisor.mService.mRunningVoice == null); && (mSupervisor.mService.mAm.mRunningVoice == null); } /** Loading
services/core/java/com/android/server/am/ActivityManagerService.java +25 −47 Original line number Diff line number Diff line Loading @@ -615,8 +615,7 @@ public class ActivityManagerService extends IActivityManager.Stub private Installer mInstaller; /** Run all ActivityStacks through this */ final ActivityStackSupervisor mStackSupervisor; final KeyguardController mKeyguardController; ActivityStackSupervisor mStackSupervisor; final InstrumentationReporter mInstrumentationReporter = new InstrumentationReporter(); Loading Loading @@ -734,7 +733,7 @@ public class ActivityManagerService extends IActivityManager.Stub public boolean canShowErrorDialogs() { return mShowDialogs && !mSleeping && !mShuttingDown && !mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY) && !mActivityTaskManager.mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY) && !mUserController.hasUserRestriction(UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS, mUserController.getCurrentUserId()) && !(UserManager.isDeviceInDemoMode(mContext) Loading Loading @@ -1286,16 +1285,6 @@ public class ActivityManagerService extends IActivityManager.Stub */ final AppOpsService mAppOpsService; /** Current sequencing integer of the configuration, for skipping old configurations. */ private int mConfigurationSeq; /** * Temp object used when global and/or display override configuration is updated. It is also * sent to outer world instead of {@link #getGlobalConfiguration} because we don't trust * anyone... */ private Configuration mTempConfig = new Configuration(); /** * Hardware-reported OpenGLES version. */ Loading Loading @@ -2595,8 +2584,8 @@ public class ActivityManagerService extends IActivityManager.Stub public void setActivityTaskManager(ActivityTaskManagerService atm) { synchronized (this) { mActivityTaskManager = atm; mStackSupervisor.setActivityTaskManager(atm); mActivityTaskManager.setActivityManagerService(this); mStackSupervisor = mActivityTaskManager.mStackSupervisor; } } Loading Loading @@ -2845,13 +2834,11 @@ public class ActivityManagerService extends IActivityManager.Stub mHandler = null; mHandlerThread = null; mIntentFirewall = null; mKeyguardController = null; mPermissionReviewRequired = false; mProcessCpuThread = null; mProcessStats = null; mProviderMap = null; mServices = null; mStackSupervisor = null; mSystemThread = null; mUiHandler = injector.getUiHandler(null); mUserController = null; Loading Loading @@ -2938,12 +2925,6 @@ public class ActivityManagerService extends IActivityManager.Stub } mTrackingAssociations = "1".equals(SystemProperties.get("debug.track-associations")); mTempConfig.setToDefaults(); mTempConfig.setLocales(LocaleList.getDefault()); mConfigurationSeq = mTempConfig.seq = 1; mStackSupervisor = createStackSupervisor(); mStackSupervisor.onConfigurationChanged(mTempConfig); mKeyguardController = mStackSupervisor.getKeyguardController(); mCompatModePackages = new CompatModePackages(this, systemDir, mHandler); mIntentFirewall = new IntentFirewall(new IntentFirewallInterface(), mHandler); Loading Loading @@ -2999,12 +2980,6 @@ public class ActivityManagerService extends IActivityManager.Stub } protected ActivityStackSupervisor createStackSupervisor() { final ActivityStackSupervisor supervisor = new ActivityStackSupervisor(this, mHandler.getLooper()); supervisor.initialize(); return supervisor; } public void setSystemServiceManager(SystemServiceManager mgr) { mSystemServiceManager = mgr; } Loading Loading @@ -10963,7 +10938,7 @@ public class ActivityManagerService extends IActivityManager.Stub final long ident = Binder.clearCallingIdentity(); try { if (mUserController.shouldConfirmCredentials(userId)) { if (mKeyguardController.isKeyguardLocked()) { if (mActivityTaskManager.mKeyguardController.isKeyguardLocked()) { // Showing launcher to avoid user entering credential twice. final int currentUserId = mUserController.getCurrentUserId(); startHomeActivityLocked(currentUserId, "notifyLockedProfile"); Loading Loading @@ -19525,8 +19500,8 @@ public class ActivityManagerService extends IActivityManager.Stub /** Update default (global) configuration and notify listeners about changes. */ private int updateGlobalConfigurationLocked(@NonNull Configuration values, boolean initLocale, boolean persistent, int userId, boolean deferResume) { mTempConfig.setTo(getGlobalConfiguration()); final int changes = mTempConfig.updateFrom(values); mActivityTaskManager.mTempConfig.setTo(getGlobalConfiguration()); final int changes = mActivityTaskManager.mTempConfig.updateFrom(values); if (changes == 0) { // Since calling to Activity.setRequestedOrientation leads to freezing the window with // setting WindowManagerService.mWaitingForConfig to true, it is important that we call Loading Loading @@ -19576,34 +19551,34 @@ public class ActivityManagerService extends IActivityManager.Stub locales.get(bestLocaleIndex))); } mConfigurationSeq = Math.max(++mConfigurationSeq, 1); mTempConfig.seq = mConfigurationSeq; mActivityTaskManager.mConfigurationSeq = Math.max(++mActivityTaskManager.mConfigurationSeq, 1); mActivityTaskManager.mTempConfig.seq = mActivityTaskManager.mConfigurationSeq; // Update stored global config and notify everyone about the change. mStackSupervisor.onConfigurationChanged(mTempConfig); mStackSupervisor.onConfigurationChanged(mActivityTaskManager.mTempConfig); Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + mTempConfig); Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + mActivityTaskManager.mTempConfig); // TODO(multi-display): Update UsageEvents#Event to include displayId. mUsageStatsService.reportConfigurationChange(mTempConfig, mUsageStatsService.reportConfigurationChange(mActivityTaskManager.mTempConfig, mUserController.getCurrentUserId()); // TODO: If our config changes, should we auto dismiss any currently showing dialogs? updateShouldShowDialogsLocked(mTempConfig); updateShouldShowDialogsLocked(mActivityTaskManager.mTempConfig); AttributeCache ac = AttributeCache.instance(); if (ac != null) { ac.updateConfiguration(mTempConfig); ac.updateConfiguration(mActivityTaskManager.mTempConfig); } // Make sure all resources in our process are updated right now, so that anyone who is going // to retrieve resource values after we return will be sure to get the new ones. This is // especially important during boot, where the first config change needs to guarantee all // resources have that config before following boot code is executed. mSystemThread.applyConfigurationToResources(mTempConfig); mSystemThread.applyConfigurationToResources(mActivityTaskManager.mTempConfig); // We need another copy of global config because we're scheduling some calls instead of // running them in place. We need to be sure that object we send will be handled unchanged. final Configuration configCopy = new Configuration(mTempConfig); final Configuration configCopy = new Configuration(mActivityTaskManager.mTempConfig); if (persistent && Settings.System.hasInterestingConfigurationChanges(changes)) { Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG); msg.obj = configCopy; Loading Loading @@ -19714,12 +19689,12 @@ public class ActivityManagerService extends IActivityManager.Stub private int performDisplayOverrideConfigUpdate(Configuration values, boolean deferResume, int displayId) { mTempConfig.setTo(mStackSupervisor.getDisplayOverrideConfiguration(displayId)); final int changes = mTempConfig.updateFrom(values); mActivityTaskManager.mTempConfig.setTo(mStackSupervisor.getDisplayOverrideConfiguration(displayId)); final int changes = mActivityTaskManager.mTempConfig.updateFrom(values); if (changes != 0) { Slog.i(TAG, "Override config changes=" + Integer.toHexString(changes) + " " + mTempConfig + " for displayId=" + displayId); mStackSupervisor.setDisplayOverrideConfiguration(mTempConfig, displayId); + mActivityTaskManager.mTempConfig + " for displayId=" + displayId); mStackSupervisor.setDisplayOverrideConfiguration(mActivityTaskManager.mTempConfig, displayId); final boolean isDensityChange = (changes & ActivityInfo.CONFIG_DENSITY) != 0; if (isDensityChange && displayId == DEFAULT_DISPLAY) { Loading @@ -19736,7 +19711,7 @@ public class ActivityManagerService extends IActivityManager.Stub // ensureActivityConfiguration(). if (mWindowManager != null) { final int[] resizedStacks = mWindowManager.setNewDisplayOverrideConfiguration(mTempConfig, displayId); mWindowManager.setNewDisplayOverrideConfiguration(mActivityTaskManager.mTempConfig, displayId); if (resizedStacks != null) { for (int stackId : resizedStacks) { resizeStackWithBoundsFromWindowManager(stackId, deferResume); Loading Loading @@ -21778,7 +21753,8 @@ public class ActivityManagerService extends IActivityManager.Stub } private final ActivityRecord resumedAppLocked() { ActivityRecord act = mStackSupervisor.getResumedActivityLocked(); final ActivityRecord act = mStackSupervisor != null ? mStackSupervisor.getResumedActivityLocked() : null; String pkg; int uid; if (act != null) { Loading Loading @@ -21860,7 +21836,9 @@ public class ActivityManagerService extends IActivityManager.Stub uidRec.reset(); } if (mStackSupervisor != null) { mStackSupervisor.rankTaskLayersIfNeeded(); } mAdjSeq++; mNewNumServiceProcs = 0;
services/core/java/com/android/server/am/ActivityMetricsLogger.java +3 −3 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ class ActivityMetricsLogger { } private void checkVisibility(TaskRecord t, ActivityRecord r) { synchronized (mSupervisor.mService) { synchronized (mSupervisor.mService.mGlobalLock) { final WindowingModeTransitionInfo info = mWindowingModeTransitionInfo.get( r.getWindowingMode()); Loading Loading @@ -663,8 +663,8 @@ class ActivityMetricsLogger { private ProcessRecord findProcessForActivity(ActivityRecord launchedActivity) { return launchedActivity != null ? mSupervisor.mService.mProcessNames.get(launchedActivity.processName, launchedActivity.appInfo.uid) ? mSupervisor.mService.mAm.mProcessNames.get( launchedActivity.processName, launchedActivity.appInfo.uid) : null; } Loading
services/core/java/com/android/server/am/ActivityRecord.java +4 −4 Original line number Diff line number Diff line Loading @@ -1098,7 +1098,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo return true; } // Allow the recents component to launch the home activity. final RecentTasks recentTasks = mStackSupervisor.mService.mActivityTaskManager.getRecentTasks(); final RecentTasks recentTasks = mStackSupervisor.mService.getRecentTasks(); if (recentTasks != null && recentTasks.isCallerRecents(uid)) { return true; } Loading Loading @@ -2930,16 +2930,16 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo throw new XmlPullParserException("restoreActivity error intent=" + intent); } final ActivityManagerService service = stackSupervisor.mService; final ActivityTaskManagerService service = stackSupervisor.mService; final ActivityInfo aInfo = stackSupervisor.resolveActivity(intent, resolvedType, 0, null, userId, Binder.getCallingUid()); if (aInfo == null) { throw new XmlPullParserException("restoreActivity resolver error. Intent=" + intent + " resolvedType=" + resolvedType); } final ActivityRecord r = new ActivityRecord(service.mActivityTaskManager, null /* caller */, final ActivityRecord r = new ActivityRecord(service, null /* caller */, 0 /* launchedFromPid */, launchedFromUid, launchedFromPackage, intent, resolvedType, aInfo, service.getConfiguration(), null /* resultTo */, null /* resultWho */, aInfo, service.mAm.getConfiguration(), null /* resultTo */, null /* resultWho */, 0 /* reqCode */, componentSpecified, false /* rootVoiceInteraction */, stackSupervisor, null /* options */, null /* sourceRecord */); Loading
services/core/java/com/android/server/am/ActivityStack.java +1 −1 Original line number Diff line number Diff line Loading @@ -453,7 +453,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai ActivityStack(ActivityDisplay display, int stackId, ActivityStackSupervisor supervisor, int windowingMode, int activityType, boolean onTop) { mStackSupervisor = supervisor; mService = supervisor.mService.mActivityTaskManager; mService = supervisor.mService; mHandler = new ActivityStackHandler(supervisor.mLooper); mWindowManager = mService.mWindowManager; mStackId = stackId; Loading