Only show graphics driver option when the apk is available.

Previously we always show all options, this patch makes the dashboard
only shows the option when the driver apk is available.

Bug: b/148626177
Test: make RunSettingsRoboTests ROBOTEST_FILTER=GraphicsDriver
Change-Id: Ifde5929d826d5ab542e855aa334546dd744b138b
This commit is contained in:
Peiyong Lin
2020-02-21 13:34:47 -08:00
parent dc4f004cc9
commit fc4155a02c
5 changed files with 82 additions and 30 deletions

View File

@@ -82,6 +82,8 @@ public class GraphicsDriverEnableForAllAppsPreferenceControllerTest {
mResolver, Settings.Global.GAME_DRIVER_ALL_APPS, GAME_DRIVER_DEFAULT);
mController = new GraphicsDriverEnableForAllAppsPreferenceController(mContext, "testKey");
mController.mEntryList = mContext.getResources().getStringArray(
R.array.graphics_driver_all_apps_preference_values);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
mController.displayPreference(mScreen);
}