Merge "Return error code when there's an error starting an activity" into main am: 8d40ab04bd am: 64632eed6d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2693071 Change-Id: Iad272f78398bc4009d72b9fce40019cc7bb74ab8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -761,37 +761,37 @@ final class ActivityManagerShellCommand extends ShellCommand {
|
|||||||
out.println(
|
out.println(
|
||||||
"Error: Activity not started, unable to "
|
"Error: Activity not started, unable to "
|
||||||
+ "resolve " + intent.toString());
|
+ "resolve " + intent.toString());
|
||||||
break;
|
return 1;
|
||||||
case ActivityManager.START_CLASS_NOT_FOUND:
|
case ActivityManager.START_CLASS_NOT_FOUND:
|
||||||
out.println(NO_CLASS_ERROR_CODE);
|
out.println(NO_CLASS_ERROR_CODE);
|
||||||
out.println("Error: Activity class " +
|
out.println("Error: Activity class " +
|
||||||
intent.getComponent().toShortString()
|
intent.getComponent().toShortString()
|
||||||
+ " does not exist.");
|
+ " does not exist.");
|
||||||
break;
|
return 1;
|
||||||
case ActivityManager.START_FORWARD_AND_REQUEST_CONFLICT:
|
case ActivityManager.START_FORWARD_AND_REQUEST_CONFLICT:
|
||||||
out.println(
|
out.println(
|
||||||
"Error: Activity not started, you requested to "
|
"Error: Activity not started, you requested to "
|
||||||
+ "both forward and receive its result");
|
+ "both forward and receive its result");
|
||||||
break;
|
return 1;
|
||||||
case ActivityManager.START_PERMISSION_DENIED:
|
case ActivityManager.START_PERMISSION_DENIED:
|
||||||
out.println(
|
out.println(
|
||||||
"Error: Activity not started, you do not "
|
"Error: Activity not started, you do not "
|
||||||
+ "have permission to access it.");
|
+ "have permission to access it.");
|
||||||
break;
|
return 1;
|
||||||
case ActivityManager.START_NOT_VOICE_COMPATIBLE:
|
case ActivityManager.START_NOT_VOICE_COMPATIBLE:
|
||||||
out.println(
|
out.println(
|
||||||
"Error: Activity not started, voice control not allowed for: "
|
"Error: Activity not started, voice control not allowed for: "
|
||||||
+ intent);
|
+ intent);
|
||||||
break;
|
return 1;
|
||||||
case ActivityManager.START_NOT_CURRENT_USER_ACTIVITY:
|
case ActivityManager.START_NOT_CURRENT_USER_ACTIVITY:
|
||||||
out.println(
|
out.println(
|
||||||
"Error: Not allowed to start background user activity"
|
"Error: Not allowed to start background user activity"
|
||||||
+ " that shouldn't be displayed for all users.");
|
+ " that shouldn't be displayed for all users.");
|
||||||
break;
|
return 1;
|
||||||
default:
|
default:
|
||||||
out.println(
|
out.println(
|
||||||
"Error: Activity not started, unknown error code " + res);
|
"Error: Activity not started, unknown error code " + res);
|
||||||
break;
|
return 1;
|
||||||
}
|
}
|
||||||
out.flush();
|
out.flush();
|
||||||
if (mWaitOption && launched) {
|
if (mWaitOption && launched) {
|
||||||
|
|||||||
Reference in New Issue
Block a user