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

Commit 58ee538e authored by Shuo Qian's avatar Shuo Qian Committed by Gerrit Code Review
Browse files

Merge "Add Call redirection app in Telecom test-commands"

parents a36a69a9 6dcf8879
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public final class Telecom extends BaseCommand {
    private static final String COMMAND_SET_PHONE_ACCOUNT_DISABLED = "set-phone-account-disabled";
    private static final String COMMAND_REGISTER_PHONE_ACCOUNT = "register-phone-account";
    private static final String COMMAND_REGISTER_SIM_PHONE_ACCOUNT = "register-sim-phone-account";
    private static final String COMMAND_SET_TEST_CALL_REDIRECTION_APP = "set-test-call-redirection-app";
    private static final String COMMAND_SET_TEST_CALL_SCREENING_APP = "set-test-call-screening-app";
    private static final String COMMAND_ADD_OR_REMOVE_CALL_COMPANION_APP =
            "add-or-remove-call-companion-app";
@@ -68,6 +69,7 @@ public final class Telecom extends BaseCommand {
                "usage: telecom set-phone-account-enabled <COMPONENT> <ID> <USER_SN>\n" +
                "usage: telecom set-phone-account-disabled <COMPONENT> <ID> <USER_SN>\n" +
                "usage: telecom register-phone-account <COMPONENT> <ID> <USER_SN> <LABEL>\n" +
                "usage: telecom set-test-call-redirection-app <PACKAGE>\n" +
                "usage: telecom set-test-call-screening-app <PACKAGE>\n" +
                "usage: telecom set-test-auto-mode-app <PACKAGE>\n" +
                "usage: telecom add-or-remove-call-companion-app <PACKAGE> <1/0>\n" +
@@ -120,6 +122,9 @@ public final class Telecom extends BaseCommand {
            case COMMAND_REGISTER_PHONE_ACCOUNT:
                runRegisterPhoneAccount();
                break;
            case COMMAND_SET_TEST_CALL_REDIRECTION_APP:
                runSetTestCallRedirectionApp();
                break;
            case COMMAND_SET_TEST_CALL_SCREENING_APP:
                runSetTestCallScreeningApp();
                break;
@@ -189,6 +194,11 @@ public final class Telecom extends BaseCommand {
        System.out.println("Success - " + handle + " registered.");
    }

    private void runSetTestCallRedirectionApp() throws RemoteException {
        final String packageName = nextArg();
        mTelecomService.setTestDefaultCallRedirectionApp(packageName);
    }

    private void runSetTestCallScreeningApp() throws RemoteException {
        final String packageName = nextArg();
        mTelecomService.setTestDefaultCallScreeningApp(packageName);
+2 −0
Original line number Diff line number Diff line
@@ -305,6 +305,8 @@ interface ITelecomService {
     */
    void handleCallIntent(in Intent intent);

    void setTestDefaultCallRedirectionApp(String packageName);

    void setTestDefaultCallScreeningApp(String packageName);

    void addOrRemoveTestCallCompanionApp(String packageName, boolean isAdded);