diff options
author | Adnan Begovic <adnan@cyngn.com> | 2016-03-21 10:20:08 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2016-03-21 10:21:06 -0700 |
commit | d114a096476f4a3d6ea181bd6523453f20554243 (patch) | |
tree | 1173e5fcc2d8fd31160935b51ae5c381ede49f47 /src/com/cyanogenmod/setupwizard/setup | |
parent | 7de4615eeb2386e4669c5557997d2a0bbeaf0d7a (diff) | |
download | packages_apps_SetupWizard-d114a096476f4a3d6ea181bd6523453f20554243.zip packages_apps_SetupWizard-d114a096476f4a3d6ea181bd6523453f20554243.tar.gz packages_apps_SetupWizard-d114a096476f4a3d6ea181bd6523453f20554243.tar.bz2 |
SetupWizard: Conditionally supress d2d on lack of nfc.
If a device lacks NFC feature, pass an extra to googles
setup wizard to spress the device to device setup.
Change-Id: I05341f14c4a4753cb5a595734eb337eb10d505a4
TICKET: CYNGNOS-2258
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java index 2285a4c..877f9ac 100644 --- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java @@ -27,6 +27,7 @@ import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; import android.content.Intent; +import android.content.pm.PackageManager; import android.os.Bundle; import android.service.persistentdata.PersistentDataBlockManager; import android.util.Log; @@ -220,6 +221,9 @@ public class GmsAccountPage extends SetupPage { bundle.putBoolean(SetupWizardApp.EXTRA_FIRST_RUN, true); bundle.putBoolean(SetupWizardApp.EXTRA_ALLOW_SKIP, true); bundle.putBoolean(SetupWizardApp.EXTRA_USE_IMMERSIVE, true); + bundle.putBoolean(SetupWizardApp.EXTRA_SUPRESS_D2D_SETUP, !mContext.getPackageManager() + .hasSystemFeature(PackageManager.FEATURE_NFC)); + AccountManager .get(mContext).addAccount(SetupWizardApp.ACCOUNT_TYPE_GMS, null, null, bundle, null, new AccountManagerCallback<Bundle>() { |