Fix Inline UWB toggle setting

In settings when searching for "uwb" the inline toggle doesn't work,
this change fixes the issue. This change won't fix the issue of
correctly displaying the UWB state in case when the UWB adapter state
changed after the inline toggle was already loaded, that issue is
tracked in b/287644073.

Bug: 280643766
Test: Manually verified
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:34ea9149906ac41396afbf3d1e153f4ed60dc1ed)
Change-Id: Iddb89220921a9af0e1d97bb3d648ca8b0f42fc65
This commit is contained in:
Ante
2023-06-28 17:25:12 +00:00
committed by Ante Culo
parent 396653e8f3
commit fdfe10f1a7

View File

@@ -79,6 +79,7 @@ public class UwbPreferenceController extends TogglePreferenceController implemen
mStateReason = reason;
updateState(mPreference);
};
mState = mUwbManager.getAdapterState();
} else {
mUwbManager = null;
mAirplaneModeChangedReceiver = null;
@@ -183,5 +184,10 @@ public class UwbPreferenceController extends TogglePreferenceController implemen
public int getSliceHighlightMenuRes() {
return R.string.menu_key_connected_devices;
}
@Override
public boolean hasAsyncUpdate() {
return true;
}
}