Rename some resource values for graphics driver preferences dashboard.

Bug: b/148626177
Test: make RunSettingsRoboTests ROBOTEST_FILTER=GameDriver
Change-Id: I1f63bd40d5de0cd762bf34a75c7eebd9865a13dd
This commit is contained in:
Peiyong Lin
2020-02-05 17:37:08 -08:00
parent 8b2b5ea302
commit d03dd5ce2a
10 changed files with 67 additions and 63 deletions

View File

@@ -21,6 +21,7 @@ import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_U
import static com.android.settings.development.gamedriver.GameDriverEnableForAllAppsPreferenceController.GAME_DRIVER_DEFAULT;
import static com.android.settings.development.gamedriver.GameDriverEnableForAllAppsPreferenceController.GAME_DRIVER_OFF;
import static com.android.settings.testutils.ApplicationTestUtils.buildInfo;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.spy;
@@ -41,8 +42,6 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -51,6 +50,8 @@ import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import java.util.Arrays;
@RunWith(RobolectricTestRunner.class)
public class GameDriverAppPreferenceControllerTest {
@@ -87,10 +88,13 @@ public class GameDriverAppPreferenceControllerTest {
mContext = spy(RuntimeEnvironment.application);
mResolver = mContext.getContentResolver();
mValueList =
mContext.getResources().getStringArray(R.array.game_driver_app_preference_values);
mDialogTitle = mContext.getResources().getString(R.string.game_driver_app_preference_title);
mContext.getResources().getStringArray(
R.array.graphics_driver_app_preference_values);
mDialogTitle = mContext.getResources().getString(
R.string.graphics_driver_app_preference_title);
mPreferencePrereleaseDriver =
mContext.getResources().getString(R.string.game_driver_app_preference_prerelease_driver);
mContext.getResources().getString(
R.string.graphics_driver_app_preference_prerelease_driver);
}
@Test

View File

@@ -50,6 +50,6 @@ public class GameDriverDashboardTest {
@Test
public void getPreferenceScreen_shouldReturnGameDriverSettings() {
assertThat(mDashboard.getPreferenceScreenResId()).isEqualTo(R.xml.game_driver_settings);
assertThat(mDashboard.getPreferenceScreenResId()).isEqualTo(R.xml.graphics_driver_settings);
}
}

View File

@@ -71,11 +71,11 @@ public class GameDriverEnableForAllAppsPreferenceControllerTest {
mResolver = mContext.getContentResolver();
final Resources resources = mContext.getResources();
mPreferenceDefault = resources.getString(R.string.game_driver_app_preference_default);
mPreferenceDefault = resources.getString(R.string.graphics_driver_app_preference_default);
mPreferenceGameDriver =
resources.getString(R.string.game_driver_app_preference_game_driver);
resources.getString(R.string.graphics_driver_app_preference_game_driver);
mPreferencePrereleaseDriver =
resources.getString(R.string.game_driver_app_preference_prerelease_driver);
resources.getString(R.string.graphics_driver_app_preference_prerelease_driver);
Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);
Settings.Global.putInt(

View File

@@ -224,7 +224,7 @@ Emergency information;emergency_info
Enable Bluetooth HCI snoop log;bt_hci_snoop_log
Enable GPU debug layers;enable_gpu_debug_layers
Enable Wi-Fi Verbose Logging;wifi_verbose_logging
Enable for all apps;game_driver_all_apps_preference
Enable for all apps;graphics_driver_all_apps_preference
Enable freeform windows;enable_freeform_support
Enable view attribute inspection;debug_view_attributes
Encrypt phone;encryption_and_credentials_encryption_status
@@ -256,7 +256,7 @@ Force allow apps on external;force_allow_on_external
Force desktop mode;force_desktop_mode_on_external_displays
Force full GNSS measurements;enable_gnss_raw_meas_full_tracking
Free up space;storage_settings_free_space
Game Driver Preferences;game_driver_settings
Graphics Driver Preferences;graphics_driver_settings
Games;pref_games
Gestures;gesture_settings
Gestures;gesture_settings_screen
@@ -612,7 +612,7 @@ Wait for debugger;wait_for_debugger
Wallpaper;wallpaper
Wallpapers;wallpaper_attributions
WebView implementation;select_webview_provider
When Game Driver is turned on, you can pick to use the updated graphics driver for Apps installed on the device.;game_driver_footer
When there are multiple graphics drivers, you can pick to use the updated graphics driver for Apps installed on the device.;graphics_driver_footer
When device is in VR;vr_display_pref
When to start;when_to_start
Wi-Fi;main_toggle_wifi