Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: base/android/java/src/org/chromium/base/ApplicationStatus.java

Issue 1447213002: Add stats to distinguish android renderer crashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/java/src/org/chromium/base/ApplicationStatus.java
diff --git a/base/android/java/src/org/chromium/base/ApplicationStatus.java b/base/android/java/src/org/chromium/base/ApplicationStatus.java
index 9f775958491811c93237391ad9c55964dd29d2c9..8f3428b8aff091a7be56521a3a24615b35da7598 100644
--- a/base/android/java/src/org/chromium/base/ApplicationStatus.java
+++ b/base/android/java/src/org/chromium/base/ApplicationStatus.java
@@ -331,6 +331,15 @@ public class ApplicationStatus {
}
/**
+ * Checks whether Chrome is running in the foreground.
+ * @return Whether any Activity under this Application is running.
+ */
+ @CalledByNative
+ public static boolean hasRunningActivities() {
+ return getStateForApplication() == ApplicationState.HAS_RUNNING_ACTIVITIES;
+ }
+
+ /**
* Checks to see if there are any active Activity instances being watched by ApplicationStatus.
* @return True if all Activities have been destroyed.
*/

Powered by Google App Engine
This is Rietveld 408576698