Apply the correct theme to DockPreference

Set the preference context to apply correct theme to preference.

Bug: 110016611
Test: m -j SettingsRoboTests RunSettingsRoboTests
Change-Id: Ifb680fdc0ff40f86886f91320b4187e9873efbf4
This commit is contained in:
Ivan Chiang
2018-06-12 13:46:13 +08:00
parent a927f53f3d
commit 71ae12a1de
3 changed files with 15 additions and 3 deletions

View File

@@ -75,8 +75,11 @@ public class SavedDeviceGroupController extends BasePreferenceController
if (isAvailable()) {
mPreferenceGroup = (PreferenceGroup) screen.findPreference(KEY);
mPreferenceGroup.setVisible(false);
mBluetoothDeviceUpdater.setPrefContext(screen.getContext());
final Context context = screen.getContext();
mBluetoothDeviceUpdater.setPrefContext(context);
mBluetoothDeviceUpdater.forceUpdate();
mSavedDockUpdater.setPreferenceContext(context);
mSavedDockUpdater.forceUpdate();
}
}