diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2015-08-10 13:07:37 +0100 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2015-08-10 13:21:01 +0100 |
commit | 649a5ec162a8cc6ef5840ce11fe7e35156d1bdf3 (patch) | |
tree | 7fcc3090f89eff0d873bb6425288504b8f9ecdea /src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java | |
parent | d587f56e2e04a11271407a127f92d205a018e078 (diff) | |
download | packages_apps_SetupWizard-649a5ec162a8cc6ef5840ce11fe7e35156d1bdf3.zip packages_apps_SetupWizard-649a5ec162a8cc6ef5840ce11fe7e35156d1bdf3.tar.gz packages_apps_SetupWizard-649a5ec162a8cc6ef5840ce11fe7e35156d1bdf3.tar.bz2 |
SetupWizard: Adjust FRP-enforcing logic
* Always pass ALLOW_SKIP to GMS, it's smart enough to know when it
can't be applied.
* Don't bring up the authentication screen if no-network and canSkip
Still CYNGNOS-707
Change-Id: Ia1a81c4443cfd5bc3c3e5fd84758ff0ba2a2a140
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java index c5c4710..205e0c8 100644 --- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java @@ -211,9 +211,10 @@ public class GmsAccountPage extends SetupPage { } } - private boolean canSkip() { + public boolean canSkip() { final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager) mContext.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE); + Log.d(TAG,"GMS skip: OEM unlock is enabled: " + pdbManager.getOemUnlockEnabled() + " and amount of PST blocks is " + pdbManager.getDataBlockSize()); return pdbManager == null || pdbManager.getDataBlockSize() == 0 || pdbManager.getOemUnlockEnabled(); @@ -222,7 +223,7 @@ public class GmsAccountPage extends SetupPage { private void launchGmsAccountSetup() { Bundle bundle = new Bundle(); bundle.putBoolean(SetupWizardApp.EXTRA_FIRST_RUN, true); - bundle.putBoolean(SetupWizardApp.EXTRA_ALLOW_SKIP, canSkip()); + bundle.putBoolean(SetupWizardApp.EXTRA_ALLOW_SKIP, true); bundle.putBoolean(SetupWizardApp.EXTRA_USE_IMMERSIVE, true); AccountManager .get(mContext).addAccount(SetupWizardApp.ACCOUNT_TYPE_GMS, null, null, |