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:
@@ -79,6 +79,7 @@ public class UwbPreferenceController extends TogglePreferenceController implemen
|
|||||||
mStateReason = reason;
|
mStateReason = reason;
|
||||||
updateState(mPreference);
|
updateState(mPreference);
|
||||||
};
|
};
|
||||||
|
mState = mUwbManager.getAdapterState();
|
||||||
} else {
|
} else {
|
||||||
mUwbManager = null;
|
mUwbManager = null;
|
||||||
mAirplaneModeChangedReceiver = null;
|
mAirplaneModeChangedReceiver = null;
|
||||||
@@ -183,5 +184,10 @@ public class UwbPreferenceController extends TogglePreferenceController implemen
|
|||||||
public int getSliceHighlightMenuRes() {
|
public int getSliceHighlightMenuRes() {
|
||||||
return R.string.menu_key_connected_devices;
|
return R.string.menu_key_connected_devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasAsyncUpdate() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user