| 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;
|
|
|
|
|