Merge "Avoid calling updateSurface twice when dimming is applied." into tm-dev

This commit is contained in:
Vania Desmonda
2022-05-04 09:43:53 +00:00
committed by Android (Google) Code Review

View File

@@ -904,7 +904,6 @@ public abstract class WallpaperService extends Service {
// based on its default wallpaper color hints. // based on its default wallpaper color hints.
mShouldDim = dimAmount != 0f || mShouldDimByDefault; mShouldDim = dimAmount != 0f || mShouldDimByDefault;
updateSurfaceDimming(); updateSurfaceDimming();
updateSurface(false, false, true);
} }
private void updateSurfaceDimming() { private void updateSurfaceDimming() {
@@ -941,6 +940,7 @@ public abstract class WallpaperService extends Service {
} else { } else {
Log.v(TAG, "Setting wallpaper dimming: " + 0); Log.v(TAG, "Setting wallpaper dimming: " + 0);
surfaceControlTransaction.setAlpha(mBbqSurfaceControl, 1.0f).apply(); surfaceControlTransaction.setAlpha(mBbqSurfaceControl, 1.0f).apply();
updateSurface(false, false, true);
} }
mPreviousWallpaperDimAmount = mWallpaperDimAmount; mPreviousWallpaperDimAmount = mWallpaperDimAmount;