Avoid calling updateSurface twice when dimming is applied.

Test: manual, atest WallpaperManagerServiceTest
Bug: 229715857
Change-Id: Ib8c4939fea503ee71bf71a95dc71f10fd2956614
This commit is contained in:
Vania Desmonda
2022-04-27 11:20:19 +01:00
parent a61b748e39
commit 9c4b4e14a0

View File

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