[Settings] Replace #getSimCount with #getActiveModemCount

Bug: 146815553
Test: make
Change-Id: I9911d2d565a60dbf4a6af47cc25c8345ac2c6355
Merged-In: I9911d2d565a60dbf4a6af47cc25c8345ac2c6355
This commit is contained in:
zoey chen
2019-12-24 14:40:23 +08:00
parent e29ca94af4
commit 5b336b1bd9
3 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ public class MobileDataContentObserver extends ContentObserver {
public static Uri getObservableUri(Context context, int subId) {
Uri uri = Settings.Global.getUriFor(Settings.Global.MOBILE_DATA);
TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class);
if (telephonyManager.getSimCount() != 1) {
if (telephonyManager.getActiveModemCount() != 1) {
uri = Settings.Global.getUriFor(Settings.Global.MOBILE_DATA + subId);
}
return uri;