summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2016-04-15 13:09:25 -0700
committerRoman Birg <roman@cyngn.com>2016-04-22 08:29:40 -0700
commitfccccda7879d397ed8d8508d23d09a0ef417b1df (patch)
tree0fe0a74133add602f495dc72b430f25a2157d961 /tests
parente5c2b92590664cdec422768f04bfb121a3e15bad (diff)
downloadpackages_apps_SetupWizard-fccccda7879d397ed8d8508d23d09a0ef417b1df.zip
packages_apps_SetupWizard-fccccda7879d397ed8d8508d23d09a0ef417b1df.tar.gz
packages_apps_SetupWizard-fccccda7879d397ed8d8508d23d09a0ef417b1df.tar.bz2
SetupWizard: add a CM-specific setup-complete settings key
Android uses Settings.Global.DEVICE_PROVISIONED and Settings.Secure.USER_SETUP_COMPLETE and the system responds to those database entries, such as allowing the keyguard to be visible, or maybe pulling the statusbar down. Since we still depend on some of Google's setup wizard, it also keys off the same table rows and it may decide that the device is now provisioned when we still haven't finished our own setup wizard, so let's add another key that we have control over to show the real state of OUR setup wizard. Ticket: CYNGNOS-2431 Change-Id: Ic21689625f6d80e209161762ace741918b972aba Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/cyanogenmod/account/tests/ManualTestActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/src/com/cyanogenmod/account/tests/ManualTestActivity.java b/tests/src/com/cyanogenmod/account/tests/ManualTestActivity.java
index 3b4f08b..b9c2312 100644
--- a/tests/src/com/cyanogenmod/account/tests/ManualTestActivity.java
+++ b/tests/src/com/cyanogenmod/account/tests/ManualTestActivity.java
@@ -30,6 +30,8 @@ import android.provider.Settings;
import android.view.View;
import android.widget.Toast;
+import cyanogenmod.providers.CMSettings;
+
public class ManualTestActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
@@ -59,6 +61,8 @@ public class ManualTestActivity extends Activity {
private void enableSetup() {
Settings.Global.putInt(getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0);
Settings.Secure.putInt(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 0);
+ CMSettings.Secure.putInt(getContentResolver(),
+ CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED, 0);
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.HOME");
final PackageManager pm = getPackageManager();
@@ -117,6 +121,8 @@ public class ManualTestActivity extends Activity {
private void setSetupComplete() {
Settings.Secure.putInt(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 1);
+ CMSettings.Secure.putInt(getContentResolver(),
+ CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED, 1);
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.HOME");
final PackageManager pm = getPackageManager();