Index: services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java |
diff --git a/services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java b/services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java |
index 62347c5f9d00c99ad7bd4ad1521fac9afdbbbc13..607532bcd6cd994526a84db8676fa1c17cc86d27 100644 |
--- a/services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java |
+++ b/services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java |
@@ -6,6 +6,7 @@ package org.chromium.services.device; |
import android.content.Context; |
+import org.chromium.base.ContextUtils; |
import org.chromium.base.annotations.CalledByNative; |
import org.chromium.base.annotations.JNINamespace; |
import org.chromium.device.battery.BatteryMonitorFactory; |
@@ -22,9 +23,11 @@ import org.chromium.services.service_manager.InterfaceRegistry; |
class InterfaceRegistrar { |
@CalledByNative |
static void createInterfaceRegistryForContext( |
- int nativeHandle, Context applicationContext, NfcDelegate nfcDelegate) { |
+ int nativeHandle, NfcDelegate nfcDelegate) { |
// Note: The bindings code manages the lifetime of this object, so it |
// is not necessary to hold on to a reference to it explicitly. |
+ // TODO(wnwen): Move calls to ContextUtils down to the individual factories. |
+ Context applicationContext = ContextUtils.getApplicationContext(); |
InterfaceRegistry registry = InterfaceRegistry.create( |
CoreImpl.getInstance().acquireNativeHandle(nativeHandle).toMessagePipeHandle()); |
registry.addInterface( |