Merge "Revert "Change API requestIsEnabled to requestIsSessionStarted"" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
9bf8ce78b2
@@ -132,7 +132,7 @@ public final class BluetoothEnabler implements SwitchWidgetController.OnSwitchCh
|
|||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
mIsSatelliteOn.set(mSatelliteRepository.requestIsSessionStarted(
|
mIsSatelliteOn.set(mSatelliteRepository.requestIsEnabled(
|
||||||
Executors.newSingleThreadExecutor()).get(3000, TimeUnit.MILLISECONDS));
|
Executors.newSingleThreadExecutor()).get(3000, TimeUnit.MILLISECONDS));
|
||||||
} catch (InterruptedException | ExecutionException | TimeoutException e) {
|
} catch (InterruptedException | ExecutionException | TimeoutException e) {
|
||||||
Log.e(TAG, "Error to get satellite status : " + e);
|
Log.e(TAG, "Error to get satellite status : " + e);
|
||||||
|
|||||||
@@ -162,8 +162,7 @@ public class AirplaneModePreferenceController extends TogglePreferenceController
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
try {
|
try {
|
||||||
mIsSatelliteOn.set(
|
mIsSatelliteOn.set(
|
||||||
mSatelliteRepository
|
mSatelliteRepository.requestIsEnabled(Executors.newSingleThreadExecutor())
|
||||||
.requestIsSessionStarted(Executors.newSingleThreadExecutor())
|
|
||||||
.get(2000, TimeUnit.MILLISECONDS));
|
.get(2000, TimeUnit.MILLISECONDS));
|
||||||
} catch (ExecutionException | TimeoutException | InterruptedException e) {
|
} catch (ExecutionException | TimeoutException | InterruptedException e) {
|
||||||
Log.e(TAG, "Error to get satellite status : " + e);
|
Log.e(TAG, "Error to get satellite status : " + e);
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ public class WifiSlice implements CustomSliceable {
|
|||||||
boolean isSatelliteOn = false;
|
boolean isSatelliteOn = false;
|
||||||
try {
|
try {
|
||||||
isSatelliteOn =
|
isSatelliteOn =
|
||||||
satelliteRepository.requestIsSessionStarted(Executors.newSingleThreadExecutor())
|
satelliteRepository.requestIsEnabled(Executors.newSingleThreadExecutor())
|
||||||
.get(2000, TimeUnit.MILLISECONDS);
|
.get(2000, TimeUnit.MILLISECONDS);
|
||||||
} catch (ExecutionException | TimeoutException | InterruptedException e) {
|
} catch (ExecutionException | TimeoutException | InterruptedException e) {
|
||||||
Log.e(TAG, "Error to get satellite status : " + e);
|
Log.e(TAG, "Error to get satellite status : " + e);
|
||||||
|
|||||||
Reference in New Issue
Block a user