Merge "[Settings] Replace TelephonyManager#from()" am: 19cebd9eca
am: fb72a1094f
am: 737783d5e4
Change-Id: I392268bd41ff76960107f137ae10ebf3dd151170
This commit is contained in:
@@ -51,7 +51,7 @@ public abstract class DataUsageBaseFragment extends DashboardFragment {
|
||||
|
||||
services.mPolicyEditor = new NetworkPolicyEditor(services.mPolicyManager);
|
||||
|
||||
services.mTelephonyManager = TelephonyManager.from(context);
|
||||
services.mTelephonyManager = context.getSystemService(TelephonyManager.class);
|
||||
services.mSubscriptionManager = SubscriptionManager.from(context);
|
||||
services.mUserManager = UserManager.get(context);
|
||||
}
|
||||
|
@@ -33,7 +33,6 @@ import android.text.format.Formatter;
|
||||
import android.text.format.Formatter.BytesResult;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -72,7 +71,7 @@ public final class DataUsageUtils extends com.android.settingslib.net.DataUsageU
|
||||
return false;
|
||||
}
|
||||
|
||||
final TelephonyManager telephonyManager = TelephonyManager.from(context);
|
||||
final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class);
|
||||
final NetworkStatsManager networkStatsManager =
|
||||
context.getSystemService(NetworkStatsManager.class);
|
||||
boolean hasEthernetUsage = false;
|
||||
@@ -115,7 +114,7 @@ public final class DataUsageUtils extends com.android.settingslib.net.DataUsageU
|
||||
}
|
||||
return false;
|
||||
}
|
||||
final TelephonyManager tele = TelephonyManager.from(context);
|
||||
final TelephonyManager tele = context.getSystemService(TelephonyManager.class);
|
||||
// require both supported network and ready SIM
|
||||
boolean isReady = true;
|
||||
for (SubscriptionInfo subInfo : subInfoList) {
|
||||
|
Reference in New Issue
Block a user