| Index: services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/shapedetection/TextDetectionImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
|
| similarity index 93%
|
| rename from chrome/android/java/src/org/chromium/chrome/browser/shapedetection/TextDetectionImpl.java
|
| rename to services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
|
| index 2f4fab05161550ec61a1e58f917225984669db9f..d5fd2c5ce8e16bd2b9669e94077297143c473dde 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/shapedetection/TextDetectionImpl.java
|
| +++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
|
| @@ -2,20 +2,20 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -package org.chromium.chrome.browser.shapedetection;
|
| +package org.chromium.shape_detection;
|
|
|
| import android.content.Context;
|
| import android.graphics.Bitmap;
|
| import android.graphics.Rect;
|
| import android.util.SparseArray;
|
|
|
| +import com.google.android.gms.common.ConnectionResult;
|
| +import com.google.android.gms.common.GoogleApiAvailability;
|
| import com.google.android.gms.vision.Frame;
|
| import com.google.android.gms.vision.text.TextBlock;
|
| import com.google.android.gms.vision.text.TextRecognizer;
|
|
|
| import org.chromium.base.Log;
|
| -import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
|
| -import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
|
| import org.chromium.gfx.mojom.RectF;
|
| import org.chromium.mojo.system.MojoException;
|
| import org.chromium.mojo.system.SharedBufferHandle;
|
| @@ -43,8 +43,8 @@ public class TextDetectionImpl implements TextDetection {
|
| @Override
|
| public void detect(
|
| SharedBufferHandle frameData, int width, int height, DetectResponse callback) {
|
| - if (!ExternalAuthUtils.getInstance().canUseGooglePlayServices(
|
| - mContext, new UserRecoverableErrorHandler.Silent())) {
|
| + if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext)
|
| + != ConnectionResult.SUCCESS) {
|
| Log.e(TAG, "Google Play Services not available");
|
| callback.call(new TextDetectionResult[0]);
|
| return;
|
|
|