From 3c62958824b9faf932ef3623028ad73d82c68a6d Mon Sep 17 00:00:00 2001 From: Yasin Kilicdere Date: Fri, 25 Nov 2022 19:16:30 +0000 Subject: [PATCH] Revert "Revert "Binder.restoreCallingIdentity moved from 'catch' to 'finally' block."" This reverts commit a6573a641c69ad6f8e53042cf84c7b2cc6d435b4. Reason for revert: Reverting the revert, since it wasn't the culprit Change-Id: I76a92f4a4fad3c1880d8767f91fd5c47631d5069 --- .../com/android/server/wallpaper/WallpaperManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java index 6a3553315e5a4..7dc4f9782e705 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java @@ -1549,8 +1549,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub try { mReply.sendResult(null); } catch (RemoteException e) { - Binder.restoreCallingIdentity(ident); Slog.d(TAG, "failed to send callback!", e); + } finally { + Binder.restoreCallingIdentity(ident); } mReply = null; }