diff options
Diffstat (limited to 'telephony/java')
3 files changed, 42 insertions, 7 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index e0ab0a368a4f..255a61266ebf 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -13965,7 +13965,12 @@ public class TelephonyManager { IBooleanConsumer aidlConsumer = callback == null ? null : new IBooleanConsumer.Stub() { @Override public void accept(boolean result) { - executor.execute(() -> callback.accept(result)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> callback.accept(result)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }; diff --git a/telephony/java/android/telephony/ims/ImsMmTelManager.java b/telephony/java/android/telephony/ims/ImsMmTelManager.java index 53922ed27c10..36082dc8180e 100644 --- a/telephony/java/android/telephony/ims/ImsMmTelManager.java +++ b/telephony/java/android/telephony/ims/ImsMmTelManager.java @@ -445,7 +445,12 @@ public class ImsMmTelManager implements RegistrationManager { iTelephony.getImsMmTelRegistrationState(mSubId, new IIntegerConsumer.Stub() { @Override public void accept(int result) { - executor.execute(() -> stateCallback.accept(result)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> stateCallback.accept(result)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }); } catch (ServiceSpecificException | RemoteException e) { @@ -487,7 +492,12 @@ public class ImsMmTelManager implements RegistrationManager { new IIntegerConsumer.Stub() { @Override public void accept(int result) { - executor.execute(() -> transportTypeCallback.accept(result)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> transportTypeCallback.accept(result)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }); } catch (ServiceSpecificException | RemoteException e) { @@ -807,7 +817,12 @@ public class ImsMmTelManager implements RegistrationManager { iTelephony.isMmTelCapabilitySupported(mSubId, new IIntegerConsumer.Stub() { @Override public void accept(int result) { - executor.execute(() -> callback.accept(result == 1)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> callback.accept(result == 1)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }, capability, transportType); } catch (ServiceSpecificException sse) { @@ -1452,7 +1467,12 @@ public class ImsMmTelManager implements RegistrationManager { iTelephony.getImsMmTelFeatureState(mSubId, new IIntegerConsumer.Stub() { @Override public void accept(int result) { - executor.execute(() -> callback.accept(result)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> callback.accept(result)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }); } catch (ServiceSpecificException sse) { diff --git a/telephony/java/android/telephony/ims/ImsRcsManager.java b/telephony/java/android/telephony/ims/ImsRcsManager.java index 91c53244a780..8d6fa4141b5c 100644 --- a/telephony/java/android/telephony/ims/ImsRcsManager.java +++ b/telephony/java/android/telephony/ims/ImsRcsManager.java @@ -299,7 +299,12 @@ public class ImsRcsManager { imsRcsController.getImsRcsRegistrationState(mSubId, new IIntegerConsumer.Stub() { @Override public void accept(int result) { - executor.execute(() -> stateCallback.accept(result)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> stateCallback.accept(result)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }); } catch (ServiceSpecificException | RemoteException e) { @@ -345,7 +350,12 @@ public class ImsRcsManager { new IIntegerConsumer.Stub() { @Override public void accept(int result) { - executor.execute(() -> transportTypeCallback.accept(result)); + final long identity = Binder.clearCallingIdentity(); + try { + executor.execute(() -> transportTypeCallback.accept(result)); + } finally { + Binder.restoreCallingIdentity(identity); + } } }); } catch (ServiceSpecificException | RemoteException e) { |