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 8818ce0ffe80aa130af2fe31b9a84122f4bce74e..e38271d379baa8086b2f7fad1d8e6d0b86e67c10 100644 |
--- a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java |
+++ b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java |
@@ -24,7 +24,7 @@ public class PlatformServiceBridge { |
protected PlatformServiceBridge() {} |
- public static PlatformServiceBridge getInstance(Context applicationContext) { |
+ public static PlatformServiceBridge getInstance(Context appContext) { |
if (sInstance != null) { |
return sInstance; |
} |
@@ -33,7 +33,7 @@ public class PlatformServiceBridge { |
try { |
Class<?> cls = Class.forName(PLATFORM_SERVICE_BRIDGE); |
sInstance = (PlatformServiceBridge) cls.getDeclaredConstructor(Context.class) |
- .newInstance(applicationContext); |
+ .newInstance(appContext); |
return sInstance; |
} catch (ClassNotFoundException e) { |
// This is not an error; it just means this device doesn't have specialized services. |
@@ -57,5 +57,9 @@ public class PlatformServiceBridge { |
return false; |
} |
- public void setMetricsSettingListener(ValueCallback<Boolean> callback) {} |
+ // Overriding implementations may call "callback" asynchronously, but they must still call |
gsennton
2017/01/04 10:09:55
So we will use this method by spawning a new threa
paulmiller
2017/01/04 18:12:41
You could do that. I don't. See the AwMetricsServi
gsennton
2017/01/04 18:35:04
Well, I think we (silent feedback) would want to w
paulmiller
2017/01/04 18:45:00
If the worker thread is persistent, yes, that woul
gsennton
2017/01/04 20:31:01
Oops, I meant waiting in the worker thread as in s
sgurun-gerrit only
2017/01/04 20:33:05
As far as I remember GMSCore always calls you back
paulmiller
2017/01/04 22:26:12
By default, GMS calls back on the app's UI thread.
|
+ // "callback" on the same thread on which "queryMetricsEnabled" was called. |
+ public void queryMetricsEnabled(ValueCallback<Boolean> callback) { |
sgurun-gerrit only
2017/01/04 00:05:24
I prefer allowMetricsService() as the method name.
paulmiller
2017/01/04 00:10:15
Why is that? That sounds like we're setting someth
sgurun-gerrit only
2017/01/04 00:31:53
queryMetricsValue could be better choice. queryMet
paulmiller
2017/01/04 00:54:40
How about "queryMetricsSetting"? That's slightly m
|
+ callback.onReceiveValue(false); |
+ } |
} |