Game Driver: Allow user to apply prerelease driver for all apps
Currently the global opt-in is only available to Game Driver. This change has added an option to let developers to opt-in all apps to use prerelease driver. GameDriverEnableForAllAppsPreferenceController is then refactored from SwitchPreference to ListPreference to support this change. Bug: 134881329 Test: make RunSettingsRoboTests ROBOTEST_FILTER=GameDriver Change-Id: I6dcb3a22a4033a576605d42aa80b09db088d4aa2
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.development.gamedriver;
|
||||
import static com.android.settings.development.gamedriver.GameDriverEnableForAllAppsPreferenceController.GAME_DRIVER_ALL_APPS;
|
||||
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.development.gamedriver.GameDriverEnableForAllAppsPreferenceController.GAME_DRIVER_PRERELEASE_ALL_APPS;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -83,7 +84,8 @@ public class GameDriverGlobalSwitchBarController
|
||||
mContentResolver, Settings.Global.GAME_DRIVER_ALL_APPS, GAME_DRIVER_DEFAULT);
|
||||
|
||||
if (isChecked
|
||||
&& (gameDriver == GAME_DRIVER_DEFAULT || gameDriver == GAME_DRIVER_ALL_APPS)) {
|
||||
&& (gameDriver == GAME_DRIVER_DEFAULT || gameDriver == GAME_DRIVER_ALL_APPS
|
||||
|| gameDriver == GAME_DRIVER_PRERELEASE_ALL_APPS)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user