Initialize UwbManager only if supported on device.
Test: Manual Bug: 197519749 Change-Id: I8346f4c2f3e3cc52e21a9214ab3fd428180c5d8d Merged-In: I8346f4c2f3e3cc52e21a9214ab3fd428180c5d8d
This commit is contained in:
@@ -57,7 +57,9 @@ public class UwbPreferenceController extends TogglePreferenceController implemen
|
||||
public UwbPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mExecutor = Executors.newSingleThreadExecutor();
|
||||
mUwbManager = context.getSystemService(UwbManager.class);
|
||||
if (isUwbSupportedOnDevice()) {
|
||||
mUwbManager = context.getSystemService(UwbManager.class);
|
||||
}
|
||||
mAirplaneModeOn = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_ON, 0) == 1;
|
||||
mAirplaneModeChangedReceiver = new BroadcastReceiver() {
|
||||
|
Reference in New Issue
Block a user