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

Commit 6281d9dd authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Change permission checks for endCall method.

Allow EITHER MODIFY_PHONE_STATE or ANSWER_PHONE_CALLS permission to use
this API.

Test: Manual test via test app.
Test: Added CTS tests.
Bug: 78290258
Merged-In: Ia5beade115387d0c07550a84aca3f210442e3516
Change-Id: Ia5beade115387d0c07550a84aca3f210442e3516
parent 4b857f25
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -771,7 +771,9 @@ public class TelecomServiceImpl {
            try {
                Log.startSession("TSI.eC");
                synchronized (mLock) {
                    enforceModifyPermission();
                    if (!enforceAnswerCallPermission(callingPackage, Binder.getCallingUid())) {
                        throw new SecurityException("requires ANSWER_PHONE_CALLS permission");
                    }

                    long token = Binder.clearCallingIdentity();
                    try {