Change API requestIsEnabled to requestIsSessionStarted
- Avoid using APM/WIFI/BT in settings app from any transitioning from TN to NTN.
Flag: EXEMPT bugfix
fix: 354806125
Test: Manual test
Change-Id: Id65567971b3d1ea3e177a0cc1e1304446d8fa0e8
diff --git a/src/com/android/settings/bluetooth/BluetoothEnabler.java b/src/com/android/settings/bluetooth/BluetoothEnabler.java
index df5cc72..a5d0bc6 100644
--- a/src/com/android/settings/bluetooth/BluetoothEnabler.java
+++ b/src/com/android/settings/bluetooth/BluetoothEnabler.java
@@ -132,7 +132,7 @@
new Thread(() -> {
try {
- mIsSatelliteOn.set(mSatelliteRepository.requestIsEnabled(
+ mIsSatelliteOn.set(mSatelliteRepository.requestIsSessionStarted(
Executors.newSingleThreadExecutor()).get(3000, TimeUnit.MILLISECONDS));
} catch (InterruptedException | ExecutionException | TimeoutException e) {
Log.e(TAG, "Error to get satellite status : " + e);
diff --git a/src/com/android/settings/network/AirplaneModePreferenceController.java b/src/com/android/settings/network/AirplaneModePreferenceController.java
index b1f6e50..d4bd4a3 100644
--- a/src/com/android/settings/network/AirplaneModePreferenceController.java
+++ b/src/com/android/settings/network/AirplaneModePreferenceController.java
@@ -162,7 +162,8 @@
public void onResume() {
try {
mIsSatelliteOn.set(
- mSatelliteRepository.requestIsEnabled(Executors.newSingleThreadExecutor())
+ mSatelliteRepository
+ .requestIsSessionStarted(Executors.newSingleThreadExecutor())
.get(2000, TimeUnit.MILLISECONDS));
} catch (ExecutionException | TimeoutException | InterruptedException e) {
Log.e(TAG, "Error to get satellite status : " + e);
diff --git a/src/com/android/settings/wifi/slice/WifiSlice.java b/src/com/android/settings/wifi/slice/WifiSlice.java
index ff448a8..3bb50d3 100644
--- a/src/com/android/settings/wifi/slice/WifiSlice.java
+++ b/src/com/android/settings/wifi/slice/WifiSlice.java
@@ -431,7 +431,7 @@
boolean isSatelliteOn = false;
try {
isSatelliteOn =
- satelliteRepository.requestIsEnabled(Executors.newSingleThreadExecutor())
+ satelliteRepository.requestIsSessionStarted(Executors.newSingleThreadExecutor())
.get(2000, TimeUnit.MILLISECONDS);
} catch (ExecutionException | TimeoutException | InterruptedException e) {
Log.e(TAG, "Error to get satellite status : " + e);