[Provider Model] Carrie Wi-Fi offload toggle request
- Remove the Advanced expandable list pattern and expose the items - Add Carrie Wi-Fi offload toggle preference - Add Carrier Wi-Fi network preference - Do not set Carrier Network together when setting Mobile Data, if carrner network provision enabled. - Screenshot: https://screenshot.googleplex.com/8vMow53cvGfUAoj Bug: 182324921 Test: manual test atest -c CarrierWifiTogglePreferenceControllerTest \ MobileDataPreferenceControllerTest \ WifiPickerTrackerHelperTest Change-Id: I5a7f4cc6850fe76c0efee392c0c0c23cb41f5e1e
This commit is contained in:
@@ -131,7 +131,8 @@ public class MobileDataDialogFragment extends InstrumentedDialogFragment impleme
|
||||
case TYPE_DISABLE_DIALOG:
|
||||
MobileNetworkUtils.setMobileDataEnabled(getContext(), mSubId, false /* enabled */,
|
||||
false /* disableOtherSubscriptions */);
|
||||
if (mWifiPickerTrackerHelper != null) {
|
||||
if (mWifiPickerTrackerHelper != null
|
||||
&& !mWifiPickerTrackerHelper.isCarrierNetworkProvisionEnabled(mSubId)) {
|
||||
mWifiPickerTrackerHelper.setCarrierNetworkEnabled(false);
|
||||
}
|
||||
break;
|
||||
@@ -139,7 +140,8 @@ public class MobileDataDialogFragment extends InstrumentedDialogFragment impleme
|
||||
mSubscriptionManager.setDefaultDataSubId(mSubId);
|
||||
MobileNetworkUtils.setMobileDataEnabled(getContext(), mSubId, true /* enabled */,
|
||||
true /* disableOtherSubscriptions */);
|
||||
if (mWifiPickerTrackerHelper != null) {
|
||||
if (mWifiPickerTrackerHelper != null
|
||||
&& !mWifiPickerTrackerHelper.isCarrierNetworkProvisionEnabled(mSubId)) {
|
||||
mWifiPickerTrackerHelper.setCarrierNetworkEnabled(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -110,7 +110,8 @@ public class MobileDataPreferenceController extends TelephonyTogglePreferenceCon
|
||||
if (!mNeedDialog) {
|
||||
// Update data directly if we don't need dialog
|
||||
MobileNetworkUtils.setMobileDataEnabled(mContext, mSubId, isChecked, false);
|
||||
if (mWifiPickerTrackerHelper != null) {
|
||||
if (mWifiPickerTrackerHelper != null
|
||||
&& !mWifiPickerTrackerHelper.isCarrierNetworkProvisionEnabled(mSubId)) {
|
||||
mWifiPickerTrackerHelper.setCarrierNetworkEnabled(isChecked);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.android.settings.R;
|
||||
import com.android.settings.datausage.BillingCyclePreferenceController;
|
||||
import com.android.settings.datausage.DataUsageSummaryPreferenceController;
|
||||
import com.android.settings.network.ActiveSubsciptionsListener;
|
||||
import com.android.settings.network.CarrierWifiTogglePreferenceController;
|
||||
import com.android.settings.network.telephony.cdma.CdmaSubscriptionPreferenceController;
|
||||
import com.android.settings.network.telephony.cdma.CdmaSystemSelectPreferenceController;
|
||||
import com.android.settings.network.telephony.gsm.AutoSelectPreferenceController;
|
||||
@@ -159,6 +160,7 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
|
||||
use(EnabledNetworkModePreferenceController.class).init(getLifecycle(), mSubId);
|
||||
use(DataServiceSetupPreferenceController.class).init(mSubId);
|
||||
use(Enable2gPreferenceController.class).init(mSubId);
|
||||
use(CarrierWifiTogglePreferenceController.class).init(getLifecycle(), mSubId);
|
||||
|
||||
final WifiCallingPreferenceController wifiCallingPreferenceController =
|
||||
use(WifiCallingPreferenceController.class).init(mSubId);
|
||||
|
||||
Reference in New Issue
Block a user