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

Commit 8d24fe23 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "AudioService: fix permission check." into lmp-mr1-dev

parents 28fbe040 38edfda9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3248,7 +3248,10 @@ public class AudioService extends IAudioService.Stub {

        TelecomManager telecomManager =
                (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);

        final long ident = Binder.clearCallingIdentity();
        IsInCall = telecomManager.isInCall();
        Binder.restoreCallingIdentity(ident);

        return (IsInCall || getMode() == AudioManager.MODE_IN_COMMUNICATION);
    }