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

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

Issue 2792583002: 📱 Simplify naming of generated java enums IntDefs (Closed)
Patch Set: rebase Created 3 years, 8 months 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 8d82ed754178a61954ce73a3c56ffaae9bbe1228..29b1029f88d286f5bdcb5f033c64d2f9497d454f 100644
--- a/base/android/java/src/org/chromium/base/ApplicationStatus.java
+++ b/base/android/java/src/org/chromium/base/ApplicationStatus.java
@@ -11,7 +11,6 @@
import android.os.Bundle;
import org.chromium.base.ActivityState.ActivityStateEnum;
-import org.chromium.base.ApplicationState.ApplicationStateEnum;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.annotations.MainDex;
@@ -58,7 +57,7 @@ public void setStatus(@ActivityStateEnum int status) {
}
private static Object sCachedApplicationStateLock = new Object();
- @ApplicationStateEnum
+ @ApplicationState
private static Integer sCachedApplicationState;
/** Last activity that was shown (or null if none or it was destroyed). */
@@ -94,7 +93,7 @@ public void setStatus(@ActivityStateEnum int status) {
* Called when the application's state changes.
* @param newState The application state.
*/
- public void onApplicationStateChange(@ApplicationStateEnum int newState);
+ public void onApplicationStateChange(@ApplicationState int newState);
}
/**
@@ -311,7 +310,7 @@ public static int getStateForActivity(Activity activity) {
/**
* @return The state of the application (see {@link ApplicationState}).
*/
- @ApplicationStateEnum
+ @ApplicationState
@CalledByNative
public static int getStateForApplication() {
synchronized (sCachedApplicationStateLock) {
@@ -453,7 +452,7 @@ public void onApplicationStateChange(int newState) {
* HAS_STOPPED_ACTIVITIES if none are running/paused and one is stopped.
* HAS_DESTROYED_ACTIVITIES if none are running/paused/stopped.
*/
- @ApplicationStateEnum
+ @ApplicationState
private static int determineApplicationState() {
boolean hasPausedActivity = false;
boolean hasStoppedActivity = false;
@@ -478,5 +477,5 @@ private static int determineApplicationState() {
// Called to notify the native side of state changes.
// IMPORTANT: This is always called on the main thread!
- private static native void nativeOnApplicationStateChange(@ApplicationStateEnum int newState);
+ private static native void nativeOnApplicationStateChange(@ApplicationState int newState);
}

Powered by Google App Engine
This is Rietveld 408576698