summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2023-01-13 17:41:57 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-01-13 17:41:57 +0000
commit69b95f3d14096f47b79cf76b0eb212c9a1576b32 (patch)
tree88479c07a6bbbaf9bddb71b4ac7a1c712c3cec24
parent6e29a0f4739548970afa565ee5124c0ea3648c9e (diff)
parent01005396587ce7caf9fcb04f2acd11aea48681c6 (diff)
Merge "Add ANR internal stop reason."
-rw-r--r--apex/jobscheduler/framework/java/android/app/job/JobParameters.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/apex/jobscheduler/framework/java/android/app/job/JobParameters.java b/apex/jobscheduler/framework/java/android/app/job/JobParameters.java
index a7aae17c2ddd..4be876630bc9 100644
--- a/apex/jobscheduler/framework/java/android/app/job/JobParameters.java
+++ b/apex/jobscheduler/framework/java/android/app/job/JobParameters.java
@@ -104,6 +104,12 @@ public class JobParameters implements Parcelable {
*/
public static final int INTERNAL_STOP_REASON_USER_UI_STOP =
JobProtoEnums.INTERNAL_STOP_REASON_USER_UI_STOP; // 11.
+ /**
+ * The app didn't respond quickly enough from JobScheduler's perspective.
+ * @hide
+ */
+ public static final int INTERNAL_STOP_REASON_ANR =
+ JobProtoEnums.INTERNAL_STOP_REASON_ANR; // 12.
/**
* All the stop reason codes. This should be regarded as an immutable array at runtime.
@@ -128,6 +134,7 @@ public class JobParameters implements Parcelable {
INTERNAL_STOP_REASON_RTC_UPDATED,
INTERNAL_STOP_REASON_SUCCESSFUL_FINISH,
INTERNAL_STOP_REASON_USER_UI_STOP,
+ INTERNAL_STOP_REASON_ANR,
};
/**
@@ -149,6 +156,7 @@ public class JobParameters implements Parcelable {
case INTERNAL_STOP_REASON_RTC_UPDATED: return "rtc_updated";
case INTERNAL_STOP_REASON_SUCCESSFUL_FINISH: return "successful_finish";
case INTERNAL_STOP_REASON_USER_UI_STOP: return "user_ui_stop";
+ case INTERNAL_STOP_REASON_ANR: return "anr";
default: return "unknown:" + reasonCode;
}
}