Loading telephony/java/android/telephony/SubscriptionManager.java +8 −3 Original line number Diff line number Diff line Loading @@ -2713,9 +2713,14 @@ public class SubscriptionManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(result); })); }); } finally { Binder.restoreCallingIdentity(identity); } } }; iSub.setPreferredDataSubscriptionId(subId, needValidation, callbackStub); Loading telephony/java/android/telephony/TelephonyManager.java +83 −33 Original line number Diff line number Diff line Loading @@ -5682,16 +5682,24 @@ public class TelephonyManager { new ICellInfoCallback.Stub() { @Override public void onCellInfo(List<CellInfo> cellInfo) { Binder.withCleanCallingIdentity(() -> executor.execute(() -> callback.onCellInfo(cellInfo))); final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onCellInfo(cellInfo)); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void onError(int errorCode, String exceptionName, String message) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onError( errorCode, createThrowableByClassName(exceptionName, message)))); createThrowableByClassName(exceptionName, message))); } finally { Binder.restoreCallingIdentity(identity); } } }, getOpPackageName(), getFeatureId()); } catch (RemoteException ex) { Loading Loading @@ -5724,16 +5732,25 @@ public class TelephonyManager { new ICellInfoCallback.Stub() { @Override public void onCellInfo(List<CellInfo> cellInfo) { Binder.withCleanCallingIdentity(() -> executor.execute(() -> callback.onCellInfo(cellInfo))); final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onCellInfo(cellInfo)); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void onError(int errorCode, String exceptionName, String message) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onError( errorCode, createThrowableByClassName(exceptionName, message)))); createThrowableByClassName(exceptionName, message))); } finally { Binder.restoreCallingIdentity(identity); } } }, getOpPackageName(), getFeatureId(), workSource); } catch (RemoteException ex) { Loading Loading @@ -6598,16 +6615,24 @@ public class TelephonyManager { INumberVerificationCallback internalCallback = new INumberVerificationCallback.Stub() { @Override public void onCallReceived(String phoneNumber) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onCallReceived(phoneNumber))); callback.onCallReceived(phoneNumber)); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void onVerificationFailed(int reason) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onVerificationFailed(reason))); callback.onVerificationFailed(reason)); } finally { Binder.restoreCallingIdentity(identity); } } }; Loading Loading @@ -11507,9 +11532,14 @@ public class TelephonyManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(SET_OPPORTUNISTIC_SUB_REMOTE_SERVICE_EXCEPTION); })); }); } finally { Binder.restoreCallingIdentity(identity); } return; } ISetOpportunisticDataCallback callbackStub = new ISetOpportunisticDataCallback.Stub() { Loading @@ -11518,9 +11548,14 @@ public class TelephonyManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(result); })); }); } finally { Binder.restoreCallingIdentity(identity); } } }; Loading Loading @@ -11594,13 +11629,23 @@ public class TelephonyManager { return; } if (iOpportunisticNetworkService == null) { Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(UPDATE_AVAILABLE_NETWORKS_REMOTE_SERVICE_EXCEPTION); })); }); } finally { Binder.restoreCallingIdentity(identity); } } else { Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS); })); }); } finally { Binder.restoreCallingIdentity(identity); } } return; } Loading @@ -11611,9 +11656,14 @@ public class TelephonyManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(result); })); }); } finally { Binder.restoreCallingIdentity(identity); } } }; iOpportunisticNetworkService.updateAvailableNetworks(availableNetworks, callbackStub, Loading Loading
telephony/java/android/telephony/SubscriptionManager.java +8 −3 Original line number Diff line number Diff line Loading @@ -2713,9 +2713,14 @@ public class SubscriptionManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(result); })); }); } finally { Binder.restoreCallingIdentity(identity); } } }; iSub.setPreferredDataSubscriptionId(subId, needValidation, callbackStub); Loading
telephony/java/android/telephony/TelephonyManager.java +83 −33 Original line number Diff line number Diff line Loading @@ -5682,16 +5682,24 @@ public class TelephonyManager { new ICellInfoCallback.Stub() { @Override public void onCellInfo(List<CellInfo> cellInfo) { Binder.withCleanCallingIdentity(() -> executor.execute(() -> callback.onCellInfo(cellInfo))); final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onCellInfo(cellInfo)); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void onError(int errorCode, String exceptionName, String message) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onError( errorCode, createThrowableByClassName(exceptionName, message)))); createThrowableByClassName(exceptionName, message))); } finally { Binder.restoreCallingIdentity(identity); } } }, getOpPackageName(), getFeatureId()); } catch (RemoteException ex) { Loading Loading @@ -5724,16 +5732,25 @@ public class TelephonyManager { new ICellInfoCallback.Stub() { @Override public void onCellInfo(List<CellInfo> cellInfo) { Binder.withCleanCallingIdentity(() -> executor.execute(() -> callback.onCellInfo(cellInfo))); final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onCellInfo(cellInfo)); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void onError(int errorCode, String exceptionName, String message) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onError( errorCode, createThrowableByClassName(exceptionName, message)))); createThrowableByClassName(exceptionName, message))); } finally { Binder.restoreCallingIdentity(identity); } } }, getOpPackageName(), getFeatureId(), workSource); } catch (RemoteException ex) { Loading Loading @@ -6598,16 +6615,24 @@ public class TelephonyManager { INumberVerificationCallback internalCallback = new INumberVerificationCallback.Stub() { @Override public void onCallReceived(String phoneNumber) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onCallReceived(phoneNumber))); callback.onCallReceived(phoneNumber)); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void onVerificationFailed(int reason) { Binder.withCleanCallingIdentity(() -> final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> callback.onVerificationFailed(reason))); callback.onVerificationFailed(reason)); } finally { Binder.restoreCallingIdentity(identity); } } }; Loading Loading @@ -11507,9 +11532,14 @@ public class TelephonyManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(SET_OPPORTUNISTIC_SUB_REMOTE_SERVICE_EXCEPTION); })); }); } finally { Binder.restoreCallingIdentity(identity); } return; } ISetOpportunisticDataCallback callbackStub = new ISetOpportunisticDataCallback.Stub() { Loading @@ -11518,9 +11548,14 @@ public class TelephonyManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(result); })); }); } finally { Binder.restoreCallingIdentity(identity); } } }; Loading Loading @@ -11594,13 +11629,23 @@ public class TelephonyManager { return; } if (iOpportunisticNetworkService == null) { Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(UPDATE_AVAILABLE_NETWORKS_REMOTE_SERVICE_EXCEPTION); })); }); } finally { Binder.restoreCallingIdentity(identity); } } else { Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS); })); }); } finally { Binder.restoreCallingIdentity(identity); } } return; } Loading @@ -11611,9 +11656,14 @@ public class TelephonyManager { if (executor == null || callback == null) { return; } Binder.withCleanCallingIdentity(() -> executor.execute(() -> { final long identity = Binder.clearCallingIdentity(); try { executor.execute(() -> { callback.accept(result); })); }); } finally { Binder.restoreCallingIdentity(identity); } } }; iOpportunisticNetworkService.updateAvailableNetworks(availableNetworks, callbackStub, Loading