Add constants releted to communication between SetupWizard and WearServices

- This constants are used in OEM Setup

Bug: 260571511
Test: make -j48
Change-Id: I14122de1654f071292b0dab9c62442ec0de7d4e5
(cherry picked from commit b938311bd0cc22fd25b00fe853ff6266a9882b2b)
This commit is contained in:
Aleksa Plavsic
2022-12-22 16:34:03 +00:00
committed by Aleksa Plavšić
parent b9acdaaeb3
commit 2149374275
3 changed files with 30 additions and 0 deletions

View File

@@ -17910,6 +17910,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

@@ -305,6 +305,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,