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

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

Issue 1422693002: Make Android HttpNegotiateAuthenticator work without an activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AppStatusWebview
Patch Set: Add more tests Created 5 years, 2 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 9e80d28e0779782d6046bb442a90108dcc73c5e1..9f42326418d03113a56d60ac9fdb5bd01b0e477a 100644
--- a/base/android/java/src/org/chromium/base/ApplicationStatus.java
+++ b/base/android/java/src/org/chromium/base/ApplicationStatus.java
@@ -441,6 +441,19 @@ public static void unregisterApplicationStateListener(ApplicationStateListener l
sApplicationStateListeners.removeObserver(listener);
}
+ @VisibleForTesting
+ public static void destroyForTesting() {
+ sApplicationStateListeners.clear();
+ sGeneralActivityStateListeners.clear();
+ sActivityInfo.clear();
+ sCachedApplicationState = 0;
+ sActivity = null;
+ sActivityLifecycleIndependentMode = false;
+ sApplication = null;
+ sApplicationContext = null;
+ sNativeApplicationStateListener = null;
+ }
+
/**
* Registers the single thread-safe native activity status listener.
* This handles the case where the caller is not on the main thread.

Powered by Google App Engine
This is Rietveld 408576698