Merge "Check for mSurfaceController in setWallpaperPositionAndScale" into rvc-dev am: c45de5abfa am: c754a3207d

Change-Id: Ib66c3ef28dc792ba005b605f3d64dd15fa404e95
This commit is contained in:
TreeHugger Robot
2020-05-20 12:06:16 +00:00
committed by Automerger Merge Worker

View File

@@ -1257,19 +1257,25 @@ class WindowStateAnimator {
mYOffset = dy; mYOffset = dy;
mWallpaperScale = scale; mWallpaperScale = scale;
try { if (mSurfaceController != null) {
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION setWallpaperOffset"); try {
mService.openSurfaceTransaction(); if (SHOW_LIGHT_TRANSACTIONS) {
setWallpaperPositionAndScale(dx, dy, scale, false); Slog.i(TAG, ">>> OPEN TRANSACTION setWallpaperOffset");
} catch (RuntimeException e) { }
Slog.w(TAG, "Error positioning surface of " + mWin mService.openSurfaceTransaction();
+ " pos=(" + dx + "," + dy + ")", e); setWallpaperPositionAndScale(dx, dy, scale, false);
} finally { } catch (RuntimeException e) {
mService.closeSurfaceTransaction("setWallpaperOffset"); Slog.w(TAG, "Error positioning surface of " + mWin
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, + " pos=(" + dx + "," + dy + ")", e);
"<<< CLOSE TRANSACTION setWallpaperOffset"); } finally {
return true; mService.closeSurfaceTransaction("setWallpaperOffset");
if (SHOW_LIGHT_TRANSACTIONS) {
Slog.i(TAG, "<<< CLOSE TRANSACTION setWallpaperOffset");
}
}
} }
return true;
} }
private void setWallpaperPositionAndScale(int dx, int dy, float scale, private void setWallpaperPositionAndScale(int dx, int dy, float scale,