Using current location to check satellite allowed state before enabling satellite
Bug: 364310437
Flag: com.android.internal.telephony.flags.oem_enabled_satellite_flag
Test: atest SatelliteAccessControllerTest (passed)
Test: Manually verified (b/364310437#comment2)
- if the location is used when `requestEnabled` is invoked
- if the cached value is used when `requestIsCommunicationAllowedForCurrentLocation` is invoked.
Test: Verified with testSatelliteApp (b/364310437#comment3)
- if the enableSatellite is invoked the enablingSatellite is true
- if the requestIsSatelliteCommunicationAllowedForCurrentLocation is invoked the enablingSatellite is false
Change-Id: I55d81a4e818a4038b030b6d11471a142cee75c4c
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index e48a57a..e77d652 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -13164,7 +13164,7 @@
}
};
mSatelliteAccessController.requestIsCommunicationAllowedForCurrentLocation(
- resultReceiver);
+ resultReceiver, true);
} else {
// No need to check if satellite is allowed at current location when disabling satellite
mSatelliteController.requestSatelliteEnabled(
@@ -13482,7 +13482,7 @@
public void requestIsCommunicationAllowedForCurrentLocation(int subId,
@NonNull ResultReceiver result) {
enforceSatelliteCommunicationPermission("requestIsCommunicationAllowedForCurrentLocation");
- mSatelliteAccessController.requestIsCommunicationAllowedForCurrentLocation(result);
+ mSatelliteAccessController.requestIsCommunicationAllowedForCurrentLocation(result, false);
}
/**