Merge "Redraw ScreenDecorations only if rotation changed" into tm-dev
This commit is contained in:
@@ -971,10 +971,10 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
|
|||||||
cutoutView.updateRotation(mRotation);
|
cutoutView.updateRotation(mRotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// update all provider views inside overlay
|
// update all provider views inside overlay
|
||||||
updateOverlayProviderViews();
|
updateOverlayProviderViews();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasRoundedCorners() {
|
private boolean hasRoundedCorners() {
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ import android.util.RotationUtils;
|
|||||||
import android.util.Size;
|
import android.util.Size;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.DisplayCutout;
|
import android.view.DisplayCutout;
|
||||||
|
import android.view.Surface;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
@@ -974,6 +975,7 @@ public class ScreenDecorationsTest extends SysuiTestCase {
|
|||||||
getTestsDrawable(com.android.systemui.tests.R.drawable.rounded4px)
|
getTestsDrawable(com.android.systemui.tests.R.drawable.rounded4px)
|
||||||
/* roundedBottomDrawable */,
|
/* roundedBottomDrawable */,
|
||||||
0 /* roundedPadding */, false /* fillCutout */, true /* privacyDot */);
|
0 /* roundedPadding */, false /* fillCutout */, true /* privacyDot */);
|
||||||
|
doReturn(Surface.ROTATION_0).when(mDisplay).getRotation();
|
||||||
|
|
||||||
mScreenDecorations.start();
|
mScreenDecorations.start();
|
||||||
|
|
||||||
@@ -987,6 +989,8 @@ public class ScreenDecorationsTest extends SysuiTestCase {
|
|||||||
getTestsDrawable(com.android.systemui.tests.R.drawable.rounded5px)
|
getTestsDrawable(com.android.systemui.tests.R.drawable.rounded5px)
|
||||||
/* roundedBottomDrawable */,
|
/* roundedBottomDrawable */,
|
||||||
0 /* roundedPadding */, false /* fillCutout */, true /* privacyDot */);
|
0 /* roundedPadding */, false /* fillCutout */, true /* privacyDot */);
|
||||||
|
doReturn(Surface.ROTATION_270).when(mDisplay).getRotation();
|
||||||
|
|
||||||
mScreenDecorations.onConfigurationChanged(null);
|
mScreenDecorations.onConfigurationChanged(null);
|
||||||
|
|
||||||
assertEquals(new Size(4, 4), resDelegate.getTopRoundedSize());
|
assertEquals(new Size(4, 4), resDelegate.getTopRoundedSize());
|
||||||
|
|||||||
Reference in New Issue
Block a user