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

Change-Id: If8e3524c3d420caaa7f702fe250c0a748d157263
This commit is contained in:
TreeHugger Robot
2020-05-20 12:33:18 +00:00
committed by Automerger Merge Worker

View File

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