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

Unified Diff: services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.java

Issue 2897313002: Android: Simplify isTablet and InterfaceRegistrars (Closed)
Patch Set: Pull out local variable Created 3 years, 7 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: services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.java
diff --git a/services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.java b/services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.java
index bfbd08439cdd2757a4c4fb3cbb7c2efe834356de..f7f9e3ec684917b1302dfb787471771c0d9d0f43 100644
--- a/services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.java
+++ b/services/device/nfc/android/java/src/org/chromium/device/nfc/NfcProviderImpl.java
@@ -4,8 +4,6 @@
package org.chromium.device.nfc;
-import android.content.Context;
-
import org.chromium.device.mojom.Nfc;
import org.chromium.device.mojom.NfcProvider;
import org.chromium.mojo.bindings.InterfaceRequest;
@@ -17,11 +15,9 @@ import org.chromium.services.service_manager.InterfaceFactory;
*/
public class NfcProviderImpl implements NfcProvider {
private static final String TAG = "NfcProviderImpl";
- private Context mContext;
private NfcDelegate mDelegate;
- public NfcProviderImpl(Context context, NfcDelegate delegate) {
- mContext = context;
+ public NfcProviderImpl(NfcDelegate delegate) {
mDelegate = delegate;
}
@@ -33,24 +29,22 @@ public class NfcProviderImpl implements NfcProvider {
@Override
public void getNfcForHost(int hostId, InterfaceRequest<Nfc> request) {
- Nfc.MANAGER.bind(new NfcImpl(mContext, hostId, mDelegate), request);
+ Nfc.MANAGER.bind(new NfcImpl(hostId, mDelegate), request);
}
/**
* A factory for implementations of the NfcProvider interface.
*/
public static class Factory implements InterfaceFactory<NfcProvider> {
- private Context mContext;
private NfcDelegate mDelegate;
- public Factory(Context context, NfcDelegate delegate) {
- mContext = context;
+ public Factory(NfcDelegate delegate) {
mDelegate = delegate;
}
@Override
public NfcProvider createImpl() {
- return new NfcProviderImpl(mContext, mDelegate);
+ return new NfcProviderImpl(mDelegate);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698