Merge "Fix to be testable on TestApp." into main
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 9bedbf1..611b6a2 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -14318,8 +14318,13 @@
@SatelliteManager.SatelliteResult public int registerForCommunicationAllowedStateChanged(
int subId, @NonNull ISatelliteCommunicationAllowedStateCallback callback) {
enforceSatelliteCommunicationPermission("registerForCommunicationAllowedStateChanged");
- return mSatelliteAccessController.registerForCommunicationAllowedStateChanged(
- subId, callback);
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return mSatelliteAccessController.registerForCommunicationAllowedStateChanged(
+ subId, callback);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
/**
@@ -14337,7 +14342,13 @@
public void unregisterForCommunicationAllowedStateChanged(
int subId, @NonNull ISatelliteCommunicationAllowedStateCallback callback) {
enforceSatelliteCommunicationPermission("unregisterForCommunicationAllowedStateChanged");
- mSatelliteAccessController.unregisterForCommunicationAllowedStateChanged(subId, callback);
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mSatelliteAccessController.unregisterForCommunicationAllowedStateChanged(subId,
+ callback);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
/**
@@ -14353,7 +14364,12 @@
public void requestSatelliteSessionStats(int subId, @NonNull ResultReceiver result) {
enforceModifyPermission();
enforcePackageUsageStatsPermission("requestSatelliteSessionStats");
- mSatelliteController.requestSatelliteSessionStats(subId, result);
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mSatelliteController.requestSatelliteSessionStats(subId, result);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
/**
@@ -14367,7 +14383,12 @@
@Override
public void requestSatelliteSubscriberProvisionStatus(@NonNull ResultReceiver result) {
enforceSatelliteCommunicationPermission("requestSatelliteSubscriberProvisionStatus");
- mSatelliteController.requestSatelliteSubscriberProvisionStatus(result);
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mSatelliteController.requestSatelliteSubscriberProvisionStatus(result);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
/**
@@ -14382,6 +14403,11 @@
public void provisionSatellite(@NonNull List<SatelliteSubscriberInfo> list,
@NonNull ResultReceiver result) {
enforceSatelliteCommunicationPermission("provisionSatellite");
- mSatelliteController.provisionSatellite(list, result);
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mSatelliteController.provisionSatellite(list, result);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
}