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 eb618ef13f6c..24c228e88c1c 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -1137,22 +1137,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 0e1641a0edbd..90f5b62b4a08 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -2838,10 +2838,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() {  |