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

Commit 14aee306 authored by Joy Babafemi's avatar Joy Babafemi
Browse files

Initialize UwbManager only if supported on device.

Test: Manual
Bug: 197519749
Change-Id: I8346f4c2f3e3cc52e21a9214ab3fd428180c5d8d
Merged-In: I8346f4c2f3e3cc52e21a9214ab3fd428180c5d8d
parent 2a87acf2
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,9 @@ public class UwbPreferenceController extends TogglePreferenceController implemen
    public UwbPreferenceController(Context context, String key) {
    public UwbPreferenceController(Context context, String key) {
        super(context, key);
        super(context, key);
        mExecutor = Executors.newSingleThreadExecutor();
        mExecutor = Executors.newSingleThreadExecutor();
        if (isUwbSupportedOnDevice()) {
            mUwbManager = context.getSystemService(UwbManager.class);
            mUwbManager = context.getSystemService(UwbManager.class);
        }
        mAirplaneModeOn = Settings.Global.getInt(mContext.getContentResolver(),
        mAirplaneModeOn = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.AIRPLANE_MODE_ON, 0) == 1;
                Settings.Global.AIRPLANE_MODE_ON, 0) == 1;
        mAirplaneModeChangedReceiver = new BroadcastReceiver() {
        mAirplaneModeChangedReceiver = new BroadcastReceiver() {