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

Commit 08fd16b4 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Add the PhoneAccountSuggestionService am: c47570d5

am: df448f5e

Change-Id: I7555d7dfbbf25fc35549d1a7cb29bbe3a83bebde
parents 8ef57c30 df448f5e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -484,6 +484,8 @@ java_defaults {
        "telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl",
        "telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl",
        "telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl",
        "telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl",
        "telecomm/java/com/android/internal/telecom/IInCallService.aidl",
        "telecomm/java/com/android/internal/telecom/IInCallService.aidl",
        "telecomm/java/com/android/internal/telecom/IPhoneAccountSuggestionCallback.aidl",
        "telecomm/java/com/android/internal/telecom/IPhoneAccountSuggestionService.aidl",
        "telecomm/java/com/android/internal/telecom/ITelecomService.aidl",
        "telecomm/java/com/android/internal/telecom/ITelecomService.aidl",
        "telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
        "telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
        "telephony/java/android/telephony/data/IDataService.aidl",
        "telephony/java/android/telephony/data/IDataService.aidl",
+9 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@ package android {
    field public static final java.lang.String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET";
    field public static final java.lang.String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET";
    field public static final java.lang.String BIND_NETWORK_RECOMMENDATION_SERVICE = "android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE";
    field public static final java.lang.String BIND_NETWORK_RECOMMENDATION_SERVICE = "android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE";
    field public static final java.lang.String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE";
    field public static final java.lang.String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE";
    field public static final java.lang.String BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE = "android.permission.BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE";
    field public static final java.lang.String BIND_PRINT_RECOMMENDATION_SERVICE = "android.permission.BIND_PRINT_RECOMMENDATION_SERVICE";
    field public static final java.lang.String BIND_PRINT_RECOMMENDATION_SERVICE = "android.permission.BIND_PRINT_RECOMMENDATION_SERVICE";
    field public static final java.lang.String BIND_RESOLVER_RANKER_SERVICE = "android.permission.BIND_RESOLVER_RANKER_SERVICE";
    field public static final java.lang.String BIND_RESOLVER_RANKER_SERVICE = "android.permission.BIND_RESOLVER_RANKER_SERVICE";
    field public static final java.lang.String BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE = "android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE";
    field public static final java.lang.String BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE = "android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE";
@@ -4942,6 +4943,14 @@ package android.telecom {
    ctor public PhoneAccountSuggestion(android.telecom.PhoneAccountHandle, int, boolean);
    ctor public PhoneAccountSuggestion(android.telecom.PhoneAccountHandle, int, boolean);
  }
  }


  public class PhoneAccountSuggestionService extends android.app.Service {
    ctor public PhoneAccountSuggestionService();
    method public void onAccountSuggestionRequest(java.lang.String);
    method public android.os.IBinder onBind(android.content.Intent);
    method public final void suggestPhoneAccounts(java.lang.String, java.util.List<android.telecom.PhoneAccountSuggestion>);
    field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.PhoneAccountSuggestionService";
  }

  public final class RemoteConference {
  public final class RemoteConference {
    method public deprecated void setAudioState(android.telecom.AudioState);
    method public deprecated void setAudioState(android.telecom.AudioState);
  }
  }
+41 −30
Original line number Original line Diff line number Diff line
@@ -51,6 +51,8 @@ public final class Telecom extends BaseCommand {
    private static final String COMMAND_ADD_OR_REMOVE_CALL_COMPANION_APP =
    private static final String COMMAND_ADD_OR_REMOVE_CALL_COMPANION_APP =
            "add-or-remove-call-companion-app";
            "add-or-remove-call-companion-app";
    private static final String COMMAND_SET_TEST_AUTO_MODE_APP = "set-test-auto-mode-app";
    private static final String COMMAND_SET_TEST_AUTO_MODE_APP = "set-test-auto-mode-app";
    private static final String COMMAND_SET_PHONE_ACCOUNT_SUGGESTION_COMPONENT =
            "set-phone-acct-suggestion-component";
    private static final String COMMAND_UNREGISTER_PHONE_ACCOUNT = "unregister-phone-account";
    private static final String COMMAND_UNREGISTER_PHONE_ACCOUNT = "unregister-phone-account";
    private static final String COMMAND_SET_DEFAULT_DIALER = "set-default-dialer";
    private static final String COMMAND_SET_DEFAULT_DIALER = "set-default-dialer";
    private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer";
    private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer";
@@ -64,35 +66,36 @@ public final class Telecom extends BaseCommand {


    @Override
    @Override
    public void onShowUsage(PrintStream out) {
    public void onShowUsage(PrintStream out) {
        out.println(
        out.println("usage: telecom [subcommand] [options]\n"
                "usage: telecom [subcommand] [options]\n" +
                + "usage: telecom set-phone-account-enabled <COMPONENT> <ID> <USER_SN>\n"
                "usage: telecom set-phone-account-enabled <COMPONENT> <ID> <USER_SN>\n" +
                + "usage: telecom set-phone-account-disabled <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 register-phone-account <COMPONENT> <ID> <USER_SN> <LABEL>\n" +
                + "usage: telecom set-test-call-redirection-app <PACKAGE>\n"
                "usage: telecom set-test-call-redirection-app <PACKAGE>\n" +
                + "usage: telecom set-test-call-screening-app <PACKAGE>\n"
                "usage: telecom set-test-call-screening-app <PACKAGE>\n" +
                + "usage: telecom set-test-auto-mode-app <PACKAGE>\n"
                "usage: telecom set-test-auto-mode-app <PACKAGE>\n" +
                + "usage: telecom set-phone-acct-suggestion-component <COMPONENT>\n"
                "usage: telecom add-or-remove-call-companion-app <PACKAGE> <1/0>\n" +
                + "usage: telecom add-or-remove-call-companion-app <PACKAGE> <1/0>\n"
                "usage: telecom register-sim-phone-account <COMPONENT> <ID> <USER_SN> <LABEL> <ADDRESS>\n" +
                + "usage: telecom register-sim-phone-account <COMPONENT> <ID> <USER_SN>"
                "usage: telecom unregister-phone-account <COMPONENT> <ID> <USER_SN>\n" +
                + " <LABEL> <ADDRESS>\n"
                "usage: telecom set-default-dialer <PACKAGE>\n" +
                + "usage: telecom unregister-phone-account <COMPONENT> <ID> <USER_SN>\n"
                "usage: telecom get-default-dialer\n" +
                + "usage: telecom set-default-dialer <PACKAGE>\n"
                "usage: telecom get-system-dialer\n" +
                + "usage: telecom get-default-dialer\n"
                "usage: telecom wait-on-handlers\n" +
                + "usage: telecom get-system-dialer\n"
                "\n" +
                + "usage: telecom wait-on-handlers\n"
                "telecom set-phone-account-enabled: Enables the given phone account, if it has \n" +
                + "\n"
                " already been registered with Telecom.\n" +
                + "telecom set-phone-account-enabled: Enables the given phone account, if it has \n"
                "\n" +
                + " already been registered with Telecom.\n"
                "telecom set-phone-account-disabled: Disables the given phone account, if it \n" +
                + "\n"
                " has already been registered with telecom.\n" +
                + "telecom set-phone-account-disabled: Disables the given phone account, if it \n"
                "\n" +
                + " has already been registered with telecom.\n"
                "telecom set-default-dialer: Sets the default dialer to the given component. \n" +
                + "\n"
                "\n" +
                + "telecom set-default-dialer: Sets the default dialer to the given component. \n"
                "telecom get-default-dialer: Displays the current default dialer. \n" +
                + "\n"
                "\n" +
                + "telecom get-default-dialer: Displays the current default dialer. \n"
                "telecom get-system-dialer: Displays the current system dialer. \n" +
                + "\n"
                "\n" +
                + "telecom get-system-dialer: Displays the current system dialer. \n"
                "telecom wait-on-handlers: Wait until all handlers finish their work. \n"
                + "\n"
                + "telecom wait-on-handlers: Wait until all handlers finish their work. \n"
        );
        );
    }
    }


@@ -134,6 +137,9 @@ public final class Telecom extends BaseCommand {
            case COMMAND_SET_TEST_AUTO_MODE_APP:
            case COMMAND_SET_TEST_AUTO_MODE_APP:
                runSetTestAutoModeApp();
                runSetTestAutoModeApp();
                break;
                break;
            case COMMAND_SET_PHONE_ACCOUNT_SUGGESTION_COMPONENT:
                runSetTestPhoneAcctSuggestionComponent();
                break;
            case COMMAND_REGISTER_SIM_PHONE_ACCOUNT:
            case COMMAND_REGISTER_SIM_PHONE_ACCOUNT:
                runRegisterSimPhoneAccount();
                runRegisterSimPhoneAccount();
                break;
                break;
@@ -216,6 +222,11 @@ public final class Telecom extends BaseCommand {
        mTelecomService.setTestAutoModeApp(packageName);
        mTelecomService.setTestAutoModeApp(packageName);
    }
    }


    private void runSetTestPhoneAcctSuggestionComponent() throws RemoteException {
        final String componentName = nextArg();
        mTelecomService.setTestPhoneAcctSuggestionComponent(componentName);
    }

    private void runUnregisterPhoneAccount() throws RemoteException {
    private void runUnregisterPhoneAccount() throws RemoteException {
        final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
        final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
        mTelecomService.unregisterPhoneAccount(handle);
        mTelecomService.unregisterPhoneAccount(handle);
+9 −0
Original line number Original line Diff line number Diff line
@@ -1832,6 +1832,15 @@
    <permission android:name="android.permission.BIND_SCREENING_SERVICE"
    <permission android:name="android.permission.BIND_SCREENING_SERVICE"
        android:protectionLevel="signature|privileged" />
        android:protectionLevel="signature|privileged" />


    <!-- Must be required by a {@link android.telecom.PhoneAccountSuggestionService},
         to ensure that only the system can bind to it.
         <p>Protection level: signature|privileged
         @SystemApi
         @hide
    -->
    <permission android:name="android.permission.BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE"
        android:protectionLevel="signature|privileged" />

    <!-- Must be required by a {@link android.telecom.CallRedirectionService},
    <!-- Must be required by a {@link android.telecom.CallRedirectionService},
         to ensure that only the system can bind to it.
         to ensure that only the system can bind to it.
         <p>Protection level: signature|privileged
         <p>Protection level: signature|privileged
+22 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.telecom;

/**
 * {@hide}
  */
parcelable PhoneAccountSuggestion;
 No newline at end of file
Loading