Catch NoSuchMethodError as isAutoOnSupported
is tagged as FlaggedApi
.
Test: Manual Bug: 346716614 Change-Id: I69b34c461ab71703490147a49f5c713a25275f51
This commit is contained in:
@@ -93,7 +93,7 @@ public class BluetoothAutoOnPreferenceController extends TogglePreferenceControl
|
|||||||
var unused = ThreadUtils.postOnBackgroundThread(this::updateValue);
|
var unused = ThreadUtils.postOnBackgroundThread(this::updateValue);
|
||||||
}
|
}
|
||||||
return isSupported ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
return isSupported ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||||
} catch (Exception e) {
|
} catch (Exception | NoSuchMethodError e) {
|
||||||
// Server could throw TimeoutException, InterruptedException or ExecutionException
|
// Server could throw TimeoutException, InterruptedException or ExecutionException
|
||||||
return UNSUPPORTED_ON_DEVICE;
|
return UNSUPPORTED_ON_DEVICE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user