Merge "CallDiagnosticService API" am: c90335033b am: 9882ff4bf8 am: d3bf1aa209

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607109

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie91efc29698d27946f83b751bef2fe89d612c9a2
This commit is contained in:
Tyler Gunn
2021-03-03 00:16:56 +00:00
committed by Automerger Merge Worker
14 changed files with 993 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ public final class Telecom extends BaseCommand {
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_SET_CALL_DIAGNOSTIC_SERVICE = "set-call-diagnostic-service";
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_STOP_BLOCK_SUPPRESSION = "stop-block-suppression";
@@ -112,6 +113,7 @@ public final class Telecom extends BaseCommand {
+ "usage: telecom register-sim-phone-account <COMPONENT> <ID> <USER_SN>"
+ " <LABEL> <ADDRESS>\n"
+ "usage: telecom unregister-phone-account <COMPONENT> <ID> <USER_SN>\n"
+ "usage: telecom set-call-diagnostic-service <PACKAGE>\n"
+ "usage: telecom set-default-dialer <PACKAGE>\n"
+ "usage: telecom get-default-dialer\n"
+ "usage: telecom get-system-dialer\n"
@@ -131,6 +133,7 @@ public final class Telecom extends BaseCommand {
+ "telecom set-phone-account-disabled: Disables the given phone account, if it"
+ " has already been registered with telecom.\n"
+ "\n"
+ "telecom set-call-diagnostic-service: overrides call diagnostic service.\n"
+ "telecom set-default-dialer: Sets the override default dialer to the given"
+ " component; this will override whatever the dialer role is set to.\n"
+ "\n"
@@ -206,6 +209,9 @@ public final class Telecom extends BaseCommand {
case COMMAND_SET_PHONE_ACCOUNT_SUGGESTION_COMPONENT:
runSetTestPhoneAcctSuggestionComponent();
break;
case COMMAND_SET_CALL_DIAGNOSTIC_SERVICE:
runSetCallDiagnosticService();
break;
case COMMAND_REGISTER_SIM_PHONE_ACCOUNT:
runRegisterSimPhoneAccount();
break;
@@ -323,6 +329,13 @@ public final class Telecom extends BaseCommand {
mTelecomService.addOrRemoveTestCallCompanionApp(packageName, isAddedBool);
}
private void runSetCallDiagnosticService() throws RemoteException {
String packageName = nextArg();
if ("default".equals(packageName)) packageName = null;
mTelecomService.setTestCallDiagnosticService(packageName);
System.out.println("Success - " + packageName + " set as call diagnostic service.");
}
private void runSetTestPhoneAcctSuggestionComponent() throws RemoteException {
final String componentName = nextArg();
mTelecomService.setTestPhoneAcctSuggestionComponent(componentName);