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

Commit 06e9c5c6 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Fix inability to reject call as secondary user from lock screen."

am: d58391de

Change-Id: I65159177bed69c4eb28446acf341fad4dab4aaf0
parents df97a9e3 d58391de
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -96,15 +96,19 @@ class InCallAdapter extends IInCallAdapter.Stub {
    public void rejectCall(String callId, boolean rejectWithMessage, String textMessage) {
        try {
            Log.startSession(LogUtils.Sessions.ICA_REJECT_CALL, mOwnerComponentName);
            // Check to make sure the in-call app's user isn't restricted from sending SMS. If so,
            // silently drop the outgoing message. Also drop message if the screen is locked.
            if (!mCallsManager.isReplyWithSmsAllowed(Binder.getCallingUid())) {
                rejectWithMessage = false;
                textMessage = null;
            }

            int callingUid = Binder.getCallingUid();
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
                    // Check to make sure the in-call app's user isn't restricted from sending SMS.
                    // If so, silently drop the outgoing message. Also drop message if the screen is
                    // locked.
                    if (!mCallsManager.isReplyWithSmsAllowed(callingUid)) {
                        rejectWithMessage = false;
                        textMessage = null;
                    }

                    Log.d(this, "rejectCall(%s,%b,%s)", callId, rejectWithMessage, textMessage);
                    Call call = mCallIdMapper.getCall(callId);
                    if (call != null) {