Merge "Replace withCleanCallingIdentity with [clear|restore]CallingIdentity" am: 0f08d2fcb7
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:
commit
d5cdace044
1 changed files with 8 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue