Fix connected devices settings jank issue

Completed the UI in displayPreference() to fix jank issue.

Bug: 188752628
Test: make RunSettingsRoboTests
Change-Id: Ib97b76e1b8622424ad481597f63d3540fb0bfc5b
This commit is contained in:
Hugh Chen
2021-05-25 11:26:08 +08:00
parent 3a55bed8a1
commit 51b6605aef
7 changed files with 16 additions and 217 deletions

View File

@@ -41,6 +41,12 @@ public class BluetoothDeviceRenamePreferenceController extends
mMetricsFeatureProvider = FeatureFactory.getFactory(context).getMetricsFeatureProvider();
}
@Override
public int getAvailabilityStatus() {
return mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
}
/**
* Set the {@link Fragment} that used to show {@link LocalDeviceNameDialogFragment}
* in {@code handlePreferenceTreeClick}