Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c3a86f0 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by android-build-merger
Browse files

Check permissions on getDeviceId. am: 79eecef6

am: a9242206

* commit 'a9242206':
  Check permissions on getDeviceId.
parents e2840825 a9242206
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
    public String getDeviceIdForPhone(int phoneId) {
        Phone phone = getPhone(phoneId);
        if (phone != null) {
            phone.getContext().enforceCallingOrSelfPermission(
                    android.Manifest.permission.READ_PHONE_STATE,
                    "Requires READ_PHONE_STATE");
            return phone.getDeviceId();
        } else {
            Rlog.e(TAG,"getDeviceIdForPhone phone " + phoneId + " is null");