diff options
author | Ravindra <c_rthat@codeaurora.org> | 2016-03-22 14:11:51 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-07-01 05:04:56 -0700 |
commit | f79f08e7d5fd82c28eb8e2828315d100c0a79397 (patch) | |
tree | 4417ade22ea76e7b0fcc5a5c0fb935746f977176 /src/com/android | |
parent | b3906b40e5d00a3a308d4c6a847898ef498331cc (diff) | |
download | packages_apps_Settings-f79f08e7d5fd82c28eb8e2828315d100c0a79397.zip packages_apps_Settings-f79f08e7d5fd82c28eb8e2828315d100c0a79397.tar.gz packages_apps_Settings-f79f08e7d5fd82c28eb8e2828315d100c0a79397.tar.bz2 |
Fix to enable data for non-dds sub.
When data is enabled\disabled on non-dds sub do not update the data base
directly instead call TelephonyManager api to do the same.
CRs-Fixed: 992072
Change-Id: I53b5ed2f4d6afcb05b09d65fd3d9843829cff995
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/settings/DataUsageSummary.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 22a9994..8bfff58 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -1199,14 +1199,7 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable private void setMobileDataEnabled(int subId, boolean enabled) { if (LOGD) Log.d(TAG, "setMobileDataEnabled: subId = " + subId + " enabled = " + enabled); int dataSubId = mSubscriptionManager.getDefaultDataSubId(); - if (subId == dataSubId || TelephonyManager.getDefault().getSimCount() == 1) { - mTelephonyManager.setDataEnabled(subId, enabled); - } else { - // Update mobile data status of a non DDS sub in provider - final Context context = getActivity(); - android.provider.Settings.Global.putInt(context.getContentResolver(), - android.provider.Settings.Global.MOBILE_DATA + subId, enabled ? 1 : 0); - } + mTelephonyManager.setDataEnabled(subId, enabled); mMobileDataEnabled.put(String.valueOf(subId), enabled); updatePolicy(false); } |