Merge "Check permissions on getDeviceId." into mnc-dr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ef58df63d6
@@ -726,7 +726,7 @@ public class TelephonyManager {
|
|||||||
IPhoneSubInfo info = getSubscriberInfo();
|
IPhoneSubInfo info = getSubscriberInfo();
|
||||||
if (info == null)
|
if (info == null)
|
||||||
return null;
|
return null;
|
||||||
return info.getDeviceIdForPhone(slotId);
|
return info.getDeviceIdForPhone(slotId, mContext.getOpPackageName());
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
return null;
|
return null;
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ interface IPhoneSubInfo {
|
|||||||
* Retrieves the unique device ID of a phone 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 getDeviceIdForPhone(int phoneId);
|
String getDeviceIdForPhone(int phoneId, String callingPackage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the IMEI.
|
* Retrieves the IMEI.
|
||||||
|
|||||||
Reference in New Issue
Block a user