From 702fc647f3361baa8f646cf3f3f0b72b08e37bf2 Mon Sep 17 00:00:00 2001 From: Ajay Nadathur Date: Fri, 9 Mar 2018 11:56:01 -0800 Subject: [PATCH] Add setupwizard personalisation state to Settings bug: 74396457 Test: Manually tested and verified Change-Id: I84b8cf7c45818131f903743b6c42cfeffe1c7194 Merged-In: I84b8cf7c45818131f903743b6c42cfeffe1c7194 --- core/java/android/provider/Settings.java | 37 ++++++++++++++++++++++ .../src/android/provider/SettingsBackupTest.java | 1 + 2 files changed, 38 insertions(+) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index e46a5f05c48d..aeb6d4538b5a 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1715,6 +1715,34 @@ public final class Settings { }) public @interface ResetMode{} + + /** + * User has not started setup personalization. + * @hide + */ + public static final int USER_SETUP_PERSONALIZATION_NOT_STARTED = 0; + + /** + * User has not yet completed setup personalization. + * @hide + */ + public static final int USER_SETUP_PERSONALIZATION_STARTED = 1; + + /** + * User has completed setup personalization. + * @hide + */ + public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; + + /** @hide */ + @Retention(RetentionPolicy.SOURCE) + @IntDef({ + USER_SETUP_PERSONALIZATION_NOT_STARTED, + USER_SETUP_PERSONALIZATION_STARTED, + USER_SETUP_PERSONALIZATION_COMPLETE + }) + public @interface UserSetupPersonalization {} + /** * Activity Extra: Number of certificates *

@@ -5441,6 +5469,15 @@ public final class Settings { public static final String USER_SETUP_COMPLETE = "user_setup_complete"; /** + * The current state of device personalization. + * + * @hide + * @see UserSetupPersonalization + */ + public static final String USER_SETUP_PERSONALIZATION_STATE = + "user_setup_personalization_state"; + + /** * Whether the current user has been set up via setup wizard (0 = false, 1 = true) * This value differs from USER_SETUP_COMPLETE in that it can be reset back to 0 * in case SetupWizard has been re-enabled on TV devices. diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java index a08eae94b3f6..197c90ea8f1e 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -570,6 +570,7 @@ public class SettingsBackupTest { Settings.Secure.UNSAFE_VOLUME_MUSIC_ACTIVE_MS, Settings.Secure.USB_AUDIO_AUTOMATIC_ROUTING_DISABLED, Settings.Secure.USER_SETUP_COMPLETE, + Settings.Secure.USER_SETUP_PERSONALIZATION_STATE, Settings.Secure.VOICE_INTERACTION_SERVICE, Settings.Secure.VOICE_RECOGNITION_SERVICE, Settings.Secure.INSTANT_APPS_ENABLED, -- 2.11.0