Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57c2df4c authored by Bonian Chen's avatar Bonian Chen Committed by Android (Google) Code Review
Browse files

Merge "[Settings] Support of DSDS API" into rvc-dev

parents eb27c7d9 8f677012
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);