Merge "Add constants releted to communication between SetupWizard and WearServices"

This commit is contained in:
Aleksa Plavšić
2023-01-19 01:20:04 +00:00
committed by Android (Google) Code Review
3 changed files with 30 additions and 0 deletions

View File

@@ -17983,6 +17983,28 @@ public final class Settings {
*/
public static final String OEM_SETUP_VERSION = "oem_setup_version";
/**
* The key to indicate to Setup Wizard if OEM setup is completed in Wear Services.
* @hide
*/
public static final String OEM_SETUP_COMPLETED_STATUS = "oem_setup_completed_status";
/**
* Constant provided to Setup Wizard to inform about failure of OEM setup in Wear
* Services. The value should be provided with setting name {@link
* #OEM_SETUP_COMPLETED_STATUS}.
* @hide
*/
public static final int OEM_SETUP_COMPLETED_FAILURE = 0;
/**
* Constant provided to Setup Wizard to inform about successful completion of OEM setup
* in Wear Services. The value should be provided with setting name {@link
* #OEM_SETUP_COMPLETED_STATUS}.
* @hide
*/
public static final int OEM_SETUP_COMPLETED_SUCCESS = 1;
/**
* Controls the gestures feature.
* @hide

View File

@@ -306,6 +306,13 @@ public class GlobalSettingsValidators {
VALIDATORS.put(Global.Wearable.COMPANION_OS_VERSION, ANY_INTEGER_VALIDATOR);
VALIDATORS.put(Global.Wearable.ENABLE_ALL_LANGUAGES, BOOLEAN_VALIDATOR);
VALIDATORS.put(Global.Wearable.OEM_SETUP_VERSION, ANY_INTEGER_VALIDATOR);
VALIDATORS.put(
Global.Wearable.OEM_SETUP_COMPLETED_STATUS,
new DiscreteValueValidator(
new String[] {
String.valueOf(Global.Wearable.OEM_SETUP_COMPLETED_FAILURE),
String.valueOf(Global.Wearable.OEM_SETUP_COMPLETED_SUCCESS),
}));
VALIDATORS.put(Global.Wearable.MASTER_GESTURES_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(Global.Wearable.UNGAZE_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(

View File

@@ -645,6 +645,7 @@ public class SettingsBackupTest {
Settings.Global.Wearable.ENABLE_ALL_LANGUAGES,
Settings.Global.Wearable.SETUP_LOCALE,
Settings.Global.Wearable.OEM_SETUP_VERSION,
Settings.Global.Wearable.OEM_SETUP_COMPLETED_STATUS,
Settings.Global.Wearable.MASTER_GESTURES_ENABLED,
Settings.Global.Wearable.UNGAZE_ENABLED,
Settings.Global.Wearable.BURN_IN_PROTECTION_ENABLED,