Clear binder identity before releasing wakelock

Bug: 206340085
Test: manual
Change-Id: If80a10fcb376f43c660b897727999e6febdaace3
This commit is contained in:
Soonil Nagarkar
2021-12-27 18:08:38 -08:00
parent 7f0df9d84d
commit c4f8397de5

View File

@@ -2846,10 +2846,13 @@ public class LocationProviderManager extends
@Override
public void sendResult(Bundle data) {
final long identity = Binder.clearCallingIdentity();
try {
mWakeLock.release();
} catch (RuntimeException e) {
Log.e(TAG, "wakelock over-released by " + mIdentity, e);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
}