Merge "Prevent crash if detachWallpaperLocked is called multiple times" into udc-dev

This commit is contained in:
Marzia Favaro
2023-03-03 11:51:27 +00:00
committed by Android (Google) Code Review

View File

@@ -945,7 +945,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
mWindowManagerInternal.removeWindowToken(mToken, false/* removeWindows */,
mDisplayId);
try {
connection.mService.detach(mToken);
if (connection.mService != null) {
connection.mService.detach(mToken);
}
} catch (RemoteException e) {
Slog.w(TAG, "connection.mService.destroy() threw a RemoteException");
}