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

Commit 230b32ce authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "MidiService: check UID in getDeviceStatus()"

parents 71cadb94 54389559
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -864,7 +864,15 @@ public class MidiService extends IMidiManager.Stub {
        if (device == null) {
            throw new IllegalArgumentException("no such device for " + deviceInfo);
        }
        int uid = Binder.getCallingUid();
        if (device.isUidAllowed(uid)) {
            return device.getDeviceStatus();
        } else {
            Log.e(TAG, "getDeviceStatus() invalid UID = " + uid);
            EventLog.writeEvent(0x534e4554, "203549963",
                    uid, "getDeviceStatus: invalid uid");
            return null;
        }
    }

    @Override