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

Change-Id: Ic148a5fa0d0387adebc09192d331754ecaf4e0d5
This commit is contained in:
Bonian Chen
2020-04-21 08:32:53 +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);