Merge "Rename some resource values for graphics driver preferences dashboard."
This commit is contained in:
committed by
Android (Google) Code Review
commit
f63f55afc6
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user