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

Unified Diff: android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java

Issue 2801033002: Revert of Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: 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: android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
diff --git a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
index 7957e96e4f5a496dfce8b0cd7d105bdc0858867a..36f70f11f746a1fd9cfb35506538208fa1fa654d 100644
--- a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
+++ b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
@@ -7,7 +7,6 @@
import android.content.Context;
import android.webkit.ValueCallback;
-import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
@@ -28,7 +27,7 @@
protected PlatformServiceBridge() {}
- public static PlatformServiceBridge getOrCreateInstance() {
+ public static PlatformServiceBridge getOrCreateInstance(Context context) {
// Just to avoid race conditions on sInstance - nothing special about the UI thread.
ThreadUtils.assertOnUiThread();
@@ -38,7 +37,7 @@
try {
Class<?> cls = Class.forName(PLATFORM_SERVICE_BRIDGE);
sInstance = (PlatformServiceBridge) cls.getDeclaredConstructor(Context.class)
- .newInstance(ContextUtils.getApplicationContext());
+ .newInstance(context);
return sInstance;
} catch (ClassNotFoundException e) {
// This is not an error; it just means this device doesn't have specialized

Powered by Google App Engine
This is Rietveld 408576698