Replace TelephonyManager methods for mobile data

TelephonyManager had a minor refactor of some of the methods revolving
around mobile data. Change code in Settings to use the new ones instead.

Exempt-From-Owner-Approval: Cherry-picked from internal
Bug: 169367013
Test: existing unit tests, manual
Change-Id: I7ebae37373d53fb2c59b6b546232dbddf77398d4
Merged-In: I7ebae37373d53fb2c59b6b546232dbddf77398d4
This commit is contained in:
Hall Liu
2020-09-25 11:15:02 -07:00
parent 21846b228b
commit 17ba8166a3
3 changed files with 13 additions and 5 deletions

View File

@@ -88,7 +88,10 @@ public class MmsMessagePreferenceController extends TelephonyTogglePreferenceCon
@Override
public boolean setChecked(boolean isChecked) {
return mTelephonyManager.setAlwaysAllowMmsData(isChecked);
mTelephonyManager.setMobileDataPolicyEnabledStatus(
TelephonyManager.MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED, isChecked);
return isChecked == mTelephonyManager.isMobileDataPolicyEnabled(
TelephonyManager.MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED);
}
@Override