Merge "[Settings]Check the Satellite modem state instead of enabled state only." into main

This commit is contained in:
Tom Hsu
2024-08-01 05:27:06 +00:00
committed by Android (Google) Code Review
7 changed files with 87 additions and 34 deletions

View File

@@ -139,7 +139,8 @@ public class WifiEnabler implements SwitchWidgetController.OnSwitchChangeListene
// Refresh satellite mode status.
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);

View File

@@ -431,7 +431,7 @@ public class WifiSlice implements CustomSliceable {
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);