diff options
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java index c61f6a1..5c918b3 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java +++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; +import android.os.SystemProperties; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; @@ -34,6 +35,8 @@ public class CMSetupWizardData extends AbstractSetupData { private boolean mTimeSet = false; private boolean mTimeZoneSet = false; + private boolean mMobileDataEnabled = SystemProperties + .getBoolean("ro.com.android.mobiledata", true); public CMSetupWizardData(Context context) { super(context); @@ -57,7 +60,7 @@ public class CMSetupWizardData extends AbstractSetupData { } if (SetupWizardUtils.hasTelephony(mContext)) { pages.add(new MobileDataPage(mContext, this) - .setHidden(!isSimInserted() || SetupWizardUtils.isMobileDataEnabled(mContext))); + .setHidden(!isSimInserted() || mMobileDataEnabled)); } if (SetupWizardUtils.hasGMS(mContext)) { pages.add(new GmsAccountPage(mContext, this).setHidden(true)); @@ -83,6 +86,7 @@ public class CMSetupWizardData extends AbstractSetupData { .equals(ConnectivityManager.CONNECTIVITY_ACTION) || intent.getAction() .equals(ConnectivityManager.CONNECTIVITY_ACTION_IMMEDIATE)) { + showHideMobileDataPage(); showHideAccountPages(); } else if (intent.getAction() .equals(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) { @@ -136,7 +140,7 @@ public class CMSetupWizardData extends AbstractSetupData { MobileDataPage mobileDataPage = (MobileDataPage) getPage(MobileDataPage.TAG); if (mobileDataPage != null) { - mobileDataPage.setHidden(!isSimInserted()); + mobileDataPage.setHidden(!isSimInserted() || mMobileDataEnabled); } } |