Loading services/core/java/com/android/server/wm/DisplayPolicy.java +5 −1 Original line number Diff line number Diff line Loading @@ -2219,6 +2219,7 @@ public class DisplayPolicy { ArrayList<InsetsSource> mPreservedInsets; ArrayList<InsetsSource> mRegularBarsInsets; PrivacyIndicatorBounds mPrivacyIndicatorBounds; int mRotation; Cache(DisplayContent dc) { mDecorInsets = new DecorInsets(dc); Loading Loading @@ -2321,7 +2322,9 @@ public class DisplayPolicy { prevCache = new DecorInsets(mDisplayContent); prevCache.setTo(mCachedDecorInsets.mDecorInsets); privacyIndicatorBounds = mCachedDecorInsets.mPrivacyIndicatorBounds; mCachedDecorInsets.mPreservedInsets = mCachedDecorInsets.mRegularBarsInsets; mCachedDecorInsets.mPreservedInsets = mCachedDecorInsets.mRotation == mDisplayContent.mDisplayFrames.mRotation ? mCachedDecorInsets.mRegularBarsInsets : null; } // Set a special id to preserve it before a real id is available from transition. mCachedDecorInsets.mPreserveId = DecorInsets.Cache.ID_UPDATING_CONFIG; Loading @@ -2330,6 +2333,7 @@ public class DisplayPolicy { 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 { Loading Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +5 −1 Original line number Diff line number Diff line Loading @@ -2219,6 +2219,7 @@ public class DisplayPolicy { ArrayList<InsetsSource> mPreservedInsets; ArrayList<InsetsSource> mRegularBarsInsets; PrivacyIndicatorBounds mPrivacyIndicatorBounds; int mRotation; Cache(DisplayContent dc) { mDecorInsets = new DecorInsets(dc); Loading Loading @@ -2321,7 +2322,9 @@ public class DisplayPolicy { prevCache = new DecorInsets(mDisplayContent); prevCache.setTo(mCachedDecorInsets.mDecorInsets); privacyIndicatorBounds = mCachedDecorInsets.mPrivacyIndicatorBounds; mCachedDecorInsets.mPreservedInsets = mCachedDecorInsets.mRegularBarsInsets; mCachedDecorInsets.mPreservedInsets = mCachedDecorInsets.mRotation == mDisplayContent.mDisplayFrames.mRotation ? mCachedDecorInsets.mRegularBarsInsets : null; } // Set a special id to preserve it before a real id is available from transition. mCachedDecorInsets.mPreserveId = DecorInsets.Cache.ID_UPDATING_CONFIG; Loading @@ -2330,6 +2333,7 @@ public class DisplayPolicy { 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 { Loading