Merge "[Settings] Support of DSDS API" into rvc-dev am: 57c2df4c7c

Change-Id: I09ceb36bc6c8e73737bdb72c7bcc65080181b7ed
This commit is contained in:
Bonian Chen
2020-04-21 08:18:04 +00:00
committed by Automerger Merge Worker

View File

@@ -20,6 +20,7 @@ import android.content.Intent;
import android.net.NetworkTemplate;
import android.os.Bundle;
import android.os.RemoteException;
import android.telephony.data.ApnSetting;
import android.util.AttributeSet;
import androidx.preference.Preference;
@@ -76,7 +77,8 @@ public class BillingCyclePreference extends Preference
private void updateEnabled() {
try {
setEnabled(mServices.mNetworkService.isBandwidthControlEnabled()
&& mServices.mTelephonyManager.getDataEnabled(mSubId)
&& mServices.mTelephonyManager.createForSubscriptionId(mSubId)
.isDataEnabledForApn(ApnSetting.TYPE_DEFAULT)
&& mServices.mUserManager.isAdminUser());
} catch (RemoteException e) {
setEnabled(false);