Merge "Replace withCleanCallingIdentity with [clear|restore]CallingIdentity"
This commit is contained in:
@@ -2905,10 +2905,14 @@ public class ConnectivityManager {
|
|||||||
ResultReceiver wrappedListener = new ResultReceiver(null) {
|
ResultReceiver wrappedListener = new ResultReceiver(null) {
|
||||||
@Override
|
@Override
|
||||||
protected void onReceiveResult(int resultCode, Bundle resultData) {
|
protected void onReceiveResult(int resultCode, Bundle resultData) {
|
||||||
Binder.withCleanCallingIdentity(() ->
|
final long token = Binder.clearCallingIdentity();
|
||||||
|
try {
|
||||||
executor.execute(() -> {
|
executor.execute(() -> {
|
||||||
listener.onTetheringEntitlementResult(resultCode);
|
listener.onTetheringEntitlementResult(resultCode);
|
||||||
}));
|
});
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user