summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-05-07 14:05:29 -0700
committercretin45 <cretin45@gmail.com>2015-05-07 14:05:29 -0700
commit4d08b90df38a90a0ec077412f92b0dabb594e056 (patch)
tree46c694407c77ec846084db50b26b24ed87ce4105 /src/com/cyanogenmod/setupwizard/setup
parentb076a55991ee6e913b13ba1a16dd0c559a7eccce (diff)
downloadpackages_apps_SetupWizard-4d08b90df38a90a0ec077412f92b0dabb594e056.zip
packages_apps_SetupWizard-4d08b90df38a90a0ec077412f92b0dabb594e056.tar.gz
packages_apps_SetupWizard-4d08b90df38a90a0ec077412f92b0dabb594e056.tar.bz2
SetupWizard: Use the system property mobile data page visibility
Change-Id: I3a3301bcdbc2200ba62067188e59c886a0891788
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java8
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);
}
}