Revert^2 "Change from deprecated telephony api"

TelephonyManager#setDataEnabled() is deprecated in favor of
TelephonyManager#setDataEnabled(int Reason, boolean enabled). This
change updates the call to the recommended one.

Test: atest SystemUITests
Bug: 238425913

9d7f532671

Change-Id: Ia68410314fd82cfed127d118a43a186870922c6c
This commit is contained in:
Evan Laird
2022-07-29 03:33:00 +00:00
parent a9cfa5bd91
commit 080af92a91

View File

@@ -778,7 +778,8 @@ public class InternetDialogController implements AccessPointController.AccessPoi
return;
}
mTelephonyManager.setDataEnabled(enabled);
mTelephonyManager.setDataEnabledForReason(
TelephonyManager.DATA_ENABLED_REASON_USER, enabled);
if (disableOtherSubscriptions) {
final List<SubscriptionInfo> subInfoList =
mSubscriptionManager.getActiveSubscriptionInfoList();