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

Commit 010ddaad authored by Grace Jia's avatar Grace Jia Committed by Automerger Merge Worker
Browse files

[conflict] Fix security vulnerability issue for multi user call redirections....

[conflict] Fix security vulnerability issue for multi user call redirections. am: 799347b6 am: 7912558a am: a1797f2b am: c1a8b0a5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/20535613



Change-Id: I86438ac59120c534266002fa618315f73f5dac19
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d96a24b7 c1a8b0a5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2121,7 +2121,11 @@ public class CallsManager extends Call.ListenerBase
                && !phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_MULTI_USER)) {
            // Check if the phoneAccountHandle belongs to the current user
            if (phoneAccountHandle != null &&
<<<<<<< TARGET BRANCH (d96a24 Merge "Fix hearing aid device audio route switch issue.")
                    !phoneAccountHandle.getUserHandle().equals(mCurrentUserHandle)) {
=======
                    !phoneAccountHandle.getUserHandle().equals(call.getInitiatingUser())) {
>>>>>>> SOURCE BRANCH (c1a8b0 Fix security vulnerability issue for multi user call redirec)
                phoneAccountHandle = null;
            }
        }
@@ -2162,7 +2166,11 @@ public class CallsManager extends Call.ListenerBase
            Log.w(this, "onCallRedirectionComplete: phoneAccountHandle is unavailable");
            endEarly = true;
            disconnectReason = "Unavailable phoneAccountHandle from Call Redirection Service";
<<<<<<< TARGET BRANCH (d96a24 Merge "Fix hearing aid device audio route switch issue.")
        } else if (isEmergencyNumber) {
=======
        } else if (isPotentialEmergencyNumber) {
>>>>>>> SOURCE BRANCH (c1a8b0 Fix security vulnerability issue for multi user call redirec)
            Log.w(this, "onCallRedirectionComplete: emergency number %s is redirected from Call"
                    + " Redirection Service", handle.getSchemeSpecificPart());
            endEarly = true;
+3 −0
Original line number Diff line number Diff line
@@ -1713,6 +1713,7 @@ public class CallsManagerTest extends TelecomTestCase {
                new UserHandle(90210)));
    }

<<<<<<< TARGET BRANCH (d96a24 Merge "Fix hearing aid device audio route switch issue.")
    /**
     * Verifies that if a {@link android.telecom.CallScreeningService} app can properly request
     * notification show for rejected calls.
@@ -1750,6 +1751,8 @@ public class CallsManagerTest extends TelecomTestCase {
        assertEquals(CallState.DISCONNECTED, newCall.getState());
    }

=======
>>>>>>> SOURCE BRANCH (c1a8b0 Fix security vulnerability issue for multi user call redirec)
    @SmallTest
    @Test
    public void testCrossUserCallRedirectionEndEarlyForIncapablePhoneAccount() {