|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: fgei <fgei@gmail.com> |
| 3 | +Date: Tue, 18 Mar 2025 15:43:00 +0000 |
| 4 | +Subject: [PATCH] tmp: Disable functionalities dependent on Play services |
| 5 | + dynamite features |
| 6 | + |
| 7 | +--- |
| 8 | + .../shape_detection/BarcodeDetectionProviderImpl.java | 5 +++++ |
| 9 | + .../src/org/chromium/shape_detection/TextDetectionImpl.java | 5 +++++ |
| 10 | + 2 files changed, 10 insertions(+) |
| 11 | + |
| 12 | +diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionProviderImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionProviderImpl.java |
| 13 | +index bfa0c88679ff9..b806009bd0ebd 100644 |
| 14 | +--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionProviderImpl.java |
| 15 | ++++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionProviderImpl.java |
| 16 | +@@ -69,6 +69,11 @@ public class BarcodeDetectionProviderImpl implements BarcodeDetectionProvider { |
| 17 | + Log.w(TAG, "Google Play Services not available"); |
| 18 | + return null; |
| 19 | + } |
| 20 | ++ boolean shouldAlwaysDisable = true; |
| 21 | ++ if (shouldAlwaysDisable) { |
| 22 | ++ Log.i(TAG, "Barcode detection always disabled"); |
| 23 | ++ return null; |
| 24 | ++ } |
| 25 | + int version = |
| 26 | + PackageUtils.getPackageVersion(GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE); |
| 27 | + if (version < 19742000) { |
| 28 | +diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java |
| 29 | +index 4e2a322b8df31..7bb65eb5ee002 100644 |
| 30 | +--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java |
| 31 | ++++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java |
| 32 | +@@ -93,6 +93,11 @@ public class TextDetectionImpl implements TextDetection { |
| 33 | + Log.e(TAG, "Google Play Services not available"); |
| 34 | + return null; |
| 35 | + } |
| 36 | ++ boolean shouldAlwaysDisable = true; |
| 37 | ++ if (shouldAlwaysDisable) { |
| 38 | ++ Log.i(TAG, "Text detection always disabled"); |
| 39 | ++ return null; |
| 40 | ++ } |
| 41 | + return new TextDetectionImpl(); |
| 42 | + } |
| 43 | + } |
0 commit comments