Merge "Expose TelephonyManager#getDeviceSoftwareVersion(int) as system API." am: 096cd20182

am: dd1f02d02e

Change-Id: Id0d95a636c5fb15d2ceefd1f0f4ce42f439630b9
This commit is contained in:
Hall Liu
2019-11-12 15:12:21 -08:00
committed by android-build-merger
3 changed files with 12 additions and 8 deletions

View File

@@ -45045,7 +45045,7 @@ package android.telephony {
method public int getDataState(); method public int getDataState();
method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getDeviceId(); method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getDeviceId();
method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getDeviceId(int); method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getDeviceId(int);
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getDeviceSoftwareVersion(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getDeviceSoftwareVersion();
method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList(); method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList();
method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList(int); method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList(int);
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String[] getForbiddenPlmns(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String[] getForbiddenPlmns();

View File

@@ -8216,6 +8216,7 @@ package android.telephony {
method @Deprecated public boolean getDataEnabled(); method @Deprecated public boolean getDataEnabled();
method @Deprecated public boolean getDataEnabled(int); method @Deprecated public boolean getDataEnabled(int);
method @Nullable public static android.content.ComponentName getDefaultRespondViaMessageApplication(@NonNull android.content.Context, boolean); method @Nullable public static android.content.ComponentName getDefaultRespondViaMessageApplication(@NonNull android.content.Context, boolean);
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDeviceSoftwareVersion(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode();
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain();
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst();

View File

@@ -1633,12 +1633,11 @@ public class TelephonyManager {
* Returns the software version number for the device, for example, * Returns the software version number for the device, for example,
* the IMEI/SV for GSM phones. Return null if the software version is * the IMEI/SV for GSM phones. Return null if the software version is
* not available. * not available.
* * <p>
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}.
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/ */
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
@Nullable
public String getDeviceSoftwareVersion() { public String getDeviceSoftwareVersion() {
return getDeviceSoftwareVersion(getSlotIndex()); return getDeviceSoftwareVersion(getSlotIndex());
} }
@@ -1647,12 +1646,16 @@ public class TelephonyManager {
* Returns the software version number for the device, for example, * Returns the software version number for the device, for example,
* the IMEI/SV for GSM phones. Return null if the software version is * the IMEI/SV for GSM phones. Return null if the software version is
* not available. * not available.
* <p>
* Requires Permission: READ_PRIVILEGED_PHONE_STATE.
* *
* @param slotIndex of which deviceID is returned * @param slotIndex of which deviceID is returned
*
* @hide
*/ */
/** {@hide} */ @SystemApi
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
@UnsupportedAppUsage @Nullable
public String getDeviceSoftwareVersion(int slotIndex) { public String getDeviceSoftwareVersion(int slotIndex) {
ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony();
if (telephony == null) return null; if (telephony == null) return null;