Merge "Clear binder calling identity before calling callback"
diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java
index 161d10a..ba288188 100644
--- a/core/java/android/telephony/TelephonyRegistryManager.java
+++ b/core/java/android/telephony/TelephonyRegistryManager.java
@@ -111,7 +111,12 @@
IOnSubscriptionsChangedListener callback = new IOnSubscriptionsChangedListener.Stub() {
@Override
public void onSubscriptionsChanged () {
- executor.execute(() -> listener.onSubscriptionsChanged());
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ executor.execute(() -> listener.onSubscriptionsChanged());
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
};
mSubscriptionChangedListenerMap.put(listener, callback);