Loading core/java/android/window/flags/windowing_frontend.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -40,17 +40,6 @@ flag { } } flag { name: "use_cached_insets_for_display_switch" namespace: "windowing_frontend" description: "Reduce intermediate insets changes for display switch" bug: "266197298" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enforce_edge_to_edge" is_exported: true Loading services/core/java/com/android/server/wm/DisplayPolicy.java +5 −10 Original line number Diff line number Diff line Loading @@ -2332,16 +2332,11 @@ public class DisplayPolicy { mCachedDecorInsets.mPreserveId = DecorInsets.Cache.ID_UPDATING_CONFIG; // Cache the current insets. mCachedDecorInsets.mDecorInsets.setTo(mDecorInsets); if (com.android.window.flags.Flags.useCachedInsetsForDisplaySwitch()) { mCachedDecorInsets.mRegularBarsInsets = DecorInsets.Cache.copyRegularBarInsets( mDisplayContent.mDisplayFrames.mInsetsState); mCachedDecorInsets.mRotation = mDisplayContent.mDisplayFrames.mRotation; mCachedDecorInsets.mPrivacyIndicatorBounds = mDisplayContent.mCurrentPrivacyIndicatorBounds; } else { mCachedDecorInsets.mRegularBarsInsets = null; mCachedDecorInsets.mPrivacyIndicatorBounds = null; } mCachedDecorInsets.mPrivacyIndicatorBounds = mDisplayContent.mCurrentPrivacyIndicatorBounds; // Switch current to previous cache. if (prevCache != null) { mDecorInsets.setTo(prevCache); Loading services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java +1 −4 Original line number Diff line number Diff line Loading @@ -418,10 +418,7 @@ public class DisplayPolicyTests extends WindowTestsBase { currentInsetsState.addSource(prevSource); currentInsetsState = mDisplayContent.getInsetsPolicy().adjustInsetsForWindow( win, currentInsetsState); if (com.android.window.flags.Flags.useCachedInsetsForDisplaySwitch()) { assertEquals(prevInsetsState.peekSource(insetsId), currentInsetsState.peekSource(insetsId)); } assertEquals(prevInsetsState.peekSource(insetsId), currentInsetsState.peekSource(insetsId)); // If screen is not fully turned on, then the cache should be preserved. displayPolicy.screenTurnedOff(false /* acquireSleepToken */); Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -40,17 +40,6 @@ flag { } } flag { name: "use_cached_insets_for_display_switch" namespace: "windowing_frontend" description: "Reduce intermediate insets changes for display switch" bug: "266197298" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enforce_edge_to_edge" is_exported: true Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +5 −10 Original line number Diff line number Diff line Loading @@ -2332,16 +2332,11 @@ public class DisplayPolicy { mCachedDecorInsets.mPreserveId = DecorInsets.Cache.ID_UPDATING_CONFIG; // Cache the current insets. mCachedDecorInsets.mDecorInsets.setTo(mDecorInsets); if (com.android.window.flags.Flags.useCachedInsetsForDisplaySwitch()) { mCachedDecorInsets.mRegularBarsInsets = DecorInsets.Cache.copyRegularBarInsets( mDisplayContent.mDisplayFrames.mInsetsState); mCachedDecorInsets.mRotation = mDisplayContent.mDisplayFrames.mRotation; mCachedDecorInsets.mPrivacyIndicatorBounds = mDisplayContent.mCurrentPrivacyIndicatorBounds; } else { mCachedDecorInsets.mRegularBarsInsets = null; mCachedDecorInsets.mPrivacyIndicatorBounds = null; } mCachedDecorInsets.mPrivacyIndicatorBounds = mDisplayContent.mCurrentPrivacyIndicatorBounds; // Switch current to previous cache. if (prevCache != null) { mDecorInsets.setTo(prevCache); Loading
services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java +1 −4 Original line number Diff line number Diff line Loading @@ -418,10 +418,7 @@ public class DisplayPolicyTests extends WindowTestsBase { currentInsetsState.addSource(prevSource); currentInsetsState = mDisplayContent.getInsetsPolicy().adjustInsetsForWindow( win, currentInsetsState); if (com.android.window.flags.Flags.useCachedInsetsForDisplaySwitch()) { assertEquals(prevInsetsState.peekSource(insetsId), currentInsetsState.peekSource(insetsId)); } assertEquals(prevInsetsState.peekSource(insetsId), currentInsetsState.peekSource(insetsId)); // If screen is not fully turned on, then the cache should be preserved. displayPolicy.screenTurnedOff(false /* acquireSleepToken */); Loading