diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityTaskManagerService.java | 15 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 7 |
2 files changed, 6 insertions, 16 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index 3637ab129c36..bcfcfd8368d7 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -1134,22 +1134,13 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { * Return the global configuration used by the process corresponding to the input pid. This is * usually the global configuration with some overrides specific to that process. */ - Configuration getGlobalConfigurationForCallingPid() { + private Configuration getGlobalConfigurationForCallingPid() { final int pid = Binder.getCallingPid(); - return getGlobalConfigurationForPid(pid); - } - - /** - * Return the global configuration used by the process corresponding to the given pid. - */ - Configuration getGlobalConfigurationForPid(int pid) { if (pid == MY_PID || pid < 0) { return getGlobalConfiguration(); } - synchronized (mGlobalLock) { - final WindowProcessController app = mProcessMap.getProcess(pid); - return app != null ? app.getConfiguration() : getGlobalConfiguration(); - } + final WindowProcessController app = mProcessMap.getProcess(pid); + return app != null ? app.getConfiguration() : getGlobalConfiguration(); } /** diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 6e993b340352..4257d1e0f8fd 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -2835,10 +2835,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // For child windows we want to use the pid for the parent window in case the the child // window was added from another process. final WindowState parentWindow = getParentWindow(); - final int pid = parentWindow != null ? parentWindow.mSession.mPid : mSession.mPid; - final Configuration processConfig = - mWmService.mAtmService.getGlobalConfigurationForPid(pid); - return processConfig; + final Session session = parentWindow != null ? parentWindow.mSession : mSession; + return session.mPid == MY_PID ? mWmService.mRoot.getConfiguration() + : session.mProcess.getConfiguration(); } private Configuration getLastReportedConfiguration() { |