Merge "Redraw ScreenDecorations only if rotation changed" into tm-dev am: 890c7579ae

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17799883

Change-Id: I70b30946e48ccfebae1a9b73638700f5429c7d7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Milton Wu
2022-04-19 14:54:02 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 3 deletions

View File

@@ -971,10 +971,10 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
cutoutView.updateRotation(mRotation);
}
}
}
// update all provider views inside overlay
updateOverlayProviderViews();
// update all provider views inside overlay
updateOverlayProviderViews();
}
}
private boolean hasRoundedCorners() {

View File

@@ -63,6 +63,7 @@ import android.util.RotationUtils;
import android.util.Size;
import android.view.Display;
import android.view.DisplayCutout;
import android.view.Surface;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
@@ -974,6 +975,7 @@ public class ScreenDecorationsTest extends SysuiTestCase {
getTestsDrawable(com.android.systemui.tests.R.drawable.rounded4px)
/* roundedBottomDrawable */,
0 /* roundedPadding */, false /* fillCutout */, true /* privacyDot */);
doReturn(Surface.ROTATION_0).when(mDisplay).getRotation();
mScreenDecorations.start();
@@ -987,6 +989,8 @@ public class ScreenDecorationsTest extends SysuiTestCase {
getTestsDrawable(com.android.systemui.tests.R.drawable.rounded5px)
/* roundedBottomDrawable */,
0 /* roundedPadding */, false /* fillCutout */, true /* privacyDot */);
doReturn(Surface.ROTATION_270).when(mDisplay).getRotation();
mScreenDecorations.onConfigurationChanged(null);
assertEquals(new Size(4, 4), resDelegate.getTopRoundedSize());