Loading services/core/java/com/android/server/wm/DisplayPolicy.java +1 −0 Original line number Diff line number Diff line Loading @@ -2851,6 +2851,7 @@ public class DisplayPolicy { void release() { mHandler.post(mGestureNavigationSettingsObserver::unregister); mImmersiveModeConfirmation.release(); } @VisibleForTesting Loading services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java +16 −2 Original line number Diff line number Diff line Loading @@ -149,6 +149,11 @@ public class ImmersiveModeConfirmation { } } void release() { mHandler.removeMessages(H.SHOW); mHandler.removeMessages(H.HIDE); } boolean onSettingChanged(int currentUserId) { final boolean changed = loadSetting(currentUserId, mContext); // Remove the window if the setting changes to be confirmed. Loading Loading @@ -204,7 +209,12 @@ public class ImmersiveModeConfirmation { if (mClingWindow != null) { if (DEBUG) Slog.d(TAG, "Hiding immersive mode confirmation"); // We don't care which root display area the window manager is specifying for removal. try { getWindowManager(FEATURE_UNDEFINED).removeView(mClingWindow); } catch (WindowManager.InvalidDisplayException e) { Slog.w(TAG, "Fail to hide the immersive confirmation window because of " + e); return; } mClingWindow = null; } } Loading Loading @@ -432,7 +442,11 @@ public class ImmersiveModeConfirmation { // show the confirmation WindowManager.LayoutParams lp = getClingWindowLayoutParams(); try { getWindowManager(rootDisplayAreaId).addView(mClingWindow, lp); } catch (WindowManager.InvalidDisplayException e) { Slog.w(TAG, "Fail to show the immersive confirmation window because of " + e); } } private final Runnable mConfirm = new Runnable() { Loading Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +1 −0 Original line number Diff line number Diff line Loading @@ -2851,6 +2851,7 @@ public class DisplayPolicy { void release() { mHandler.post(mGestureNavigationSettingsObserver::unregister); mImmersiveModeConfirmation.release(); } @VisibleForTesting Loading
services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java +16 −2 Original line number Diff line number Diff line Loading @@ -149,6 +149,11 @@ public class ImmersiveModeConfirmation { } } void release() { mHandler.removeMessages(H.SHOW); mHandler.removeMessages(H.HIDE); } boolean onSettingChanged(int currentUserId) { final boolean changed = loadSetting(currentUserId, mContext); // Remove the window if the setting changes to be confirmed. Loading Loading @@ -204,7 +209,12 @@ public class ImmersiveModeConfirmation { if (mClingWindow != null) { if (DEBUG) Slog.d(TAG, "Hiding immersive mode confirmation"); // We don't care which root display area the window manager is specifying for removal. try { getWindowManager(FEATURE_UNDEFINED).removeView(mClingWindow); } catch (WindowManager.InvalidDisplayException e) { Slog.w(TAG, "Fail to hide the immersive confirmation window because of " + e); return; } mClingWindow = null; } } Loading Loading @@ -432,7 +442,11 @@ public class ImmersiveModeConfirmation { // show the confirmation WindowManager.LayoutParams lp = getClingWindowLayoutParams(); try { getWindowManager(rootDisplayAreaId).addView(mClingWindow, lp); } catch (WindowManager.InvalidDisplayException e) { Slog.w(TAG, "Fail to show the immersive confirmation window because of " + e); } } private final Runnable mConfirm = new Runnable() { Loading