Merge "Replace withCleanCallingIdentity with [clear|restore]CallingIdentity" am: aaef65de42 am: 3d4e6deeb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615182 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I242abe2597ad717026afc547f05701ed8c41aa5c
This commit is contained in:
commit
4ad3d649d8
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