Loading cmds/telecom/src/com/android/commands/telecom/Telecom.java +2 −3 Original line number Diff line number Diff line Loading @@ -23,8 +23,8 @@ import android.os.IUserManager; import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.os.UserHandle; import android.sysprop.TelephonyProperties; import android.telecom.Log; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; Loading @@ -34,7 +34,6 @@ import android.text.TextUtils; import com.android.internal.os.BaseCommand; import com.android.internal.telecom.ITelecomService; import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.TelephonyProperties; import java.io.PrintStream; Loading Loading @@ -371,7 +370,7 @@ public final class Telecom extends BaseCommand { * "" (empty string) for a phone in SS mode */ private void runGetSimConfig() throws RemoteException { System.out.println(SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG)); System.out.println(TelephonyProperties.multi_sim_config().orElse("")); } private void runGetMaxPhones() throws RemoteException { Loading core/java/android/os/Build.java +13 −6 Original line number Diff line number Diff line Loading @@ -26,17 +26,17 @@ import android.annotation.UnsupportedAppUsage; import android.app.ActivityThread; import android.app.Application; import android.content.Context; import android.sysprop.TelephonyProperties; import android.text.TextUtils; import android.util.Slog; import android.view.View; import com.android.internal.telephony.TelephonyProperties; import dalvik.system.VMRuntime; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; /** * Information about the current build, extracted from system properties. Loading Loading @@ -99,7 +99,8 @@ public class Build { * {@link #getRadioVersion} instead. */ @Deprecated public static final String RADIO = getString(TelephonyProperties.PROPERTY_BASEBAND_VERSION); public static final String RADIO = joinListOrElse( TelephonyProperties.baseband_version(), UNKNOWN); /** The name of the hardware (from the kernel command line or /proc). */ public static final String HARDWARE = getString("ro.hardware"); Loading Loading @@ -1088,7 +1089,8 @@ public class Build { final String requiredBootloader = SystemProperties.get("ro.build.expect.bootloader"); final String currentBootloader = SystemProperties.get("ro.bootloader"); final String requiredRadio = SystemProperties.get("ro.build.expect.baseband"); final String currentRadio = SystemProperties.get("gsm.version.baseband"); final String currentRadio = joinListOrElse( TelephonyProperties.baseband_version(), ""); if (TextUtils.isEmpty(system)) { Slog.e(TAG, "Required ro.build.fingerprint is empty!"); Loading Loading @@ -1262,8 +1264,7 @@ public class Build { * null (if, for instance, the radio is not currently on). */ public static String getRadioVersion() { String propVal = SystemProperties.get(TelephonyProperties.PROPERTY_BASEBAND_VERSION); return TextUtils.isEmpty(propVal) ? null : propVal; return joinListOrElse(TelephonyProperties.baseband_version(), null); } @UnsupportedAppUsage Loading @@ -1288,4 +1289,10 @@ public class Build { return -1; } } private static <T> String joinListOrElse(List<T> list, String defaultValue) { String ret = list.stream().map(elem -> elem == null ? "" : elem.toString()) .collect(Collectors.joining(",")); return ret.isEmpty() ? defaultValue : ret; } } services/core/java/com/android/server/policy/LegacyGlobalActions.java +18 −22 Original line number Diff line number Diff line Loading @@ -16,24 +16,6 @@ package com.android.server.policy; import com.android.internal.app.AlertController; import com.android.internal.globalactions.Action; import com.android.internal.globalactions.ActionsAdapter; import com.android.internal.globalactions.ActionsDialog; import com.android.internal.globalactions.LongPressAction; import com.android.internal.globalactions.SinglePressAction; import com.android.internal.globalactions.ToggleAction; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.R; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.util.EmergencyAffordanceManager; import com.android.internal.widget.LockPatternUtils; import com.android.server.policy.PowerAction; import com.android.server.policy.RestartAction; import com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs; import android.app.ActivityManager; import android.content.BroadcastReceiver; import android.content.Context; Loading @@ -57,6 +39,7 @@ import android.os.Vibrator; import android.provider.Settings; import android.service.dreams.DreamService; import android.service.dreams.IDreamManager; import android.sysprop.TelephonyProperties; import android.telephony.PhoneStateListener; import android.telephony.ServiceState; import android.telephony.TelephonyManager; Loading @@ -69,6 +52,21 @@ import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.widget.AdapterView; import com.android.internal.R; import com.android.internal.app.AlertController; import com.android.internal.globalactions.Action; import com.android.internal.globalactions.ActionsAdapter; import com.android.internal.globalactions.ActionsDialog; import com.android.internal.globalactions.LongPressAction; import com.android.internal.globalactions.SinglePressAction; import com.android.internal.globalactions.ToggleAction; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.util.EmergencyAffordanceManager; import com.android.internal.widget.LockPatternUtils; import com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs; import java.util.ArrayList; import java.util.List; Loading Loading @@ -229,8 +227,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn @Override public void onToggle(boolean on) { if (mHasTelephony && Boolean.parseBoolean( SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) { if (mHasTelephony && TelephonyProperties.in_ecm_mode().orElse(false)) { mIsWaitingForEcmExit = true; // Launch ECM exit dialog Intent ecmDialogIntent = Loading @@ -247,8 +244,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn if (!mHasTelephony) return; // In ECM mode airplane state cannot be changed if (!(Boolean.parseBoolean( SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)))) { if (!TelephonyProperties.in_ecm_mode().orElse(false)) { mState = buttonOn ? State.TurningOn : State.TurningOff; mAirplaneState = mState; } Loading telephony/java/android/telephony/PhoneNumberUtils.java +2 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.telephony; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading @@ -31,9 +29,9 @@ import android.database.Cursor; import android.location.CountryDetector; import android.net.Uri; import android.os.PersistableBundle; import android.os.SystemProperties; import android.provider.Contacts; import android.provider.ContactsContract; import android.sysprop.TelephonyProperties; import android.telecom.PhoneAccount; import android.text.Editable; import android.text.Spannable; Loading Loading @@ -2659,7 +2657,7 @@ public class PhoneNumberUtils { ps = NANP_IDP_STRING; } else { // in case, there is no IDD is found, we shouldn't convert it. ps = SystemProperties.get(PROPERTY_OPERATOR_IDP_STRING, PLUS_SIGN_STRING); ps = TelephonyProperties.operator_idp_string().orElse(PLUS_SIGN_STRING); } return ps; } Loading telephony/java/android/telephony/TelephonyManager.java +95 −61 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.os.SystemProperties; import android.os.WorkSource; import android.provider.Settings.SettingNotFoundException; import android.service.carrier.CarrierIdentifier; import android.sysprop.TelephonyProperties; import android.telecom.CallScreeningService; import android.telecom.InCallService; import android.telecom.PhoneAccount; Loading Loading @@ -98,7 +99,6 @@ import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.RILConstants; import com.android.internal.telephony.SmsApplication; import com.android.internal.telephony.TelephonyProperties; import dalvik.system.VMRuntime; Loading Loading @@ -392,7 +392,7 @@ public class TelephonyManager { @UnsupportedAppUsage public MultiSimVariants getMultiSimConfiguration() { String mSimConfig = SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG); TelephonyProperties.multi_sim_config().orElse(""); if (mSimConfig.equals("dsds")) { return MultiSimVariants.DSDS; } else if (mSimConfig.equals("dsda")) { Loading Loading @@ -458,8 +458,7 @@ public class TelephonyManager { * {@link #getActiveModemCount} returns 1 while this API returns 2. */ public @ModemCount int getSupportedModemCount() { return SystemProperties.getInt(TelephonyProperties.PROPERTY_MAX_ACTIVE_MODEMS, getActiveModemCount()); return TelephonyProperties.max_active_modems().orElse(getActiveModemCount()); } /** Loading Loading @@ -2256,13 +2255,11 @@ public class TelephonyManager { /** {@hide} */ @UnsupportedAppUsage private int getPhoneTypeFromProperty(int phoneId) { String type = getTelephonyProperty(phoneId, TelephonyProperties.CURRENT_ACTIVE_PHONE, null); if (type == null || type.isEmpty()) { Integer type = getTelephonyProperty( phoneId, TelephonyProperties.current_active_phone(), null); if (type != null) return type; return getPhoneTypeFromNetworkType(phoneId); } return Integer.parseInt(type); } private int getPhoneTypeFromNetworkType() { return getPhoneTypeFromNetworkType(getPhoneId()); Loading @@ -2273,9 +2270,9 @@ public class TelephonyManager { // When the system property CURRENT_ACTIVE_PHONE, has not been set, // use the system property for default network type. // This is a fail safe, and can only happen at first boot. String mode = getTelephonyProperty(phoneId, "ro.telephony.default_network", null); if (mode != null && !mode.isEmpty()) { return TelephonyManager.getPhoneType(Integer.parseInt(mode)); Integer mode = getTelephonyProperty(phoneId, TelephonyProperties.default_network(), null); if (mode != null) { return TelephonyManager.getPhoneType(mode); } return TelephonyManager.PHONE_TYPE_NONE; } Loading Loading @@ -2379,7 +2376,7 @@ public class TelephonyManager { /** The ProductType used for LTE on CDMA devices */ private static final String sLteOnCdmaProductType = SystemProperties.get(TelephonyProperties.PROPERTY_LTE_ON_CDMA_PRODUCT_TYPE, ""); TelephonyProperties.lte_on_cdma_product_type().orElse(""); /** * Return if the current radio is LTE on CDMA. This Loading @@ -2397,7 +2394,7 @@ public class TelephonyManager { int curVal; String productType = ""; curVal = SystemProperties.getInt(TelephonyProperties.PROPERTY_LTE_ON_CDMA_DEVICE, curVal = TelephonyProperties.lte_on_cdma_device().orElse( PhoneConstants.LTE_ON_CDMA_UNKNOWN); retVal = curVal; if (retVal == PhoneConstants.LTE_ON_CDMA_UNKNOWN) { Loading Loading @@ -2450,7 +2447,7 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public String getNetworkOperatorName(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, ""); return getTelephonyProperty(phoneId, TelephonyProperties.operator_alpha(), ""); } /** Loading Loading @@ -2494,7 +2491,7 @@ public class TelephonyManager { **/ @UnsupportedAppUsage public String getNetworkOperatorForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, ""); return getTelephonyProperty(phoneId, TelephonyProperties.operator_numeric(), ""); } Loading Loading @@ -2558,8 +2555,7 @@ public class TelephonyManager { @UnsupportedAppUsage public boolean isNetworkRoaming(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return Boolean.parseBoolean(getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null)); return getTelephonyProperty(subId, TelephonyProperties.operator_is_roaming(), false); } /** Loading Loading @@ -3519,8 +3515,7 @@ public class TelephonyManager { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public String getSimOperatorNumericForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, ""); return getTelephonyProperty(phoneId, TelephonyProperties.icc_operator_numeric(), ""); } /** Loading Loading @@ -3557,8 +3552,7 @@ public class TelephonyManager { */ @UnsupportedAppUsage public String getSimOperatorNameForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, ""); return getTelephonyProperty(phoneId, TelephonyProperties.icc_operator_alpha(), ""); } /** Loading Loading @@ -3590,8 +3584,7 @@ public class TelephonyManager { */ @UnsupportedAppUsage public String getSimCountryIsoForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, ""); return getTelephonyProperty(phoneId, TelephonyProperties.icc_operator_iso_country(), ""); } /** Loading Loading @@ -6651,6 +6644,15 @@ public class TelephonyManager { SystemProperties.set(property, value); } /** * Inserts or updates a list property. Expands the list if its length is not enough. */ private static <T> List<T> updateTelephonyProperty(List<T> prop, int phoneId, T value) { List<T> ret = new ArrayList<>(prop); while (ret.size() <= phoneId) ret.add(null); ret.set(phoneId, value); return ret; } /** * Convenience function for retrieving a value from the secure settings * value list as an integer. Note that internally setting values are Loading Loading @@ -6742,7 +6744,7 @@ public class TelephonyManager { } /** * Gets a per-phone telephony property. * Gets a per-phone telephony property from a property name. * * @hide */ Loading @@ -6759,6 +6761,15 @@ public class TelephonyManager { return propVal == null ? defaultVal : propVal; } /** * Gets a typed per-phone telephony property from a schematized list property. */ private static <T> T getTelephonyProperty(int phoneId, List<T> prop, T defaultValue) { T ret = null; if (phoneId >= 0 && phoneId < prop.size()) ret = prop.get(phoneId); return ret != null ? ret : defaultValue; } /** * Gets a global telephony property. * Loading Loading @@ -9087,7 +9098,7 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone. * Set TelephonyProperties.icc_operator_numeric for the default phone. * * @hide */ Loading @@ -9097,18 +9108,21 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the given phone. * Set TelephonyProperties.icc_operator_numeric for the given phone. * * @hide */ @UnsupportedAppUsage public void setSimOperatorNumericForPhone(int phoneId, String numeric) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, numeric); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.icc_operator_numeric(), phoneId, numeric); TelephonyProperties.icc_operator_numeric(newList); } } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone. * Set TelephonyProperties.icc_operator_alpha for the default phone. * * @hide */ Loading @@ -9118,18 +9132,21 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the given phone. * Set TelephonyProperties.icc_operator_alpha for the given phone. * * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setSimOperatorNameForPhone(int phoneId, String name) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, name); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.icc_operator_alpha(), phoneId, name); TelephonyProperties.icc_operator_alpha(newList); } } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY for the default phone. * Set TelephonyProperties.icc_operator_iso_country for the default phone. * * @hide */ Loading @@ -9139,18 +9156,21 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY for the given phone. * Set TelephonyProperties.icc_operator_iso_country for the given phone. * * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setSimCountryIsoForPhone(int phoneId, String iso) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.icc_operator_iso_country(), phoneId, iso); TelephonyProperties.icc_operator_iso_country(newList); } } /** * Set TelephonyProperties.PROPERTY_SIM_STATE for the default phone. * Set TelephonyProperties.sim_state for the default phone. * * @hide */ Loading @@ -9160,14 +9180,17 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_SIM_STATE for the given phone. * Set TelephonyProperties.sim_state for the given phone. * * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setSimStateForPhone(int phoneId, String state) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_SIM_STATE, state); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.sim_state(), phoneId, state); TelephonyProperties.sim_state(newList); } } /** Loading Loading @@ -9272,7 +9295,11 @@ public class TelephonyManager { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setBasebandVersionForPhone(int phoneId, String version) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_BASEBAND_VERSION, version); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.baseband_version(), phoneId, version); TelephonyProperties.baseband_version(newList); } } /** Loading @@ -9295,8 +9322,8 @@ public class TelephonyManager { */ private String getBasebandVersionLegacy(int phoneId) { if (SubscriptionManager.isValidPhoneId(phoneId)) { String prop = TelephonyProperties.PROPERTY_BASEBAND_VERSION + ((phoneId == 0) ? "" : Integer.toString(phoneId)); String prop = "gsm.version.baseband" + ((phoneId == 0) ? "" : Integer.toString(phoneId)); return SystemProperties.get(prop); } return null; Loading @@ -9313,7 +9340,7 @@ public class TelephonyManager { if (version != null && !version.isEmpty()) { setBasebandVersionForPhone(phoneId, version); } return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_BASEBAND_VERSION, ""); return getTelephonyProperty(phoneId, TelephonyProperties.baseband_version(), ""); } /** Loading @@ -9339,8 +9366,9 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setPhoneType(int phoneId, int type) { if (SubscriptionManager.isValidPhoneId(phoneId)) { TelephonyManager.setTelephonyProperty(phoneId, TelephonyProperties.CURRENT_ACTIVE_PHONE, String.valueOf(type)); List<Integer> newList = updateTelephonyProperty( TelephonyProperties.current_active_phone(), phoneId, type); TelephonyProperties.current_active_phone(newList); } } Loading Loading @@ -9369,8 +9397,8 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public String getOtaSpNumberSchemaForPhone(int phoneId, String defaultValue) { if (SubscriptionManager.isValidPhoneId(phoneId)) { return TelephonyManager.getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OTASP_NUM_SCHEMA, defaultValue); return getTelephonyProperty( phoneId, TelephonyProperties.otasp_num_schema(), defaultValue); } return defaultValue; Loading Loading @@ -9400,8 +9428,7 @@ public class TelephonyManager { */ public boolean getSmsReceiveCapableForPhone(int phoneId, boolean defaultValue) { if (SubscriptionManager.isValidPhoneId(phoneId)) { return Boolean.parseBoolean(TelephonyManager.getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_SMS_RECEIVE, String.valueOf(defaultValue))); return getTelephonyProperty(phoneId, TelephonyProperties.sms_receive(), defaultValue); } return defaultValue; Loading Loading @@ -9431,8 +9458,7 @@ public class TelephonyManager { */ public boolean getSmsSendCapableForPhone(int phoneId, boolean defaultValue) { if (SubscriptionManager.isValidPhoneId(phoneId)) { return Boolean.parseBoolean(TelephonyManager.getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_SMS_SEND, String.valueOf(defaultValue))); return getTelephonyProperty(phoneId, TelephonyProperties.sms_send(), defaultValue); } return defaultValue; Loading Loading @@ -9472,7 +9498,9 @@ public class TelephonyManager { @UnsupportedAppUsage public void setNetworkOperatorNameForPhone(int phoneId, String name) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, name); List<String> newList = updateTelephonyProperty( TelephonyProperties.operator_alpha(), phoneId, name); TelephonyProperties.operator_alpha(newList); } } Loading @@ -9494,7 +9522,11 @@ public class TelephonyManager { */ @UnsupportedAppUsage public void setNetworkOperatorNumericForPhone(int phoneId, String numeric) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, numeric); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.operator_numeric(), phoneId, numeric); TelephonyProperties.operator_numeric(newList); } } /** Loading @@ -9516,8 +9548,9 @@ public class TelephonyManager { @UnsupportedAppUsage public void setNetworkRoamingForPhone(int phoneId, boolean isRoaming) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, isRoaming ? "true" : "false"); List<Boolean> newList = updateTelephonyProperty( TelephonyProperties.operator_is_roaming(), phoneId, isRoaming); TelephonyProperties.operator_is_roaming(newList); } } Loading @@ -9544,9 +9577,10 @@ public class TelephonyManager { @UnsupportedAppUsage public void setDataNetworkTypeForPhone(int phoneId, int type) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, List<String> newList = updateTelephonyProperty( TelephonyProperties.data_network_type(), phoneId, ServiceState.rilRadioTechnologyToString(type)); TelephonyProperties.data_network_type(newList); } } Loading Loading
cmds/telecom/src/com/android/commands/telecom/Telecom.java +2 −3 Original line number Diff line number Diff line Loading @@ -23,8 +23,8 @@ import android.os.IUserManager; import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.os.UserHandle; import android.sysprop.TelephonyProperties; import android.telecom.Log; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; Loading @@ -34,7 +34,6 @@ import android.text.TextUtils; import com.android.internal.os.BaseCommand; import com.android.internal.telecom.ITelecomService; import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.TelephonyProperties; import java.io.PrintStream; Loading Loading @@ -371,7 +370,7 @@ public final class Telecom extends BaseCommand { * "" (empty string) for a phone in SS mode */ private void runGetSimConfig() throws RemoteException { System.out.println(SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG)); System.out.println(TelephonyProperties.multi_sim_config().orElse("")); } private void runGetMaxPhones() throws RemoteException { Loading
core/java/android/os/Build.java +13 −6 Original line number Diff line number Diff line Loading @@ -26,17 +26,17 @@ import android.annotation.UnsupportedAppUsage; import android.app.ActivityThread; import android.app.Application; import android.content.Context; import android.sysprop.TelephonyProperties; import android.text.TextUtils; import android.util.Slog; import android.view.View; import com.android.internal.telephony.TelephonyProperties; import dalvik.system.VMRuntime; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; /** * Information about the current build, extracted from system properties. Loading Loading @@ -99,7 +99,8 @@ public class Build { * {@link #getRadioVersion} instead. */ @Deprecated public static final String RADIO = getString(TelephonyProperties.PROPERTY_BASEBAND_VERSION); public static final String RADIO = joinListOrElse( TelephonyProperties.baseband_version(), UNKNOWN); /** The name of the hardware (from the kernel command line or /proc). */ public static final String HARDWARE = getString("ro.hardware"); Loading Loading @@ -1088,7 +1089,8 @@ public class Build { final String requiredBootloader = SystemProperties.get("ro.build.expect.bootloader"); final String currentBootloader = SystemProperties.get("ro.bootloader"); final String requiredRadio = SystemProperties.get("ro.build.expect.baseband"); final String currentRadio = SystemProperties.get("gsm.version.baseband"); final String currentRadio = joinListOrElse( TelephonyProperties.baseband_version(), ""); if (TextUtils.isEmpty(system)) { Slog.e(TAG, "Required ro.build.fingerprint is empty!"); Loading Loading @@ -1262,8 +1264,7 @@ public class Build { * null (if, for instance, the radio is not currently on). */ public static String getRadioVersion() { String propVal = SystemProperties.get(TelephonyProperties.PROPERTY_BASEBAND_VERSION); return TextUtils.isEmpty(propVal) ? null : propVal; return joinListOrElse(TelephonyProperties.baseband_version(), null); } @UnsupportedAppUsage Loading @@ -1288,4 +1289,10 @@ public class Build { return -1; } } private static <T> String joinListOrElse(List<T> list, String defaultValue) { String ret = list.stream().map(elem -> elem == null ? "" : elem.toString()) .collect(Collectors.joining(",")); return ret.isEmpty() ? defaultValue : ret; } }
services/core/java/com/android/server/policy/LegacyGlobalActions.java +18 −22 Original line number Diff line number Diff line Loading @@ -16,24 +16,6 @@ package com.android.server.policy; import com.android.internal.app.AlertController; import com.android.internal.globalactions.Action; import com.android.internal.globalactions.ActionsAdapter; import com.android.internal.globalactions.ActionsDialog; import com.android.internal.globalactions.LongPressAction; import com.android.internal.globalactions.SinglePressAction; import com.android.internal.globalactions.ToggleAction; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.R; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.util.EmergencyAffordanceManager; import com.android.internal.widget.LockPatternUtils; import com.android.server.policy.PowerAction; import com.android.server.policy.RestartAction; import com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs; import android.app.ActivityManager; import android.content.BroadcastReceiver; import android.content.Context; Loading @@ -57,6 +39,7 @@ import android.os.Vibrator; import android.provider.Settings; import android.service.dreams.DreamService; import android.service.dreams.IDreamManager; import android.sysprop.TelephonyProperties; import android.telephony.PhoneStateListener; import android.telephony.ServiceState; import android.telephony.TelephonyManager; Loading @@ -69,6 +52,21 @@ import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.widget.AdapterView; import com.android.internal.R; import com.android.internal.app.AlertController; import com.android.internal.globalactions.Action; import com.android.internal.globalactions.ActionsAdapter; import com.android.internal.globalactions.ActionsDialog; import com.android.internal.globalactions.LongPressAction; import com.android.internal.globalactions.SinglePressAction; import com.android.internal.globalactions.ToggleAction; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.util.EmergencyAffordanceManager; import com.android.internal.widget.LockPatternUtils; import com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs; import java.util.ArrayList; import java.util.List; Loading Loading @@ -229,8 +227,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn @Override public void onToggle(boolean on) { if (mHasTelephony && Boolean.parseBoolean( SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) { if (mHasTelephony && TelephonyProperties.in_ecm_mode().orElse(false)) { mIsWaitingForEcmExit = true; // Launch ECM exit dialog Intent ecmDialogIntent = Loading @@ -247,8 +244,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn if (!mHasTelephony) return; // In ECM mode airplane state cannot be changed if (!(Boolean.parseBoolean( SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)))) { if (!TelephonyProperties.in_ecm_mode().orElse(false)) { mState = buttonOn ? State.TurningOn : State.TurningOff; mAirplaneState = mState; } Loading
telephony/java/android/telephony/PhoneNumberUtils.java +2 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.telephony; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading @@ -31,9 +29,9 @@ import android.database.Cursor; import android.location.CountryDetector; import android.net.Uri; import android.os.PersistableBundle; import android.os.SystemProperties; import android.provider.Contacts; import android.provider.ContactsContract; import android.sysprop.TelephonyProperties; import android.telecom.PhoneAccount; import android.text.Editable; import android.text.Spannable; Loading Loading @@ -2659,7 +2657,7 @@ public class PhoneNumberUtils { ps = NANP_IDP_STRING; } else { // in case, there is no IDD is found, we shouldn't convert it. ps = SystemProperties.get(PROPERTY_OPERATOR_IDP_STRING, PLUS_SIGN_STRING); ps = TelephonyProperties.operator_idp_string().orElse(PLUS_SIGN_STRING); } return ps; } Loading
telephony/java/android/telephony/TelephonyManager.java +95 −61 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.os.SystemProperties; import android.os.WorkSource; import android.provider.Settings.SettingNotFoundException; import android.service.carrier.CarrierIdentifier; import android.sysprop.TelephonyProperties; import android.telecom.CallScreeningService; import android.telecom.InCallService; import android.telecom.PhoneAccount; Loading Loading @@ -98,7 +99,6 @@ import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.RILConstants; import com.android.internal.telephony.SmsApplication; import com.android.internal.telephony.TelephonyProperties; import dalvik.system.VMRuntime; Loading Loading @@ -392,7 +392,7 @@ public class TelephonyManager { @UnsupportedAppUsage public MultiSimVariants getMultiSimConfiguration() { String mSimConfig = SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG); TelephonyProperties.multi_sim_config().orElse(""); if (mSimConfig.equals("dsds")) { return MultiSimVariants.DSDS; } else if (mSimConfig.equals("dsda")) { Loading Loading @@ -458,8 +458,7 @@ public class TelephonyManager { * {@link #getActiveModemCount} returns 1 while this API returns 2. */ public @ModemCount int getSupportedModemCount() { return SystemProperties.getInt(TelephonyProperties.PROPERTY_MAX_ACTIVE_MODEMS, getActiveModemCount()); return TelephonyProperties.max_active_modems().orElse(getActiveModemCount()); } /** Loading Loading @@ -2256,13 +2255,11 @@ public class TelephonyManager { /** {@hide} */ @UnsupportedAppUsage private int getPhoneTypeFromProperty(int phoneId) { String type = getTelephonyProperty(phoneId, TelephonyProperties.CURRENT_ACTIVE_PHONE, null); if (type == null || type.isEmpty()) { Integer type = getTelephonyProperty( phoneId, TelephonyProperties.current_active_phone(), null); if (type != null) return type; return getPhoneTypeFromNetworkType(phoneId); } return Integer.parseInt(type); } private int getPhoneTypeFromNetworkType() { return getPhoneTypeFromNetworkType(getPhoneId()); Loading @@ -2273,9 +2270,9 @@ public class TelephonyManager { // When the system property CURRENT_ACTIVE_PHONE, has not been set, // use the system property for default network type. // This is a fail safe, and can only happen at first boot. String mode = getTelephonyProperty(phoneId, "ro.telephony.default_network", null); if (mode != null && !mode.isEmpty()) { return TelephonyManager.getPhoneType(Integer.parseInt(mode)); Integer mode = getTelephonyProperty(phoneId, TelephonyProperties.default_network(), null); if (mode != null) { return TelephonyManager.getPhoneType(mode); } return TelephonyManager.PHONE_TYPE_NONE; } Loading Loading @@ -2379,7 +2376,7 @@ public class TelephonyManager { /** The ProductType used for LTE on CDMA devices */ private static final String sLteOnCdmaProductType = SystemProperties.get(TelephonyProperties.PROPERTY_LTE_ON_CDMA_PRODUCT_TYPE, ""); TelephonyProperties.lte_on_cdma_product_type().orElse(""); /** * Return if the current radio is LTE on CDMA. This Loading @@ -2397,7 +2394,7 @@ public class TelephonyManager { int curVal; String productType = ""; curVal = SystemProperties.getInt(TelephonyProperties.PROPERTY_LTE_ON_CDMA_DEVICE, curVal = TelephonyProperties.lte_on_cdma_device().orElse( PhoneConstants.LTE_ON_CDMA_UNKNOWN); retVal = curVal; if (retVal == PhoneConstants.LTE_ON_CDMA_UNKNOWN) { Loading Loading @@ -2450,7 +2447,7 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public String getNetworkOperatorName(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, ""); return getTelephonyProperty(phoneId, TelephonyProperties.operator_alpha(), ""); } /** Loading Loading @@ -2494,7 +2491,7 @@ public class TelephonyManager { **/ @UnsupportedAppUsage public String getNetworkOperatorForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, ""); return getTelephonyProperty(phoneId, TelephonyProperties.operator_numeric(), ""); } Loading Loading @@ -2558,8 +2555,7 @@ public class TelephonyManager { @UnsupportedAppUsage public boolean isNetworkRoaming(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return Boolean.parseBoolean(getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null)); return getTelephonyProperty(subId, TelephonyProperties.operator_is_roaming(), false); } /** Loading Loading @@ -3519,8 +3515,7 @@ public class TelephonyManager { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public String getSimOperatorNumericForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, ""); return getTelephonyProperty(phoneId, TelephonyProperties.icc_operator_numeric(), ""); } /** Loading Loading @@ -3557,8 +3552,7 @@ public class TelephonyManager { */ @UnsupportedAppUsage public String getSimOperatorNameForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, ""); return getTelephonyProperty(phoneId, TelephonyProperties.icc_operator_alpha(), ""); } /** Loading Loading @@ -3590,8 +3584,7 @@ public class TelephonyManager { */ @UnsupportedAppUsage public String getSimCountryIsoForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, ""); return getTelephonyProperty(phoneId, TelephonyProperties.icc_operator_iso_country(), ""); } /** Loading Loading @@ -6651,6 +6644,15 @@ public class TelephonyManager { SystemProperties.set(property, value); } /** * Inserts or updates a list property. Expands the list if its length is not enough. */ private static <T> List<T> updateTelephonyProperty(List<T> prop, int phoneId, T value) { List<T> ret = new ArrayList<>(prop); while (ret.size() <= phoneId) ret.add(null); ret.set(phoneId, value); return ret; } /** * Convenience function for retrieving a value from the secure settings * value list as an integer. Note that internally setting values are Loading Loading @@ -6742,7 +6744,7 @@ public class TelephonyManager { } /** * Gets a per-phone telephony property. * Gets a per-phone telephony property from a property name. * * @hide */ Loading @@ -6759,6 +6761,15 @@ public class TelephonyManager { return propVal == null ? defaultVal : propVal; } /** * Gets a typed per-phone telephony property from a schematized list property. */ private static <T> T getTelephonyProperty(int phoneId, List<T> prop, T defaultValue) { T ret = null; if (phoneId >= 0 && phoneId < prop.size()) ret = prop.get(phoneId); return ret != null ? ret : defaultValue; } /** * Gets a global telephony property. * Loading Loading @@ -9087,7 +9098,7 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone. * Set TelephonyProperties.icc_operator_numeric for the default phone. * * @hide */ Loading @@ -9097,18 +9108,21 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the given phone. * Set TelephonyProperties.icc_operator_numeric for the given phone. * * @hide */ @UnsupportedAppUsage public void setSimOperatorNumericForPhone(int phoneId, String numeric) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, numeric); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.icc_operator_numeric(), phoneId, numeric); TelephonyProperties.icc_operator_numeric(newList); } } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone. * Set TelephonyProperties.icc_operator_alpha for the default phone. * * @hide */ Loading @@ -9118,18 +9132,21 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the given phone. * Set TelephonyProperties.icc_operator_alpha for the given phone. * * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setSimOperatorNameForPhone(int phoneId, String name) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, name); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.icc_operator_alpha(), phoneId, name); TelephonyProperties.icc_operator_alpha(newList); } } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY for the default phone. * Set TelephonyProperties.icc_operator_iso_country for the default phone. * * @hide */ Loading @@ -9139,18 +9156,21 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY for the given phone. * Set TelephonyProperties.icc_operator_iso_country for the given phone. * * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setSimCountryIsoForPhone(int phoneId, String iso) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.icc_operator_iso_country(), phoneId, iso); TelephonyProperties.icc_operator_iso_country(newList); } } /** * Set TelephonyProperties.PROPERTY_SIM_STATE for the default phone. * Set TelephonyProperties.sim_state for the default phone. * * @hide */ Loading @@ -9160,14 +9180,17 @@ public class TelephonyManager { } /** * Set TelephonyProperties.PROPERTY_SIM_STATE for the given phone. * Set TelephonyProperties.sim_state for the given phone. * * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setSimStateForPhone(int phoneId, String state) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_SIM_STATE, state); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.sim_state(), phoneId, state); TelephonyProperties.sim_state(newList); } } /** Loading Loading @@ -9272,7 +9295,11 @@ public class TelephonyManager { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setBasebandVersionForPhone(int phoneId, String version) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_BASEBAND_VERSION, version); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.baseband_version(), phoneId, version); TelephonyProperties.baseband_version(newList); } } /** Loading @@ -9295,8 +9322,8 @@ public class TelephonyManager { */ private String getBasebandVersionLegacy(int phoneId) { if (SubscriptionManager.isValidPhoneId(phoneId)) { String prop = TelephonyProperties.PROPERTY_BASEBAND_VERSION + ((phoneId == 0) ? "" : Integer.toString(phoneId)); String prop = "gsm.version.baseband" + ((phoneId == 0) ? "" : Integer.toString(phoneId)); return SystemProperties.get(prop); } return null; Loading @@ -9313,7 +9340,7 @@ public class TelephonyManager { if (version != null && !version.isEmpty()) { setBasebandVersionForPhone(phoneId, version); } return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_BASEBAND_VERSION, ""); return getTelephonyProperty(phoneId, TelephonyProperties.baseband_version(), ""); } /** Loading @@ -9339,8 +9366,9 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public void setPhoneType(int phoneId, int type) { if (SubscriptionManager.isValidPhoneId(phoneId)) { TelephonyManager.setTelephonyProperty(phoneId, TelephonyProperties.CURRENT_ACTIVE_PHONE, String.valueOf(type)); List<Integer> newList = updateTelephonyProperty( TelephonyProperties.current_active_phone(), phoneId, type); TelephonyProperties.current_active_phone(newList); } } Loading Loading @@ -9369,8 +9397,8 @@ public class TelephonyManager { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public String getOtaSpNumberSchemaForPhone(int phoneId, String defaultValue) { if (SubscriptionManager.isValidPhoneId(phoneId)) { return TelephonyManager.getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OTASP_NUM_SCHEMA, defaultValue); return getTelephonyProperty( phoneId, TelephonyProperties.otasp_num_schema(), defaultValue); } return defaultValue; Loading Loading @@ -9400,8 +9428,7 @@ public class TelephonyManager { */ public boolean getSmsReceiveCapableForPhone(int phoneId, boolean defaultValue) { if (SubscriptionManager.isValidPhoneId(phoneId)) { return Boolean.parseBoolean(TelephonyManager.getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_SMS_RECEIVE, String.valueOf(defaultValue))); return getTelephonyProperty(phoneId, TelephonyProperties.sms_receive(), defaultValue); } return defaultValue; Loading Loading @@ -9431,8 +9458,7 @@ public class TelephonyManager { */ public boolean getSmsSendCapableForPhone(int phoneId, boolean defaultValue) { if (SubscriptionManager.isValidPhoneId(phoneId)) { return Boolean.parseBoolean(TelephonyManager.getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_SMS_SEND, String.valueOf(defaultValue))); return getTelephonyProperty(phoneId, TelephonyProperties.sms_send(), defaultValue); } return defaultValue; Loading Loading @@ -9472,7 +9498,9 @@ public class TelephonyManager { @UnsupportedAppUsage public void setNetworkOperatorNameForPhone(int phoneId, String name) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, name); List<String> newList = updateTelephonyProperty( TelephonyProperties.operator_alpha(), phoneId, name); TelephonyProperties.operator_alpha(newList); } } Loading @@ -9494,7 +9522,11 @@ public class TelephonyManager { */ @UnsupportedAppUsage public void setNetworkOperatorNumericForPhone(int phoneId, String numeric) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, numeric); if (SubscriptionManager.isValidPhoneId(phoneId)) { List<String> newList = updateTelephonyProperty( TelephonyProperties.operator_numeric(), phoneId, numeric); TelephonyProperties.operator_numeric(newList); } } /** Loading @@ -9516,8 +9548,9 @@ public class TelephonyManager { @UnsupportedAppUsage public void setNetworkRoamingForPhone(int phoneId, boolean isRoaming) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, isRoaming ? "true" : "false"); List<Boolean> newList = updateTelephonyProperty( TelephonyProperties.operator_is_roaming(), phoneId, isRoaming); TelephonyProperties.operator_is_roaming(newList); } } Loading @@ -9544,9 +9577,10 @@ public class TelephonyManager { @UnsupportedAppUsage public void setDataNetworkTypeForPhone(int phoneId, int type) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, List<String> newList = updateTelephonyProperty( TelephonyProperties.data_network_type(), phoneId, ServiceState.rilRadioTechnologyToString(type)); TelephonyProperties.data_network_type(newList); } } Loading