Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c03df5f6 authored by chelseahao's avatar chelseahao Committed by Chelsea Hao
Browse files

Catch NoSuchMethodError as `isAutoOnSupported` is tagged as `FlaggedApi`.

Test: Manual
Bug: 346716614

Change-Id: I69b34c461ab71703490147a49f5c713a25275f51
parent 98a5dbfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class BluetoothAutoOnPreferenceController extends TogglePreferenceControl
                var unused = ThreadUtils.postOnBackgroundThread(this::updateValue);
            }
            return isSupported ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
        } catch (Exception e) {
        } catch (Exception | NoSuchMethodError e) {
            // Server could throw TimeoutException, InterruptedException or ExecutionException
            return UNSUPPORTED_ON_DEVICE;
        }