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

Unified Diff: services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.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/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
index e0c8394777a985ecf56c6aa41cf96285a93df1e6..12f18dbb0c87a8528f74528b40015e5670a3f050 100644
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
@@ -4,7 +4,6 @@
package org.chromium.shape_detection;
-import android.content.Context;
import android.graphics.PointF;
import android.util.SparseArray;
@@ -13,6 +12,7 @@ import com.google.android.gms.vision.face.Face;
import com.google.android.gms.vision.face.FaceDetector;
import com.google.android.gms.vision.face.Landmark;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.gfx.mojom.RectF;
import org.chromium.mojo.system.MojoException;
@@ -36,8 +36,9 @@ public class FaceDetectionImplGmsCore implements FaceDetection {
private final boolean mFastMode;
private final FaceDetector mFaceDetector;
- FaceDetectionImplGmsCore(Context context, FaceDetectorOptions options) {
- FaceDetector.Builder builder = new FaceDetector.Builder(context);
+ FaceDetectionImplGmsCore(FaceDetectorOptions options) {
+ FaceDetector.Builder builder =
+ new FaceDetector.Builder(ContextUtils.getApplicationContext());
mMaxFaces = Math.min(options.maxDetectedFaces, MAX_FACES);
mFastMode = options.fastMode;

Powered by Google App Engine
This is Rietveld 408576698