Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f36f1d74 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove enabled flag use_cached_insets_for_display_switch

Bug: 412619561
Flag: EXEMPT flag removal
Test: atest DisplayPolicyTests#testSwitchDecorInsets
Change-Id: I30ccba73bca3c5f8bb833df10397e7f7f1fca544
parent a08a0293
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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
+5 −10
Original line number Diff line number Diff line
@@ -2338,16 +2338,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);
+1 −4
Original line number Diff line number Diff line
@@ -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 */);