Merge "Change getDeviceId to take phoneId." into lmp-mr1-dev
This commit is contained in:
@@ -640,13 +640,9 @@ public class TelephonyManager {
|
|||||||
*/
|
*/
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public String getDeviceId(int slotId) {
|
public String getDeviceId(int slotId) {
|
||||||
// FIXME methods taking slot id should not use subscription, instead us Uicc directly
|
// FIXME this assumes phoneId == slotId
|
||||||
int[] subId = SubscriptionManager.getSubId(slotId);
|
|
||||||
if (subId == null || subId.length == 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
return getSubscriberInfo().getDeviceIdForSubscriber(subId[0]);
|
return getSubscriberInfo().getDeviceIdForPhone(slotId);
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
return null;
|
return null;
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ interface IPhoneSubInfo {
|
|||||||
String getNaiForSubscriber(int subId);
|
String getNaiForSubscriber(int subId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the unique device ID of a subId for the device, e.g., IMEI
|
* Retrieves the unique device ID of a phone for the device, e.g., IMEI
|
||||||
* for GSM phones.
|
* for GSM phones.
|
||||||
*/
|
*/
|
||||||
String getDeviceIdForSubscriber(int subId);
|
String getDeviceIdForPhone(int phoneId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the IMEI.
|
* Retrieves the IMEI.
|
||||||
|
|||||||
Reference in New Issue
Block a user