Binder.restoreCallingIdentity moved from 'catch' to 'finally' block.

Clearing the calling identity should be restored in the finally block.
In WallpaperManagerService.WallpaperConnection.engineShown method
it was restored in catch block. This CL corrects that issue.

Bug: 256605760
Test: n/a
Change-Id: Ibe1e252c6ef8728b0706fe1f58d1c56955ce5733
This commit is contained in:
Yasin Kilicdere
2022-10-31 14:38:02 +00:00
parent 07d58c6de3
commit b4db66635a

View File

@@ -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;
}