Merge "Replace withCleanCallingIdentity with [clear|restore]CallingIdentity" am: aaef65de42
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615182 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I376927831333a78dc2c60b5be23324b8f0395c58
This commit is contained in:
@@ -2905,10 +2905,14 @@ public class ConnectivityManager {
|
||||
ResultReceiver wrappedListener = new ResultReceiver(null) {
|
||||
@Override
|
||||
protected void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
Binder.withCleanCallingIdentity(() ->
|
||||
executor.execute(() -> {
|
||||
listener.onTetheringEntitlementResult(resultCode);
|
||||
}));
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
executor.execute(() -> {
|
||||
listener.onTetheringEntitlementResult(resultCode);
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user