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

Commit 79eecef6 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Check permissions on getDeviceId.

bug:25778215
Change-Id: Ie27d69e558a8132f6e0c5058aaad1a4ae02bf82f
parent aa1b0618
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");