commit | c03df5f6c71f522c13cf6093559e3b1a4c50125e | [log] [tgz] |
---|---|---|
author | chelseahao <chelseahao@google.com> | Thu Jun 13 16:43:52 2024 +0800 |
committer | Chelsea Hao <chelseahao@google.com> | Thu Jun 13 08:47:49 2024 +0000 |
tree | 0deed4ea0eab259b6329ec3dad36f9fbb3d82974 | |
parent | 98a5dbfb425a5df4b0769d0a5742d03d317f33d7 [diff] |
Catch NoSuchMethodError as `isAutoOnSupported` is tagged as `FlaggedApi`. Test: Manual Bug: 346716614 Change-Id: I69b34c461ab71703490147a49f5c713a25275f51
diff --git a/src/com/android/settings/bluetooth/BluetoothAutoOnPreferenceController.java b/src/com/android/settings/bluetooth/BluetoothAutoOnPreferenceController.java index 3aca85e..e3b758d 100644 --- a/src/com/android/settings/bluetooth/BluetoothAutoOnPreferenceController.java +++ b/src/com/android/settings/bluetooth/BluetoothAutoOnPreferenceController.java
@@ -93,7 +93,7 @@ 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; }