Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +7 −0 Original line number Diff line number Diff line Loading @@ -863,6 +863,13 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { */ 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(); } Loading services/core/java/com/android/server/wm/WindowManagerInternal.java +0 −8 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.wm; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.ClipData; import android.content.res.Configuration; import android.graphics.Rect; import android.graphics.Region; import android.hardware.display.DisplayManagerInternal; Loading Loading @@ -449,11 +448,4 @@ public abstract class WindowManagerInternal { * Return the display Id for given window. */ public abstract int getDisplayIdForWindow(IBinder windowToken); // TODO: use WindowProcessController once go/wm-unified is done. /** * Notifies the window manager that configuration of the process associated with the input pid * changed. */ public abstract void onProcessConfigurationChanged(int pid, Configuration newConfig); } services/core/java/com/android/server/wm/WindowManagerService.java +6 −18 Original line number Diff line number Diff line Loading @@ -735,6 +735,7 @@ public class WindowManagerService extends IWindowManager.Stub final InputManagerService mInputManager; final DisplayManagerInternal mDisplayManagerInternal; final DisplayManager mDisplayManager; final ActivityTaskManagerService mAtmService; // Indicates whether this device supports wide color gamut / HDR rendering private boolean mHasWideColorGamutSupport; Loading Loading @@ -897,11 +898,10 @@ public class WindowManagerService extends IWindowManager.Stub public static WindowManagerService main(final Context context, final InputManagerService im, final boolean showBootMsgs, final boolean onlyCore, WindowManagerPolicy policy, final WindowManagerGlobalLock globalLock) { ActivityTaskManagerService atm) { DisplayThread.getHandler().runWithScissors(() -> sInstance = new WindowManagerService(context, im, showBootMsgs, onlyCore, policy, globalLock), 0); atm), 0); return sInstance; } Loading @@ -923,9 +923,10 @@ public class WindowManagerService extends IWindowManager.Stub private WindowManagerService(Context context, InputManagerService inputManager, boolean showBootMsgs, boolean onlyCore, WindowManagerPolicy policy, WindowManagerGlobalLock globalLock) { ActivityTaskManagerService atm) { installLock(this, INDEX_WINDOW); mGlobalLock = globalLock; mGlobalLock = atm.getGlobalLock(); mAtmService = atm; mContext = context; mAllowBootMessages = showBootMsgs; mOnlyCore = onlyCore; Loading Loading @@ -7281,19 +7282,6 @@ public class WindowManagerService extends IWindowManager.Stub return Display.INVALID_DISPLAY; } } @Override public void onProcessConfigurationChanged(int pid, Configuration newConfig) { synchronized (mGlobalLock) { Configuration currentConfig = mProcessConfigurations.get(pid); if (currentConfig == null) { currentConfig = new Configuration(newConfig); } else { currentConfig.setTo(newConfig); } mProcessConfigurations.put(pid, currentConfig); } } } void registerAppFreezeListener(AppFreezeListener listener) { Loading services/core/java/com/android/server/wm/WindowState.java +4 −2 Original line number Diff line number Diff line Loading @@ -2263,8 +2263,10 @@ 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 int pid = getParentWindow() != null ? getParentWindow().mSession.mPid : mSession.mPid; mTempConfiguration.setTo(mWmService.mProcessConfigurations.get( pid, mWmService.mRoot.getConfiguration())); final Configuration processConfig = mWmService.mAtmService.getGlobalConfigurationForPid(pid); mTempConfiguration.setTo(processConfig == null ? mWmService.mRoot.getConfiguration() : processConfig); return mTempConfiguration; } Loading services/java/com/android/server/SystemServer.java +1 −1 Original line number Diff line number Diff line Loading @@ -926,7 +926,7 @@ public final class SystemServer { ConcurrentUtils.waitForFutureNoInterrupt(mSensorServiceStart, START_SENSOR_SERVICE); mSensorServiceStart = null; wm = WindowManagerService.main(context, inputManager, !mFirstBoot, mOnlyCore, new PhoneWindowManager(), mWindowManagerGlobalLock); new PhoneWindowManager(), mActivityManagerService.mActivityTaskManager); ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PROTO); ServiceManager.addService(Context.INPUT_SERVICE, inputManager, Loading Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +7 −0 Original line number Diff line number Diff line Loading @@ -863,6 +863,13 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { */ 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(); } Loading
services/core/java/com/android/server/wm/WindowManagerInternal.java +0 −8 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.wm; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.ClipData; import android.content.res.Configuration; import android.graphics.Rect; import android.graphics.Region; import android.hardware.display.DisplayManagerInternal; Loading Loading @@ -449,11 +448,4 @@ public abstract class WindowManagerInternal { * Return the display Id for given window. */ public abstract int getDisplayIdForWindow(IBinder windowToken); // TODO: use WindowProcessController once go/wm-unified is done. /** * Notifies the window manager that configuration of the process associated with the input pid * changed. */ public abstract void onProcessConfigurationChanged(int pid, Configuration newConfig); }
services/core/java/com/android/server/wm/WindowManagerService.java +6 −18 Original line number Diff line number Diff line Loading @@ -735,6 +735,7 @@ public class WindowManagerService extends IWindowManager.Stub final InputManagerService mInputManager; final DisplayManagerInternal mDisplayManagerInternal; final DisplayManager mDisplayManager; final ActivityTaskManagerService mAtmService; // Indicates whether this device supports wide color gamut / HDR rendering private boolean mHasWideColorGamutSupport; Loading Loading @@ -897,11 +898,10 @@ public class WindowManagerService extends IWindowManager.Stub public static WindowManagerService main(final Context context, final InputManagerService im, final boolean showBootMsgs, final boolean onlyCore, WindowManagerPolicy policy, final WindowManagerGlobalLock globalLock) { ActivityTaskManagerService atm) { DisplayThread.getHandler().runWithScissors(() -> sInstance = new WindowManagerService(context, im, showBootMsgs, onlyCore, policy, globalLock), 0); atm), 0); return sInstance; } Loading @@ -923,9 +923,10 @@ public class WindowManagerService extends IWindowManager.Stub private WindowManagerService(Context context, InputManagerService inputManager, boolean showBootMsgs, boolean onlyCore, WindowManagerPolicy policy, WindowManagerGlobalLock globalLock) { ActivityTaskManagerService atm) { installLock(this, INDEX_WINDOW); mGlobalLock = globalLock; mGlobalLock = atm.getGlobalLock(); mAtmService = atm; mContext = context; mAllowBootMessages = showBootMsgs; mOnlyCore = onlyCore; Loading Loading @@ -7281,19 +7282,6 @@ public class WindowManagerService extends IWindowManager.Stub return Display.INVALID_DISPLAY; } } @Override public void onProcessConfigurationChanged(int pid, Configuration newConfig) { synchronized (mGlobalLock) { Configuration currentConfig = mProcessConfigurations.get(pid); if (currentConfig == null) { currentConfig = new Configuration(newConfig); } else { currentConfig.setTo(newConfig); } mProcessConfigurations.put(pid, currentConfig); } } } void registerAppFreezeListener(AppFreezeListener listener) { Loading
services/core/java/com/android/server/wm/WindowState.java +4 −2 Original line number Diff line number Diff line Loading @@ -2263,8 +2263,10 @@ 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 int pid = getParentWindow() != null ? getParentWindow().mSession.mPid : mSession.mPid; mTempConfiguration.setTo(mWmService.mProcessConfigurations.get( pid, mWmService.mRoot.getConfiguration())); final Configuration processConfig = mWmService.mAtmService.getGlobalConfigurationForPid(pid); mTempConfiguration.setTo(processConfig == null ? mWmService.mRoot.getConfiguration() : processConfig); return mTempConfiguration; } Loading
services/java/com/android/server/SystemServer.java +1 −1 Original line number Diff line number Diff line Loading @@ -926,7 +926,7 @@ public final class SystemServer { ConcurrentUtils.waitForFutureNoInterrupt(mSensorServiceStart, START_SENSOR_SERVICE); mSensorServiceStart = null; wm = WindowManagerService.main(context, inputManager, !mFirstBoot, mOnlyCore, new PhoneWindowManager(), mWindowManagerGlobalLock); new PhoneWindowManager(), mActivityManagerService.mActivityTaskManager); ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PROTO); ServiceManager.addService(Context.INPUT_SERVICE, inputManager, Loading