4218 lines
193 KiB
Diff
4218 lines
193 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Mon, 5 Apr 2021 21:37:12 +0200
|
|
Subject: Remove binary blob integrations
|
|
|
|
Remove dependency on com.google.android.gms.auth
|
|
kill GCM
|
|
Remove dependency on com.google.android.gcm
|
|
Remove dependency on com.google.android.gms.gcm
|
|
It also disables Snippets, auto-update of offline pages and launching browser from background service.
|
|
The snippets are already disabled in native codes, this will disable it on Java level.
|
|
|
|
Remove dependency on com.google.android.play
|
|
Remove dependency on vision, clearcut and phenotype
|
|
Remove dependency on flags, places and stats
|
|
Remove dependency on fido, iid, instantapps, location
|
|
Remove dependency on com.google.android.gms.cast
|
|
Remove dependency on auth, signin, dynamic and tasks
|
|
Remove google_services_gcm
|
|
ungoogled-chromium: Disable GCM
|
|
Disable Google Cloud Messaging (GCM) client
|
|
Disable web authentication phone support
|
|
|
|
Parts of this patch were developed by csagan5, uazo and others.
|
|
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
...em_webview_bundle.AndroidManifest.expected | 5 -
|
|
build/android/gyp/proguard.py | 2 +
|
|
build/config/android/config.gni | 4 +-
|
|
chrome/android/BUILD.gn | 48 +-
|
|
chrome/android/chrome_java_sources.gni | 5 -
|
|
.../features/cablev2_authenticator/BUILD.gn | 2 -
|
|
chrome/android/java/AndroidManifest.xml | 51 --
|
|
.../org/chromium/chrome/browser/AppHooks.java | 9 +-
|
|
.../browser/ChromeBackgroundService.java | 11 +-
|
|
.../browser/PlayServicesVersionInfo.java | 11 +-
|
|
.../ChromeBackgroundTaskFactory.java | 3 -
|
|
.../gcore/ChromeGoogleApiClientImpl.java | 25 +-
|
|
.../browser/gcore/GoogleApiClientHelper.java | 82 +--
|
|
.../instantapps/InstantAppsHandler.java | 6 +-
|
|
.../browser/omaha/UpdateStatusProvider.java | 2 -
|
|
.../settings/PasswordSettings.java | 9 -
|
|
.../modules/chrome_feature_modules.gni | 3 -
|
|
chrome/browser/language/android/BUILD.gn | 3 -
|
|
.../language/AppLanguagePromoDialog.java | 23 -
|
|
.../language/settings/LanguageSettings.java | 6 -
|
|
.../browser/password_manager/android/BUILD.gn | 4 -
|
|
.../PasswordManagerAndroidBackendUtil.java | 38 +-
|
|
.../PasswordManagerHelper.java | 20 +-
|
|
...swordSyncControllerDelegateBridgeImpl.java | 7 -
|
|
.../push_messaging_service_factory.cc | 8 +-
|
|
chrome/browser/resources/settings/route.ts | 2 -
|
|
chrome/browser/ui/BUILD.gn | 3 -
|
|
.../ui/signin/fre/SigninFirstRunMediator.java | 8 +-
|
|
chrome/browser/ui/webauthn/sheet_models.cc | 7 +-
|
|
.../webui/chrome_web_ui_controller_factory.cc | 3 -
|
|
chrome/browser/webauthn/android/BUILD.gn | 1 -
|
|
.../CableAuthenticatorModuleProvider.java | 23 +-
|
|
.../authenticator_request_dialog_model.cc | 4 -
|
|
chrome/browser/webauthn/cablev2_devices.cc | 3 +
|
|
chrome/test/android/BUILD.gn | 2 -
|
|
.../ExternalNavigationHandler.java | 8 -
|
|
components/externalauth/android/BUILD.gn | 3 -
|
|
.../externalauth/ExternalAuthUtils.java | 19 +-
|
|
.../UserRecoverableErrorHandler.java | 7 -
|
|
.../gcm_driver/GoogleCloudMessagingV2.java | 2 +
|
|
components/gcm_driver/gcm_client_impl.cc | 4 +
|
|
.../gcm_driver/instance_id/android/BUILD.gn | 3 -
|
|
.../instance_id/InstanceIDBridge.java | 47 +-
|
|
.../media_router/browser/android/BUILD.gn | 11 -
|
|
.../media_router/BrowserMediaRouter.java | 18 +-
|
|
.../components/media_router/MediaSink.java | 44 +-
|
|
.../media_router/MediaStatusBridge.java | 40 +-
|
|
.../caf/BaseNotificationController.java | 53 --
|
|
.../caf/BaseSessionController.java | 100 +--
|
|
.../caf/CafBaseMediaRouteProvider.java | 103 +---
|
|
.../caf/CafMediaRouteProvider.java | 16 -
|
|
.../media_router/caf/CafMessageHandler.java | 97 +--
|
|
.../media_router/caf/CastMediaSource.java | 10 +-
|
|
.../media_router/caf/CastOptionsProvider.java | 22 +-
|
|
.../caf/CastSessionController.java | 84 ---
|
|
.../media_router/caf/CastUtils.java | 8 -
|
|
.../CafExpandedControllerActivity.java | 35 +-
|
|
.../CafRemotingMediaRouteProvider.java | 4 +-
|
|
.../remoting/FlingingControllerAdapter.java | 74 ---
|
|
.../caf/remoting/RemotingMediaSource.java | 8 +-
|
|
.../remoting/RemotingSessionController.java | 26 -
|
|
.../test/android/cast_emulator/BUILD.gn | 1 -
|
|
components/module_installer/android/BUILD.gn | 4 -
|
|
components/signin/public/android/BUILD.gn | 3 -
|
|
.../signin/AccountRenameChecker.java | 16 -
|
|
components/webauthn/android/BUILD.gn | 12 -
|
|
.../webauthn/AuthenticatorImpl.java | 93 +--
|
|
.../webauthn/CredManMetricsHelper.java | 17 -
|
|
.../webauthn/Fido2ApiCallHelper.java | 58 +-
|
|
.../push_messaging/push_messaging_manager.cc | 2 +-
|
|
content/public/android/BUILD.gn | 4 -
|
|
content/test/BUILD.gn | 4 -
|
|
device/BUILD.gn | 3 -
|
|
remoting/android/client_java_tmpl.gni | 3 -
|
|
services/BUILD.gn | 9 -
|
|
services/device/geolocation/BUILD.gn | 4 -
|
|
services/shape_detection/BUILD.gn | 2 -
|
|
third_party/android_deps/BUILD.gn | 570 +-----------------
|
|
.../preconditions/javatests/BUILD.gn | 1 -
|
|
.../gms/ChromiumPlayServicesAvailability.java | 10 +-
|
|
third_party/cardboard/BUILD.gn | 4 -
|
|
81 files changed, 97 insertions(+), 2012 deletions(-)
|
|
|
|
diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
|
--- a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
|
+++ b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
|
@@ -22,10 +22,6 @@
|
|
android:icon="@$PACKAGE:drawable/icon_webview"
|
|
android:label="Android System WebView"
|
|
android:multiArch="true">
|
|
- <activity # DIFF-ANCHOR: ea1a94af
|
|
- android:name="com.google.android.gms.common.api.GoogleApiActivity"
|
|
- android:exported="false"
|
|
- android:theme="@android:style/Theme.Translucent.NoTitleBar">
|
|
</activity> # DIFF-ANCHOR: ea1a94af
|
|
<activity # DIFF-ANCHOR: a4438884
|
|
android:name="org.chromium.android_webview.devui.MainActivity"
|
|
@@ -69,7 +65,6 @@
|
|
android:visibleToInstantApps="true">
|
|
</activity-alias> # DIFF-ANCHOR: b7cc06e9
|
|
<meta-data android:name="$PACKAGE.WebViewLibrary" android:value="libwebviewchromium.so"/>
|
|
- <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
|
|
<meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/>
|
|
<meta-data android:name="org.chromium.content.browser.NUM_SANDBOXED_SERVICES" android:value="40"/>
|
|
<provider # DIFF-ANCHOR: a5e78e63
|
|
diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py
|
|
--- a/build/android/gyp/proguard.py
|
|
+++ b/build/android/gyp/proguard.py
|
|
@@ -52,6 +52,8 @@ _IGNORE_WARNINGS = (
|
|
r'EditorDialogToolbar',
|
|
# https://crbug.com/1441226
|
|
r'PaymentRequest[BH]',
|
|
+ # com.google.android.gms.cast is stripped down from the build
|
|
+ r'class com\.google\.android\.gms\.',
|
|
]) + ')',
|
|
# TODO(agrieve): Remove once we update to U SDK.
|
|
r'OnBackAnimationCallback',
|
|
diff --git a/build/config/android/config.gni b/build/config/android/config.gni
|
|
--- a/build/config/android/config.gni
|
|
+++ b/build/config/android/config.gni
|
|
@@ -170,9 +170,7 @@ if (is_android || is_chromeos) {
|
|
|
|
# google_play_services_package contains the path where individual client
|
|
# targets (e.g. google_play_services_base_java) are located.
|
|
- if (!defined(google_play_services_package)) {
|
|
- google_play_services_package = "//third_party/android_deps"
|
|
- }
|
|
+ google_play_services_package = ""
|
|
|
|
if (!defined(android_protoc_bin)) {
|
|
android_protoc_bin = "//third_party/android_protoc/protoc"
|
|
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
|
--- a/chrome/android/BUILD.gn
|
|
+++ b/chrome/android/BUILD.gn
|
|
@@ -291,14 +291,6 @@ if (current_toolchain == default_toolchain) {
|
|
":google_api_keys_java",
|
|
":update_proto_java",
|
|
":usage_stats_proto_java",
|
|
- "$google_play_services_package:google_play_services_auth_base_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
- "$google_play_services_package:google_play_services_gcm_java",
|
|
- "$google_play_services_package:google_play_services_iid_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:jni_java",
|
|
"//cc:cc_java",
|
|
"//cc/mojom:mojom_java",
|
|
@@ -624,14 +616,23 @@ if (current_toolchain == default_toolchain) {
|
|
"//services/shape_detection:shape_detection_java",
|
|
"//services/shape_detection/public/mojom:mojom_java",
|
|
"//skia/public/mojom:mojom_java",
|
|
+ # added for Bromite in place of binary blobs
|
|
+ "//third_party/androidx:androidx_annotation_annotation_java",
|
|
+ "//third_party/androidx:androidx_lifecycle_lifecycle_common_java",
|
|
+ "//third_party/androidx:androidx_appcompat_appcompat_java",
|
|
+ "//third_party/androidx:androidx_fragment_fragment_java",
|
|
+ "//third_party/androidx:androidx_core_core_java",
|
|
+ "//third_party/androidx:androidx_media_media_java",
|
|
+ "//third_party/androidx:androidx_recyclerview_recyclerview_java",
|
|
+ "//third_party/androidx:androidx_vectordrawable_vectordrawable_java",
|
|
+ "//base:base_java",
|
|
+ "//base:jni_java",
|
|
+
|
|
"//third_party/android_deps:chromium_play_services_availability_java",
|
|
- "//third_party/android_deps:com_google_code_findbugs_jsr305_java",
|
|
- "//third_party/android_deps:com_google_guava_listenablefuture_java",
|
|
"//third_party/android_deps:dagger_java",
|
|
"//third_party/android_deps:guava_android_java",
|
|
"//third_party/android_deps:javax_inject_javax_inject_java",
|
|
"//third_party/android_deps:material_design_java",
|
|
- "//third_party/android_deps:playcore_java",
|
|
"//third_party/android_deps:protobuf_lite_runtime_java",
|
|
"//third_party/android_media:android_media_java",
|
|
"//third_party/android_swipe_refresh:android_swipe_refresh_java",
|
|
@@ -914,12 +915,6 @@ if (current_toolchain == default_toolchain) {
|
|
":chrome_jni_headers",
|
|
":chrome_unit_test_util_java",
|
|
":delegate_public_impl_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
- "$google_play_services_package:google_play_services_gcm_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_java_test_support_uncommon",
|
|
"//base:base_junit_test_support",
|
|
@@ -1536,13 +1531,6 @@ if (current_toolchain == default_toolchain) {
|
|
":chrome_app_java_resources",
|
|
":chrome_test_util_java",
|
|
":delegate_public_impl_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
- "$google_play_services_package:google_play_services_gcm_java",
|
|
- "$google_play_services_package:google_play_services_iid_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_java_test_support_uncommon",
|
|
@@ -2458,7 +2446,6 @@ if (current_toolchain == default_toolchain) {
|
|
]
|
|
deps = [
|
|
":chrome_java",
|
|
- "$google_play_services_package:google_play_services_gcm_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:jni_java",
|
|
@@ -2552,7 +2539,6 @@ if (current_toolchain == default_toolchain) {
|
|
# is in a DFM.
|
|
android_library("base_module_java") {
|
|
sources = [
|
|
- "java/src/com/google/ipc/invalidation/ticl/android2/channel/GcmRegistrationTaskService.java",
|
|
"java/src/org/chromium/chrome/app/TrichromeZygotePreload.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeBackgroundService.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
|
|
@@ -2569,8 +2555,6 @@ if (current_toolchain == default_toolchain) {
|
|
"java/src/org/chromium/chrome/browser/base/SplitCompatBackupAgent.java",
|
|
"java/src/org/chromium/chrome/browser/base/SplitCompatContentProvider.java",
|
|
"java/src/org/chromium/chrome/browser/base/SplitCompatCustomTabsService.java",
|
|
- "java/src/org/chromium/chrome/browser/base/SplitCompatGcmListenerService.java",
|
|
- "java/src/org/chromium/chrome/browser/base/SplitCompatGcmTaskService.java",
|
|
"java/src/org/chromium/chrome/browser/base/SplitCompatIntentService.java",
|
|
"java/src/org/chromium/chrome/browser/base/SplitCompatJobService.java",
|
|
"java/src/org/chromium/chrome/browser/base/SplitCompatMinidumpUploadJobService.java",
|
|
@@ -2593,17 +2577,11 @@ if (current_toolchain == default_toolchain) {
|
|
"java/src/org/chromium/chrome/browser/notifications/NotificationService.java",
|
|
"java/src/org/chromium/chrome/browser/photo_picker/DecoderService.java",
|
|
"java/src/org/chromium/chrome/browser/provider/ChromeBrowserProvider.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundService.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java",
|
|
"java/src/org/chromium/chrome/browser/tracing/TracingNotificationService.java",
|
|
"java/src/org/chromium/chrome/browser/webapps/WebApkInstallCoordinatorService.java",
|
|
]
|
|
deps = [
|
|
":chrome_base_module_resources",
|
|
- "$google_play_services_package:google_firebase_firebase_iid_java",
|
|
- "$google_play_services_package:google_firebase_firebase_messaging_java",
|
|
- "$google_play_services_package:google_play_services_gcm_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//chrome/browser/download/android:file_provider_java",
|
|
@@ -2617,7 +2595,6 @@ if (current_toolchain == default_toolchain) {
|
|
"//components/media_router/browser/android:cast_options_provider_java",
|
|
"//components/minidump_uploader:minidump_uploader_java",
|
|
"//components/module_installer/android:module_installer_java",
|
|
- "//third_party/android_deps:playcore_java",
|
|
"//third_party/androidx:androidx_annotation_annotation_java",
|
|
"//third_party/androidx:androidx_collection_collection_java",
|
|
"//ui/android:ui_no_recycler_view_java",
|
|
@@ -2636,7 +2613,6 @@ if (current_toolchain == default_toolchain) {
|
|
# Deps to pull services into base module.
|
|
# TODO(crbug.com/1126301): Consider moving these to the chrome module to
|
|
# reduce base dex size.
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
"//components/background_task_scheduler:background_task_scheduler_java",
|
|
"//components/payments/content/android:service_java",
|
|
"//third_party/androidx:androidx_browser_browser_java",
|
|
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
|
--- a/chrome/android/chrome_java_sources.gni
|
|
+++ b/chrome/android/chrome_java_sources.gni
|
|
@@ -15,7 +15,6 @@ chrome_java_sources = [
|
|
"java/src/org/chromium/chrome/browser/ChromeActionModeHandler.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeApplicationImpl.java",
|
|
- "java/src/org/chromium/chrome/browser/ChromeBackgroundServiceImpl.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
|
|
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
|
|
@@ -1003,10 +1002,6 @@ chrome_java_sources = [
|
|
"java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProvider.java",
|
|
"java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulator.java",
|
|
"java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerServiceImpl.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundServiceImpl.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java",
|
|
- "java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java",
|
|
"java/src/org/chromium/chrome/browser/settings/MainSettings.java",
|
|
"java/src/org/chromium/chrome/browser/settings/SettingsActivity.java",
|
|
"java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java",
|
|
diff --git a/chrome/android/features/cablev2_authenticator/BUILD.gn b/chrome/android/features/cablev2_authenticator/BUILD.gn
|
|
--- a/chrome/android/features/cablev2_authenticator/BUILD.gn
|
|
+++ b/chrome/android/features/cablev2_authenticator/BUILD.gn
|
|
@@ -17,8 +17,6 @@ android_library("java") {
|
|
|
|
deps = [
|
|
":java_resources",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
|
|
--- a/chrome/android/java/AndroidManifest.xml
|
|
+++ b/chrome/android/java/AndroidManifest.xml
|
|
@@ -122,19 +122,14 @@ by a child template that "extends" this file.
|
|
<permission android:name="{{ manifest_package }}.permission.CHILD_SERVICE" android:protectionLevel="signature" />
|
|
<permission android:name="{{ manifest_package }}.permission.READ_WRITE_BOOKMARK_FOLDERS" android:protectionLevel="signatureOrSystem" />
|
|
<permission android:name="{{ manifest_package }}.TOS_ACKED" android:protectionLevel="signatureOrSystem" />
|
|
- <!-- Only chrome can receive the messages and registration result -->
|
|
- <permission android:name="{{ manifest_package }}.permission.C2D_MESSAGE"
|
|
- android:protectionLevel="signature" />
|
|
<permission android:name="{{ manifest_package }}.permission.DEBUG"
|
|
android:label="Debug web pages"
|
|
android:protectionLevel="signature" />
|
|
|
|
- <uses-permission android:name="{{ manifest_package }}.permission.C2D_MESSAGE" />
|
|
<uses-permission android:name="{{ manifest_package }}.permission.READ_WRITE_BOOKMARK_FOLDERS" />
|
|
<uses-permission android:name="{{ manifest_package }}.TOS_ACKED" />
|
|
|
|
<uses-permission android:name="com.chrome.permission.DEVICE_EXTRAS" />
|
|
- <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
|
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
|
|
|
|
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
|
|
@@ -785,16 +780,6 @@ by a child template that "extends" this file.
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
- <activity android:name="org.chromium.components.media_router.caf.remoting.CafExpandedControllerActivity"
|
|
- android:theme="@style/Theme.Chromium.Activity"
|
|
- android:label="Chrome.CafExpandedControllerActivity"
|
|
- android:hardwareAccelerated="true"
|
|
- android:launchMode="singleTask"
|
|
- android:noHistory="true"
|
|
- android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
|
|
- android:excludeFromRecents="true">
|
|
- </activity>
|
|
-
|
|
<!-- This activity is used to restart the main Chrome process. Should never be exported. -->
|
|
<activity android:name="org.chromium.chrome.browser.BrowserRestartActivity"
|
|
android:launchMode="singleInstance"
|
|
@@ -985,26 +970,6 @@ by a child template that "extends" this file.
|
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
|
|
android:hardwareAccelerated="false" />
|
|
|
|
- <!-- GcmTaskService for registration for Invalidations. Not actually implemented anymore. -->
|
|
- <service android:name="com.google.ipc.invalidation.ticl.android2.channel.GcmRegistrationTaskService"
|
|
- android:exported="true"
|
|
- android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE" >
|
|
- <intent-filter>
|
|
- <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY"/>
|
|
- </intent-filter>
|
|
- </service>
|
|
- <!-- GcmListenerService for messages from GCM. -->
|
|
- <service android:name="org.chromium.chrome.browser.services.gcm.ChromeGcmListenerService"
|
|
- android:exported="false" >
|
|
- <intent-filter>
|
|
- <action android:name="com.google.firebase.MESSAGING_EVENT" />
|
|
- </intent-filter>
|
|
- </service>
|
|
- <service android:name="org.chromium.chrome.browser.services.gcm.GCMBackgroundService"
|
|
- android:exported="false"/>
|
|
- <service android:name="org.chromium.chrome.browser.services.gcm.InvalidationGcmUpstreamSender"
|
|
- android:exported="false"/>
|
|
-
|
|
<!-- Android Notification service listener -->
|
|
<service android:name="org.chromium.chrome.browser.notifications.NotificationService"
|
|
android:exported="false"/>
|
|
@@ -1035,20 +1000,10 @@ by a child template that "extends" this file.
|
|
<service android:name="org.chromium.components.background_task_scheduler.internal.BackgroundTaskJobService"
|
|
android:exported="false"
|
|
android:permission="android.permission.BIND_JOB_SERVICE"/>
|
|
-
|
|
<!-- Background Task Scheduler alarm receiver -->
|
|
<receiver android:name="org.chromium.components.background_task_scheduler.internal.BackgroundTaskBroadcastReceiver"
|
|
android:exported="false" />
|
|
|
|
- <!-- GcmTaskService implementation to wake Chrome on scheduled events -->
|
|
- <service android:name="org.chromium.chrome.browser.ChromeBackgroundService"
|
|
- android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
|
|
- android:exported="true">
|
|
- <intent-filter>
|
|
- <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY" />
|
|
- </intent-filter>
|
|
- </service>
|
|
-
|
|
<service android:name="org.chromium.chrome.browser.customtabs.CustomTabsConnectionService"
|
|
android:exported="true"
|
|
tools:ignore="ExportedService">
|
|
@@ -1299,12 +1254,6 @@ by a child template that "extends" this file.
|
|
|
|
{% endif %}
|
|
|
|
- <!-- Cast support -->
|
|
- <meta-data
|
|
- android:name=
|
|
- "com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
|
|
- android:value="org.chromium.components.media_router.caf.CastOptionsProvider"/>
|
|
-
|
|
<!-- These providers are declared in the base module to give the chrome
|
|
split preloader more time to work. -->
|
|
<provider android:name="org.chromium.chrome.browser.util.ChromeFileProvider"
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
|
|
@@ -6,9 +6,6 @@ package org.chromium.chrome.browser;
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.base.PackageUtils;
|
|
import org.chromium.base.ResettersForTesting;
|
|
@@ -215,11 +212,7 @@ public abstract class AppHooks {
|
|
* same as {@link GoogleApiAvailability#isGooglePlayServicesAvailable()}.
|
|
*/
|
|
public int isGoogleApiAvailableWithMinApkVersion(int minApkVersion) {
|
|
- int apkVersion =
|
|
- PackageUtils.getPackageVersion(GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE);
|
|
- return apkVersion < 0 ? ConnectionResult.SERVICE_MISSING
|
|
- : apkVersion < minApkVersion ? ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED
|
|
- : ConnectionResult.SUCCESS;
|
|
+ return 1; /* SERVICE_MISSING*/
|
|
}
|
|
|
|
/**
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
|
|
@@ -4,15 +4,6 @@
|
|
|
|
package org.chromium.chrome.browser;
|
|
|
|
-import org.chromium.build.annotations.IdentifierNameString;
|
|
-import org.chromium.chrome.browser.base.SplitCompatGcmTaskService;
|
|
-
|
|
/** See {@link ChromeBackgroundServiceImpl}. */
|
|
-public class ChromeBackgroundService extends SplitCompatGcmTaskService {
|
|
- private static @IdentifierNameString String sImplClassName =
|
|
- "org.chromium.chrome.browser.ChromeBackgroundServiceImpl";
|
|
-
|
|
- public ChromeBackgroundService() {
|
|
- super(sImplClassName);
|
|
- }
|
|
+public class ChromeBackgroundService {
|
|
}
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVersionInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVersionInfo.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVersionInfo.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVersionInfo.java
|
|
@@ -4,8 +4,6 @@
|
|
|
|
package org.chromium.chrome.browser;
|
|
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-
|
|
import org.chromium.base.PackageUtils;
|
|
import org.chromium.base.annotations.CalledByNative;
|
|
import org.chromium.components.externalauth.ExternalAuthUtils;
|
|
@@ -24,7 +22,7 @@ public class PlayServicesVersionInfo {
|
|
*/
|
|
@CalledByNative
|
|
public static String getGmsInfo() {
|
|
- final long sdkVersion = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
|
+ final long sdkVersion = 12600000;
|
|
final long installedGmsVersion = getApkVersionNumber();
|
|
|
|
final String accessType;
|
|
@@ -48,11 +46,6 @@ public class PlayServicesVersionInfo {
|
|
* package is not found.
|
|
*/
|
|
public static int getApkVersionNumber() {
|
|
- int ret =
|
|
- PackageUtils.getPackageVersion(GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE);
|
|
- if (ret < 0) {
|
|
- ret = 0;
|
|
- }
|
|
- return ret;
|
|
+ return 0;
|
|
}
|
|
}
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
|
|
@@ -13,7 +13,6 @@ import org.chromium.chrome.browser.notifications.NotificationTriggerBackgroundTa
|
|
import org.chromium.chrome.browser.notifications.scheduler.NotificationSchedulerTask;
|
|
import org.chromium.chrome.browser.offlinepages.OfflineBackgroundTask;
|
|
import org.chromium.chrome.browser.omaha.OmahaService;
|
|
-import org.chromium.chrome.browser.services.gcm.GCMBackgroundTask;
|
|
import org.chromium.chrome.browser.webapps.WebApkUpdateTask;
|
|
import org.chromium.components.background_task_scheduler.BackgroundTask;
|
|
import org.chromium.components.background_task_scheduler.BackgroundTaskFactory;
|
|
@@ -54,8 +53,6 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory {
|
|
switch (taskId) {
|
|
case TaskIds.OMAHA_JOB_ID:
|
|
return new OmahaService();
|
|
- case TaskIds.GCM_BACKGROUND_TASK_JOB_ID:
|
|
- return new GCMBackgroundTask();
|
|
case TaskIds.OFFLINE_PAGES_BACKGROUND_JOB_ID:
|
|
return new OfflineBackgroundTask();
|
|
case TaskIds.DOWNLOAD_SERVICE_JOB_ID:
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
|
|
@@ -6,9 +6,6 @@ package org.chromium.chrome.browser.gcore;
|
|
|
|
import android.content.Context;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.api.GoogleApiClient;
|
|
-
|
|
import org.chromium.base.Log;
|
|
import org.chromium.base.TraceEvent;
|
|
import org.chromium.components.externalauth.ExternalAuthUtils;
|
|
@@ -22,7 +19,6 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
|
|
private static final String TAG = "Icing";
|
|
|
|
private final Context mApplicationContext;
|
|
- private final GoogleApiClient mClient;
|
|
private final ExternalAuthUtils mExternalAuthUtils;
|
|
|
|
/**
|
|
@@ -32,10 +28,9 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
|
|
* @param requireFirstPartyBuild true if the given client can only be used in a first-party
|
|
* build.
|
|
*/
|
|
- public ChromeGoogleApiClientImpl(Context context, GoogleApiClient client,
|
|
+ public ChromeGoogleApiClientImpl(Context context,
|
|
boolean requireFirstPartyBuild) {
|
|
mApplicationContext = context.getApplicationContext();
|
|
- mClient = client;
|
|
mExternalAuthUtils = ExternalAuthUtils.getInstance();
|
|
if (requireFirstPartyBuild && !mExternalAuthUtils.isChromeGoogleSigned()) {
|
|
throw new IllegalStateException("GoogleApiClient requires first-party build");
|
|
@@ -44,7 +39,6 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
|
|
|
|
@Override
|
|
public void disconnect() {
|
|
- mClient.disconnect();
|
|
}
|
|
|
|
@Override
|
|
@@ -60,24 +54,11 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
|
|
@Override
|
|
public boolean connectWithTimeout(long timeout) {
|
|
TraceEvent.begin("ChromeGoogleApiClientImpl:connectWithTimeout");
|
|
- try {
|
|
- ConnectionResult result = mClient.blockingConnect(timeout, TimeUnit.MILLISECONDS);
|
|
- if (!result.isSuccess()) {
|
|
- Log.e(TAG, "Connection to GmsCore unsuccessful. Error %d", result.getErrorCode());
|
|
- } else {
|
|
- Log.d(TAG, "Connection to GmsCore successful.");
|
|
- }
|
|
- return result.isSuccess();
|
|
- } finally {
|
|
- TraceEvent.end("ChromeGoogleApiClientImpl:connectWithTimeout");
|
|
- }
|
|
+ TraceEvent.end("ChromeGoogleApiClientImpl:connectWithTimeout");
|
|
+ return false;
|
|
}
|
|
|
|
public Context getApplicationContext() {
|
|
return mApplicationContext;
|
|
}
|
|
-
|
|
- public GoogleApiClient getApiClient() {
|
|
- return mClient;
|
|
- }
|
|
}
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java
|
|
@@ -7,11 +7,6 @@ package org.chromium.chrome.browser.gcore;
|
|
import android.os.Bundle;
|
|
import android.os.Handler;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.api.GoogleApiClient;
|
|
-import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
|
|
-import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
|
|
-
|
|
import org.chromium.base.ApplicationStatus;
|
|
import org.chromium.base.ApplicationStatus.ApplicationStateListener;
|
|
import org.chromium.base.Log;
|
|
@@ -67,29 +62,15 @@ import org.chromium.base.ThreadUtils;
|
|
* }
|
|
* </pre>
|
|
*/
|
|
-public class GoogleApiClientHelper
|
|
- implements OnConnectionFailedListener, ConnectionCallbacks {
|
|
+public class GoogleApiClientHelper {
|
|
private static final String TAG = "GCore";
|
|
|
|
private int mResolutionAttempts;
|
|
private boolean mWasConnectedBefore;
|
|
private final Handler mHandler = new Handler(ThreadUtils.getUiThreadLooper());
|
|
- private final GoogleApiClient mClient;
|
|
private long mDisconnectionDelayMs;
|
|
private Runnable mPendingDisconnect;
|
|
|
|
- /**
|
|
- * Creates a helper and enrolls it in the various connection management features.
|
|
- * See the class documentation for {@link GoogleApiClientHelper} for more information.
|
|
- *
|
|
- * @param client The client to wrap.
|
|
- */
|
|
- public GoogleApiClientHelper(GoogleApiClient client) {
|
|
- mClient = client;
|
|
- enableConnectionRetrying(true);
|
|
- enableLifecycleManagement(true);
|
|
- }
|
|
-
|
|
/**
|
|
* Opts in or out of lifecycle management. The client's connection will be closed and reopened
|
|
* when Chrome goes in and out of background.
|
|
@@ -116,13 +97,6 @@ public class GoogleApiClientHelper
|
|
* Enabling or disabling it while it is already enabled or disabled has no effect.
|
|
*/
|
|
public void enableConnectionRetrying(boolean enabled) {
|
|
- if (enabled) {
|
|
- mClient.registerConnectionCallbacks(this);
|
|
- mClient.registerConnectionFailedListener(this);
|
|
- } else {
|
|
- mClient.unregisterConnectionCallbacks(this);
|
|
- mClient.unregisterConnectionFailedListener(this);
|
|
- }
|
|
}
|
|
|
|
/**
|
|
@@ -155,21 +129,11 @@ public class GoogleApiClientHelper
|
|
// Cancel and reschedule the disconnection if we are in the background. We do it early to
|
|
// avoid race conditions between a disconnect on the UI thread and the connect below.
|
|
if (!ApplicationStatus.hasVisibleActivities()) scheduleDisconnection();
|
|
-
|
|
- // The client might be disconnected if we were idle in the background for too long.
|
|
- if (!mClient.isConnected() && !mClient.isConnecting()) {
|
|
- Log.d(TAG, "Reconnecting the client.");
|
|
- mClient.connect();
|
|
- }
|
|
}
|
|
|
|
void restoreConnectedState() {
|
|
// If we go back to the foreground before a delayed disconnect happens, cancel it.
|
|
cancelPendingDisconnection();
|
|
-
|
|
- if (mWasConnectedBefore) {
|
|
- mClient.connect();
|
|
- }
|
|
}
|
|
|
|
/**
|
|
@@ -192,12 +156,6 @@ public class GoogleApiClientHelper
|
|
}
|
|
|
|
private void disconnect() {
|
|
- if (mClient.isConnected() || mClient.isConnecting()) {
|
|
- mWasConnectedBefore = true;
|
|
- }
|
|
-
|
|
- // We always call disconnect to abort possibly pending connection requests.
|
|
- mClient.disconnect();
|
|
}
|
|
|
|
private void cancelPendingDisconnection() {
|
|
@@ -207,43 +165,7 @@ public class GoogleApiClientHelper
|
|
mPendingDisconnect = null;
|
|
}
|
|
|
|
- @Override
|
|
- public void onConnectionFailed(ConnectionResult result) {
|
|
- if (!isErrorRecoverableByRetrying(result.getErrorCode())) {
|
|
- Log.d(TAG, "Not retrying managed client connection. Unrecoverable error: %d",
|
|
- result.getErrorCode());
|
|
- return;
|
|
- }
|
|
-
|
|
- if (mResolutionAttempts < ConnectedTask.RETRY_NUMBER_LIMIT) {
|
|
- Log.d(TAG, "Retrying managed client connection. attempt %d/%d - errorCode: %d",
|
|
- mResolutionAttempts, ConnectedTask.RETRY_NUMBER_LIMIT, result.getErrorCode());
|
|
- mResolutionAttempts += 1;
|
|
-
|
|
- mHandler.postDelayed(new Runnable() {
|
|
- @Override
|
|
- public void run() {
|
|
- mClient.connect();
|
|
- }
|
|
- }, ConnectedTask.CONNECTION_RETRY_TIME_MS);
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onConnected(Bundle connectionHint) {
|
|
- mResolutionAttempts = 0;
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onConnectionSuspended(int cause) {
|
|
- // GoogleApiClient handles retrying on suspension itself. Logging in case it didn't succeed
|
|
- // for some reason.
|
|
- Log.w(TAG, "Managed client connection suspended. Cause: %d", cause);
|
|
- }
|
|
-
|
|
private static boolean isErrorRecoverableByRetrying(int errorCode) {
|
|
- return errorCode == ConnectionResult.INTERNAL_ERROR
|
|
- || errorCode == ConnectionResult.NETWORK_ERROR
|
|
- || errorCode == ConnectionResult.SERVICE_UPDATING;
|
|
+ return false;
|
|
}
|
|
}
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
|
|
@@ -32,8 +32,8 @@ public class InstantAppsHandler {
|
|
* @return Whether or not the instant app specified by the entry in the page's manifest is
|
|
* either available, or would be available if the user wasn't in the holdback group.
|
|
*/
|
|
- public boolean isInstantAppAvailable(
|
|
- String url, boolean checkHoldback, boolean includeUserPrefersBrowser) {
|
|
- return false;
|
|
+ public boolean isInstantAppAvailable( // guard this
|
|
+ String url, boolean checkHoldback, boolean includeUserPrefersBrowser) {
|
|
+ return false; // guard this
|
|
}
|
|
}
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
|
|
@@ -16,8 +16,6 @@ import androidx.annotation.IntDef;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
|
|
-import com.google.android.gms.common.GooglePlayServicesUtil;
|
|
-
|
|
import org.chromium.base.BuildInfo;
|
|
import org.chromium.base.Callback;
|
|
import org.chromium.base.ObserverList;
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
|
@@ -124,7 +124,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
|
private Preference mLinkPref;
|
|
private Menu mMenu;
|
|
|
|
- private @Nullable PasswordCheck mPasswordCheck;
|
|
private @ManagePasswordsReferrer int mManagePasswordsReferrer;
|
|
private BottomSheetController mBottomSheetController;
|
|
|
|
@@ -196,7 +195,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
|
@Override
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
- mPasswordCheck = PasswordCheckFactory.getOrCreate(new SettingsLauncherImpl());
|
|
computeTrustedVaultBannerState();
|
|
}
|
|
|
|
@@ -302,9 +300,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
|
if (shouldShowAutoSigninOption()) {
|
|
createAutoSignInCheckbox();
|
|
}
|
|
- if (mPasswordCheck != null) {
|
|
- createCheckPasswords();
|
|
- }
|
|
|
|
if (mTrustedVaultBannerState == TrustedVaultBannerState.OPTED_IN) {
|
|
createTrustedVaultBanner(R.string.android_trusted_vault_banner_sub_label_opted_in,
|
|
@@ -502,10 +497,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
|
// by the system.
|
|
if (getActivity().isFinishing()) {
|
|
PasswordManagerHandlerProvider.getInstance().removeObserver(this);
|
|
- if (mPasswordCheck != null
|
|
- && mManagePasswordsReferrer != ManagePasswordsReferrer.CHROME_SETTINGS) {
|
|
- PasswordCheckFactory.destroy();
|
|
- }
|
|
}
|
|
}
|
|
|
|
diff --git a/chrome/android/modules/chrome_feature_modules.gni b/chrome/android/modules/chrome_feature_modules.gni
|
|
--- a/chrome/android/modules/chrome_feature_modules.gni
|
|
+++ b/chrome/android/modules/chrome_feature_modules.gni
|
|
@@ -5,8 +5,6 @@
|
|
import("//build/config/android/config.gni")
|
|
import("//chrome/android/features/dev_ui/dev_ui_module.gni")
|
|
import("//chrome/android/modules/buildflags.gni")
|
|
-import(
|
|
- "//chrome/android/modules/cablev2_authenticator/cablev2_authenticator_module.gni")
|
|
import("//chrome/android/modules/stack_unwinder/stack_unwinder_module.gni")
|
|
import("//chrome/android/modules/test_dummy/test_dummy_module.gni")
|
|
import("//device/vr/buildflags/buildflags.gni")
|
|
@@ -37,7 +35,6 @@ if (enable_arcore) {
|
|
# Each new module needs to add a desc to one of the lists below.
|
|
|
|
chrome_module_descs = [
|
|
- cablev2_authenticator_module_desc,
|
|
test_dummy_module_desc,
|
|
stack_unwinder_module_desc,
|
|
]
|
|
diff --git a/chrome/browser/language/android/BUILD.gn b/chrome/browser/language/android/BUILD.gn
|
|
--- a/chrome/browser/language/android/BUILD.gn
|
|
+++ b/chrome/browser/language/android/BUILD.gn
|
|
@@ -10,15 +10,12 @@ android_library("base_module_java") {
|
|
sources = [
|
|
"java/src/org/chromium/chrome/browser/language/AppLocaleUtils.java",
|
|
"java/src/org/chromium/chrome/browser/language/GlobalAppLocaleController.java",
|
|
- "java/src/org/chromium/chrome/browser/language/LanguageSplitInstaller.java",
|
|
]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//chrome/browser/preferences:java",
|
|
"//components/language/android:java",
|
|
"//components/language/android:ulp_delegate_java",
|
|
- "//third_party/android_deps:playcore_java",
|
|
"//third_party/androidx:androidx_annotation_annotation_java",
|
|
"//ui/android:ui_no_recycler_view_java",
|
|
]
|
|
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java
|
|
--- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java
|
|
+++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java
|
|
@@ -547,12 +547,6 @@ public class AppLanguagePromoDialog {
|
|
|
|
mLoadingModal.set(ModalDialogProperties.CUSTOM_VIEW, customView);
|
|
|
|
- // Only show the modal if the selected language is not installed.
|
|
- if (!LanguageSplitInstaller.getInstance().isLanguageSplitInstalled(
|
|
- selectedLanguage.getCode())) {
|
|
- mModalDialogManager.showDialog(mLoadingModal, ModalDialogManager.ModalDialogType.APP);
|
|
- }
|
|
-
|
|
boolean isSelectedCurrentUI = AppLocaleUtils.isAppLanguagePref(selectedLanguage.getCode());
|
|
if (!isSelectedCurrentUI) {
|
|
// Only record isTopLanguage if the app language has changed.
|
|
@@ -560,23 +554,6 @@ public class AppLanguagePromoDialog {
|
|
}
|
|
AndroidLanguageMetricsBridge.reportAppLanguagePromptLanguage(
|
|
selectedLanguage.isSystemDefault() ? "" : selectedLanguage.getCode());
|
|
-
|
|
- // Create call back for after language split install completes.
|
|
- AppLocaleUtils.setAppLanguagePref(selectedLanguage.getCode(), (success) -> {
|
|
- if (success) {
|
|
- if (!isSelectedCurrentUI) {
|
|
- // Only restart if the new language is different than the current UI.
|
|
- mRestartAction.restart();
|
|
- }
|
|
- } else {
|
|
- // The loading language modal will always already be shown if a download fails.
|
|
- CharSequence failedText = mActivity.getResources().getString(
|
|
- R.string.languages_split_failed, selectedLanguage.getDisplayName());
|
|
- messageView.setText(failedText);
|
|
- mLoadingModal.set(ModalDialogProperties.POSITIVE_BUTTON_TEXT,
|
|
- mActivity.getText(R.string.ok).toString());
|
|
- }
|
|
- });
|
|
}
|
|
|
|
/**
|
|
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
|
|
--- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
|
|
+++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
|
|
@@ -18,7 +18,6 @@ import org.chromium.base.Log;
|
|
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
|
import org.chromium.chrome.browser.language.AppLocaleUtils;
|
|
import org.chromium.chrome.browser.language.GlobalAppLocaleController;
|
|
-import org.chromium.chrome.browser.language.LanguageSplitInstaller;
|
|
import org.chromium.chrome.browser.language.R;
|
|
import org.chromium.chrome.browser.preferences.Pref;
|
|
import org.chromium.chrome.browser.preferences.PrefChangeRegistrar;
|
|
@@ -131,11 +130,6 @@ public class LanguageSettings extends ChromeBaseSettingsFragment
|
|
* translate target language, and detailed translate preferences.
|
|
*/
|
|
private void createDetailedPreferences(Bundle savedInstanceState, String rootKey) {
|
|
- // Log currently installed language splits.
|
|
- String installedLanguages =
|
|
- TextUtils.join(",", LanguageSplitInstaller.getInstance().getInstalledLanguages());
|
|
- Log.i(TAG, TextUtils.concat("Installed Languages: ", installedLanguages).toString());
|
|
-
|
|
SettingsUtils.addPreferencesFromResource(this, R.xml.languages_detailed_preferences);
|
|
|
|
setupAppLanguageSection();
|
|
diff --git a/chrome/browser/password_manager/android/BUILD.gn b/chrome/browser/password_manager/android/BUILD.gn
|
|
--- a/chrome/browser/password_manager/android/BUILD.gn
|
|
+++ b/chrome/browser/password_manager/android/BUILD.gn
|
|
@@ -101,8 +101,6 @@ android_library("java") {
|
|
":android_backend_java_enums",
|
|
":java_resources",
|
|
":settings_interface_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
@@ -223,8 +221,6 @@ robolectric_binary("password_manager_junit_tests") {
|
|
":public_impl_java",
|
|
":settings_interface_java",
|
|
":test_support_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"pwd_migration:junit",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java
|
|
--- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java
|
|
+++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java
|
|
@@ -7,10 +7,6 @@ import android.app.PendingIntent;
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.api.ApiException;
|
|
-import com.google.android.gms.common.api.ResolvableApiException;
|
|
-
|
|
import org.chromium.base.Log;
|
|
import org.chromium.chrome.browser.password_manager.CredentialManagerLauncher.CredentialManagerError;
|
|
|
|
@@ -27,9 +23,6 @@ class PasswordManagerAndroidBackendUtil {
|
|
if (exception instanceof PasswordStoreAndroidBackend.BackendException) {
|
|
return ((PasswordStoreAndroidBackend.BackendException) exception).errorCode;
|
|
}
|
|
- if (exception instanceof ApiException) {
|
|
- return AndroidBackendErrorType.EXTERNAL_ERROR;
|
|
- }
|
|
return AndroidBackendErrorType.UNCATEGORIZED;
|
|
}
|
|
|
|
@@ -38,41 +31,14 @@ class PasswordManagerAndroidBackendUtil {
|
|
return ((PasswordCheckupClientHelper.PasswordCheckBackendException) exception)
|
|
.errorCode;
|
|
}
|
|
- if (exception instanceof ApiException) {
|
|
- return CredentialManagerError.API_ERROR;
|
|
- }
|
|
return CredentialManagerError.UNCATEGORIZED;
|
|
}
|
|
|
|
static int getApiErrorCode(Exception exception) {
|
|
- if (exception instanceof ApiException) {
|
|
- return ((ApiException) exception).getStatusCode();
|
|
- }
|
|
- return 0; // '0' means SUCCESS.
|
|
+ return 13; // '13' means ERROR
|
|
}
|
|
|
|
static @Nullable Integer getConnectionResultCode(Exception exception) {
|
|
- if (!(exception instanceof ApiException)) return null;
|
|
-
|
|
- ConnectionResult connectionResult =
|
|
- ((ApiException) exception).getStatus().getConnectionResult();
|
|
- if (connectionResult == null) return null;
|
|
-
|
|
- return connectionResult.getErrorCode();
|
|
- }
|
|
-
|
|
- static void handleResolvableApiException(ResolvableApiException exception) {
|
|
- // No special resolution for the authentication errors is needed since the user has already
|
|
- // been prompted to reauthenticate by Google services and Sync in Chrome.
|
|
- if (exception.getStatusCode() == ChromeSyncStatusCode.AUTH_ERROR_RESOLVABLE) return;
|
|
-
|
|
- // For all other resolvable errors, an intent is launched allowing the user to fix the
|
|
- // broken state.
|
|
- PendingIntent pendingIntent = exception.getResolution();
|
|
- try {
|
|
- pendingIntent.send();
|
|
- } catch (PendingIntent.CanceledException e) {
|
|
- Log.e(TAG, "Can not launch error resolution intent", e);
|
|
- }
|
|
+ return null;
|
|
}
|
|
}
|
|
diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java
|
|
--- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java
|
|
+++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java
|
|
@@ -19,9 +19,6 @@ import android.os.SystemClock;
|
|
import androidx.annotation.IntDef;
|
|
import androidx.annotation.VisibleForTesting;
|
|
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-import com.google.android.gms.common.api.ApiException;
|
|
-
|
|
import org.chromium.base.Callback;
|
|
import org.chromium.base.metrics.RecordHistogram;
|
|
import org.chromium.base.supplier.Supplier;
|
|
@@ -386,21 +383,6 @@ public class PasswordManagerHelper {
|
|
}
|
|
|
|
public static void launchGmsUpdate(Context context) {
|
|
- Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
- String deepLinkUrl = "market://details?id="
|
|
- + GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE + "&referrer=" + STORE_REFERER;
|
|
-
|
|
- intent.setPackage("com.android.vending");
|
|
- intent.setData(Uri.parse(deepLinkUrl));
|
|
- intent.putExtra("callerId", context.getPackageName());
|
|
-
|
|
- // Request for overlay flow, Play Store will fallback to the default
|
|
- // behaviour if overlay is not available.
|
|
- // TODO(crbug.com/1348506): Use AlleyOop v3 overlay UI after fixing Chrome restart
|
|
- // during the GMS Core installation.
|
|
- // intent.putExtra("overlay", true);
|
|
-
|
|
- context.startActivity(intent);
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@@ -487,7 +469,7 @@ public class PasswordManagerHelper {
|
|
RecordHistogram.recordEnumeratedHistogram(kGetIntentErrorHistogram,
|
|
CredentialManagerError.API_ERROR, CredentialManagerError.COUNT);
|
|
|
|
- if (!(exception instanceof ApiException)) return;
|
|
+ if ((true)) return;
|
|
|
|
final String kGetIntentApiErrorHistogram = forAccount
|
|
? ACCOUNT_GET_INTENT_API_ERROR_HISTOGRAM
|
|
diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordSyncControllerDelegateBridgeImpl.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordSyncControllerDelegateBridgeImpl.java
|
|
--- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordSyncControllerDelegateBridgeImpl.java
|
|
+++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordSyncControllerDelegateBridgeImpl.java
|
|
@@ -4,8 +4,6 @@
|
|
|
|
package org.chromium.chrome.browser.password_manager;
|
|
|
|
-import com.google.android.gms.common.api.ApiException;
|
|
-
|
|
import org.chromium.base.annotations.CalledByNative;
|
|
import org.chromium.base.annotations.NativeMethods;
|
|
|
|
@@ -73,11 +71,6 @@ class PasswordSyncControllerDelegateBridgeImpl {
|
|
error = ((PasswordStoreAndroidBackend.BackendException) exception).errorCode;
|
|
}
|
|
|
|
- if (exception instanceof ApiException) {
|
|
- error = AndroidBackendErrorType.EXTERNAL_ERROR;
|
|
- apiErrorCode = ((ApiException) exception).getStatusCode();
|
|
- }
|
|
-
|
|
PasswordSyncControllerDelegateBridgeImplJni.get().onCredentialManagerError(
|
|
mNativeDelegateBridgeImpl, error, apiErrorCode);
|
|
}
|
|
diff --git a/chrome/browser/push_messaging/push_messaging_service_factory.cc b/chrome/browser/push_messaging/push_messaging_service_factory.cc
|
|
--- a/chrome/browser/push_messaging/push_messaging_service_factory.cc
|
|
+++ b/chrome/browser/push_messaging/push_messaging_service_factory.cc
|
|
@@ -26,13 +26,7 @@
|
|
// static
|
|
PushMessagingServiceImpl* PushMessagingServiceFactory::GetForProfile(
|
|
content::BrowserContext* context) {
|
|
- // The Push API is not currently supported in incognito mode.
|
|
- // See https://crbug.com/401439.
|
|
- if (context->IsOffTheRecord())
|
|
- return nullptr;
|
|
-
|
|
- return static_cast<PushMessagingServiceImpl*>(
|
|
- GetInstance()->GetServiceForBrowserContext(context, true));
|
|
+ return nullptr;
|
|
}
|
|
|
|
// static
|
|
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
|
|
--- a/chrome/browser/resources/settings/route.ts
|
|
+++ b/chrome/browser/resources/settings/route.ts
|
|
@@ -60,8 +60,6 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
|
|
|
|
if (loadTimeData.getBoolean('enableSecurityKeysSubpage')) {
|
|
r.SECURITY_KEYS = r.SECURITY.createChild('/securityKeys');
|
|
- r.SECURITY_KEYS_PHONES =
|
|
- r.SECURITY_KEYS.createChild('/securityKeys/phones');
|
|
// <if expr="is_win">
|
|
} else {
|
|
r.SECURITY_KEYS_PHONES = r.SECURITY.createChild('/securityKeys/phones');
|
|
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
|
--- a/chrome/browser/ui/BUILD.gn
|
|
+++ b/chrome/browser/ui/BUILD.gn
|
|
@@ -273,8 +273,6 @@ static_library("ui") {
|
|
"webui/flags/flags_ui.h",
|
|
"webui/flags/flags_ui_handler.cc",
|
|
"webui/flags/flags_ui_handler.h",
|
|
- "webui/gcm_internals_ui.cc",
|
|
- "webui/gcm_internals_ui.h",
|
|
"webui/internals/internals_ui.cc",
|
|
"webui/internals/internals_ui.h",
|
|
"webui/interstitials/interstitial_ui.cc",
|
|
@@ -508,7 +506,6 @@ static_library("ui") {
|
|
"//components/feedback/redaction_tool",
|
|
"//components/find_in_page",
|
|
"//components/flags_ui",
|
|
- "//components/gcm_driver",
|
|
"//components/google/core/common",
|
|
"//components/heap_profiling/multi_process",
|
|
"//components/history/content/browser",
|
|
diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java
|
|
--- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java
|
|
+++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java
|
|
@@ -194,15 +194,11 @@ public class SigninFirstRunMediator
|
|
boolean isMetricsReportingDisabledByPolicy = false;
|
|
Log.i(TAG, "#onInitialLoadCompleted() hasPolicies:" + hasPolicies);
|
|
if (hasPolicies) {
|
|
- isSigninDisabledByPolicy =
|
|
- IdentityServicesProvider.get()
|
|
- .getSigninManager(mDelegate.getProfileSupplier().get())
|
|
- .isSigninDisabledByPolicy();
|
|
+ isSigninDisabledByPolicy = true;
|
|
Log.i(TAG,
|
|
"#onInitialLoadCompleted() isSigninDisabledByPolicy:"
|
|
+ isSigninDisabledByPolicy);
|
|
- isMetricsReportingDisabledByPolicy =
|
|
- !mPrivacyPreferencesManager.isUsageAndCrashReportingPermittedByPolicy();
|
|
+ isMetricsReportingDisabledByPolicy = true;
|
|
|
|
final FrePolicy frePolicy = new FrePolicy();
|
|
frePolicy.metricsReportingDisabledByPolicy = isMetricsReportingDisabledByPolicy;
|
|
diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/webauthn/sheet_models.cc
|
|
--- a/chrome/browser/ui/webauthn/sheet_models.cc
|
|
+++ b/chrome/browser/ui/webauthn/sheet_models.cc
|
|
@@ -192,12 +192,7 @@ bool AuthenticatorMechanismSelectorSheetModel::IsManageDevicesButtonVisible()
|
|
const {
|
|
// If any phones are shown then also show a button that goes to the settings
|
|
// page to manage them.
|
|
- return base::ranges::any_of(
|
|
- dialog_model()->mechanisms(),
|
|
- [](const AuthenticatorRequestDialogModel::Mechanism& mechanism) {
|
|
- return absl::holds_alternative<
|
|
- AuthenticatorRequestDialogModel::Mechanism::Phone>(mechanism.type);
|
|
- });
|
|
+ return false;
|
|
}
|
|
|
|
void AuthenticatorMechanismSelectorSheetModel::OnManageDevices() {
|
|
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
@@ -47,7 +47,6 @@
|
|
#include "chrome/browser/ui/webui/download_internals/download_internals_ui.h"
|
|
#include "chrome/browser/ui/webui/engagement/site_engagement_ui.h"
|
|
#include "chrome/browser/ui/webui/flags/flags_ui.h"
|
|
-#include "chrome/browser/ui/webui/gcm_internals_ui.h"
|
|
#include "chrome/browser/ui/webui/internals/internals_ui.h"
|
|
#include "chrome/browser/ui/webui/interstitials/interstitial_ui.h"
|
|
#include "chrome/browser/ui/webui/intro/intro_ui.h"
|
|
@@ -478,8 +477,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
|
return &NewWebUI<FlagsDeprecatedUI>;
|
|
if (url.host_piece() == chrome::kChromeUIFlagsHost)
|
|
return &NewWebUI<FlagsUI>;
|
|
- if (url.host_piece() == chrome::kChromeUIGCMInternalsHost)
|
|
- return &NewWebUI<GCMInternalsUI>;
|
|
if (url.host_piece() == chrome::kChromeUIInternalsHost)
|
|
return &NewWebUI<InternalsUI>;
|
|
if (url.host_piece() == chrome::kChromeUIInterstitialHost)
|
|
diff --git a/chrome/browser/webauthn/android/BUILD.gn b/chrome/browser/webauthn/android/BUILD.gn
|
|
--- a/chrome/browser/webauthn/android/BUILD.gn
|
|
+++ b/chrome/browser/webauthn/android/BUILD.gn
|
|
@@ -14,7 +14,6 @@ android_library("java") {
|
|
deps = [
|
|
":java_resources",
|
|
":jni_headers",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
diff --git a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java b/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java
|
|
--- a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java
|
|
+++ b/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java
|
|
@@ -29,8 +29,6 @@ import androidx.fragment.app.FragmentTransaction;
|
|
import androidx.vectordrawable.graphics.drawable.Animatable2Compat;
|
|
import androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat;
|
|
|
|
-import com.google.android.gms.tasks.Task;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.base.Log;
|
|
import org.chromium.base.PackageUtils;
|
|
@@ -45,7 +43,6 @@ import org.chromium.chrome.browser.notifications.NotificationWrapperBuilderFacto
|
|
import org.chromium.chrome.browser.notifications.channels.ChromeChannelDefinitions;
|
|
import org.chromium.chrome.modules.cablev2_authenticator.Cablev2AuthenticatorModule;
|
|
import org.chromium.components.externalauth.ExternalAuthUtils;
|
|
-import org.chromium.components.webauthn.Fido2ApiCall;
|
|
import org.chromium.device.DeviceFeatureList;
|
|
import org.chromium.device.DeviceFeatureMap;
|
|
|
|
@@ -284,25 +281,7 @@ public class CableAuthenticatorModuleProvider extends Fragment implements OnClic
|
|
ok = false;
|
|
}
|
|
|
|
- if (!ok) {
|
|
- CableAuthenticatorModuleProviderJni.get().onHaveLinkingInformation(pointer, null);
|
|
- return;
|
|
- }
|
|
-
|
|
- Fido2ApiCall call = new Fido2ApiCall(
|
|
- ContextUtils.getApplicationContext(), Fido2ApiCall.FIRST_PARTY_API);
|
|
- Parcel args = call.start();
|
|
- Fido2ApiCall.ByteArrayResult result = new Fido2ApiCall.ByteArrayResult();
|
|
- args.writeStrongBinder(result);
|
|
- Task<byte[]> task = call.run(Fido2ApiCall.METHOD_GET_LINK_INFO,
|
|
- Fido2ApiCall.TRANSACTION_GET_LINK_INFO, args, result);
|
|
- task.addOnSuccessListener(linkInfo -> {
|
|
- CableAuthenticatorModuleProviderJni.get().onHaveLinkingInformation(
|
|
- pointer, linkInfo);
|
|
- }).addOnFailureListener(exception -> {
|
|
- Log.e(TAG, "Call to get linking information from Play Services failed", exception);
|
|
- CableAuthenticatorModuleProviderJni.get().onHaveLinkingInformation(pointer, null);
|
|
- });
|
|
+ CableAuthenticatorModuleProviderJni.get().onHaveLinkingInformation(pointer, null);
|
|
}
|
|
|
|
@NativeMethods
|
|
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc
|
|
--- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc
|
|
+++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc
|
|
@@ -1772,10 +1772,6 @@ void AuthenticatorRequestDialogModel::PopulateMechanisms() {
|
|
if (cable_ui_type_) {
|
|
switch (*cable_ui_type_) {
|
|
case AuthenticatorRequestDialogModel::CableUIType::CABLE_V2_2ND_FACTOR:
|
|
- if (base::Contains(transport_availability_.available_transports,
|
|
- kCable)) {
|
|
- include_add_phone_option = !windows_handles_hybrid;
|
|
- }
|
|
break;
|
|
|
|
case AuthenticatorRequestDialogModel::CableUIType::CABLE_V2_SERVER_LINK:
|
|
diff --git a/chrome/browser/webauthn/cablev2_devices.cc b/chrome/browser/webauthn/cablev2_devices.cc
|
|
--- a/chrome/browser/webauthn/cablev2_devices.cc
|
|
+++ b/chrome/browser/webauthn/cablev2_devices.cc
|
|
@@ -366,6 +366,9 @@ void AddPairing(Profile* profile, std::unique_ptr<Pairing> pairing) {
|
|
// This is called when doing a QR-code pairing with a phone and the phone
|
|
// sends long-term pairing information during the handshake. The pairing
|
|
// information is saved in preferences for future operations.
|
|
+ if ((true)) {
|
|
+ return;
|
|
+ }
|
|
ScopedListPrefUpdate update(profile->GetPrefs(),
|
|
kWebAuthnCablePairingsPrefName);
|
|
|
|
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn
|
|
--- a/chrome/test/android/BUILD.gn
|
|
+++ b/chrome/test/android/BUILD.gn
|
|
@@ -243,8 +243,6 @@ android_library("chrome_java_integration_test_support") {
|
|
|
|
deps = [
|
|
":chrome_java_test_support_common",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//build/android:build_java",
|
|
diff --git a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java
|
|
--- a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java
|
|
+++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java
|
|
@@ -2520,14 +2520,6 @@ public class ExternalNavigationHandler {
|
|
* @return Whether the given intent is going to open an Instant App.
|
|
*/
|
|
private static boolean isIntentToInstantApp(Intent intent) {
|
|
- if (INSTANT_APP_SUPERVISOR_PKG.equals(intent.getPackage())) return true;
|
|
-
|
|
- String intentAction = intent.getAction();
|
|
- for (String action : INSTANT_APP_START_ACTIONS) {
|
|
- if (action.equals(intentAction)) {
|
|
- return true;
|
|
- }
|
|
- }
|
|
return false;
|
|
}
|
|
|
|
diff --git a/components/externalauth/android/BUILD.gn b/components/externalauth/android/BUILD.gn
|
|
--- a/components/externalauth/android/BUILD.gn
|
|
+++ b/components/externalauth/android/BUILD.gn
|
|
@@ -27,8 +27,6 @@ android_library("google_delegate_public_impl_java") {
|
|
android_library("java") {
|
|
deps = [
|
|
":google_delegate_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"//base:base_java",
|
|
"//components/embedder_support/android:util_java",
|
|
"//content/public/android:content_java",
|
|
@@ -44,7 +42,6 @@ android_library("java") {
|
|
robolectric_library("junit") {
|
|
deps = [
|
|
":java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_junit_test_support",
|
|
diff --git a/components/externalauth/android/java/src/org/chromium/components/externalauth/ExternalAuthUtils.java b/components/externalauth/android/java/src/org/chromium/components/externalauth/ExternalAuthUtils.java
|
|
--- a/components/externalauth/android/java/src/org/chromium/components/externalauth/ExternalAuthUtils.java
|
|
+++ b/components/externalauth/android/java/src/org/chromium/components/externalauth/ExternalAuthUtils.java
|
|
@@ -15,9 +15,6 @@ import android.text.TextUtils;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import androidx.annotation.WorkerThread;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.base.Log;
|
|
import org.chromium.base.ResettersForTesting;
|
|
@@ -26,7 +23,6 @@ import org.chromium.base.TraceEvent;
|
|
import org.chromium.base.task.PostTask;
|
|
import org.chromium.base.task.TaskTraits;
|
|
import org.chromium.components.embedder_support.util.Origin;
|
|
-import org.chromium.gms.ChromiumPlayServicesAvailability;
|
|
|
|
/**
|
|
* Utility class for external authentication tools.
|
|
@@ -170,9 +166,7 @@ public class ExternalAuthUtils {
|
|
* when it is updating.
|
|
*/
|
|
public boolean isGooglePlayServicesMissing(final Context context) {
|
|
- final int resultCode = checkGooglePlayServicesAvailable(context);
|
|
- return (resultCode == ConnectionResult.SERVICE_MISSING
|
|
- || resultCode == ConnectionResult.SERVICE_INVALID);
|
|
+ return true;
|
|
}
|
|
|
|
/**
|
|
@@ -189,7 +183,6 @@ public class ExternalAuthUtils {
|
|
public boolean canUseGooglePlayServices(final UserRecoverableErrorHandler errorHandler) {
|
|
Context context = ContextUtils.getApplicationContext();
|
|
final int resultCode = checkGooglePlayServicesAvailable(context);
|
|
- if (resultCode == ConnectionResult.SUCCESS) return true;
|
|
// resultCode is some kind of error.
|
|
Log.v(TAG, "Unable to use Google Play Services: %s", describeError(resultCode));
|
|
if (isUserRecoverableError(resultCode)) {
|
|
@@ -259,11 +252,7 @@ public class ExternalAuthUtils {
|
|
* @return The code produced by calling the external code
|
|
*/
|
|
protected int checkGooglePlayServicesAvailable(final Context context) {
|
|
- // TODO(crbug.com/577190): Temporarily allowing disk access until more permanent fix is in.
|
|
- try (StrictModeContext ignored = StrictModeContext.allowDiskWrites();
|
|
- TraceEvent e = TraceEvent.scoped("checkGooglePlayServicesAvailable")) {
|
|
- return ChromiumPlayServicesAvailability.getGooglePlayServicesConnectionResult(context);
|
|
- }
|
|
+ return 1; /*SERVICE_MISSING*/
|
|
}
|
|
|
|
/**
|
|
@@ -274,7 +263,7 @@ public class ExternalAuthUtils {
|
|
* @return true If the code represents a user-recoverable error
|
|
*/
|
|
protected boolean isUserRecoverableError(final int errorCode) {
|
|
- return GoogleApiAvailability.getInstance().isUserResolvableError(errorCode);
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -284,7 +273,7 @@ public class ExternalAuthUtils {
|
|
* @return a textual description of the error code
|
|
*/
|
|
protected String describeError(final int errorCode) {
|
|
- return GoogleApiAvailability.getInstance().getErrorString(errorCode);
|
|
+ return "";
|
|
}
|
|
|
|
/**
|
|
diff --git a/components/externalauth/android/java/src/org/chromium/components/externalauth/UserRecoverableErrorHandler.java b/components/externalauth/android/java/src/org/chromium/components/externalauth/UserRecoverableErrorHandler.java
|
|
--- a/components/externalauth/android/java/src/org/chromium/components/externalauth/UserRecoverableErrorHandler.java
|
|
+++ b/components/externalauth/android/java/src/org/chromium/components/externalauth/UserRecoverableErrorHandler.java
|
|
@@ -9,8 +9,6 @@ import android.app.Dialog;
|
|
import android.content.Context;
|
|
import android.content.DialogInterface;
|
|
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-
|
|
import org.chromium.base.ThreadUtils;
|
|
import org.chromium.base.metrics.RecordUserAction;
|
|
|
|
@@ -89,7 +87,6 @@ public abstract class UserRecoverableErrorHandler {
|
|
if (!sNotificationShown.getAndSet(true)) {
|
|
return;
|
|
}
|
|
- GoogleApiAvailability.getInstance().showErrorNotification(context, errorCode);
|
|
}
|
|
}
|
|
|
|
@@ -182,11 +179,7 @@ public abstract class UserRecoverableErrorHandler {
|
|
cancelDialog();
|
|
}
|
|
if (mDialog == null) {
|
|
- mDialog = GoogleApiAvailability.getInstance().getErrorDialog(
|
|
- mActivity, errorCode, NO_RESPONSE_REQUIRED);
|
|
mErrorCode = errorCode;
|
|
-
|
|
- DialogUserActionRecorder.createAndAttachToDialog(mDialog);
|
|
}
|
|
// This can happen if |errorCode| is ConnectionResult.SERVICE_INVALID.
|
|
if (mDialog != null && !mDialog.isShowing()) {
|
|
diff --git a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java
|
|
--- a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java
|
|
+++ b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java
|
|
@@ -129,6 +129,8 @@ public class GoogleCloudMessagingV2 implements GoogleCloudMessagingSubscriber {
|
|
}
|
|
|
|
private Intent registerRpc(Bundle data) throws IOException {
|
|
+ if ((true))
|
|
+ throw new IOException("Google Play Services missing");
|
|
if (Looper.getMainLooper() == Looper.myLooper()) {
|
|
throw new IOException(ERROR_MAIN_THREAD);
|
|
}
|
|
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
|
|
--- a/components/gcm_driver/gcm_client_impl.cc
|
|
+++ b/components/gcm_driver/gcm_client_impl.cc
|
|
@@ -448,6 +448,7 @@ void GCMClientImpl::StartGCM() {
|
|
|
|
void GCMClientImpl::InitializeMCSClient() {
|
|
DCHECK(network_connection_tracker_);
|
|
+ if ((true)) return;
|
|
std::vector<GURL> endpoints;
|
|
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
|
|
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
|
|
@@ -641,6 +642,7 @@ void GCMClientImpl::AddHeartbeatInterval(const std::string& scope,
|
|
int interval_ms) {
|
|
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
|
DCHECK(mcs_client_);
|
|
+ if ((true)) return;
|
|
mcs_client_->AddHeartbeatInterval(scope, interval_ms);
|
|
}
|
|
|
|
@@ -652,6 +654,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) {
|
|
|
|
void GCMClientImpl::StartCheckin() {
|
|
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
|
+ if ((true)) return;
|
|
|
|
// Make sure no checkin is in progress.
|
|
if (checkin_request_)
|
|
@@ -730,6 +733,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) {
|
|
|
|
void GCMClientImpl::SchedulePeriodicCheckin() {
|
|
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
|
+ if ((true)) return;
|
|
|
|
// Make sure no checkin is in progress.
|
|
if (checkin_request_.get() || !device_checkin_info_.accounts_set)
|
|
diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm_driver/instance_id/android/BUILD.gn
|
|
--- a/components/gcm_driver/instance_id/android/BUILD.gn
|
|
+++ b/components/gcm_driver/instance_id/android/BUILD.gn
|
|
@@ -16,7 +16,6 @@ generate_jni("test_support_jni_headers") {
|
|
|
|
android_library("instance_id_driver_java") {
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_iid_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
@@ -31,14 +30,12 @@ android_library("instance_id_driver_java") {
|
|
|
|
sources = [
|
|
"java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java",
|
|
- "java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDWithSubtype.java",
|
|
]
|
|
}
|
|
|
|
android_library("instance_id_driver_test_support_java") {
|
|
deps = [
|
|
":instance_id_driver_java",
|
|
- "$google_play_services_package:google_play_services_iid_java",
|
|
"//base:jni_java",
|
|
]
|
|
|
|
diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
|
|
--- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
|
|
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
|
|
@@ -27,7 +27,6 @@ public class InstanceIDBridge {
|
|
* Underlying InstanceIDWithSubtype. May be shared by multiple InstanceIDBridges. Must be
|
|
* initialized on a background thread.
|
|
*/
|
|
- private InstanceIDWithSubtype mInstanceID;
|
|
|
|
private static boolean sBlockOnAsyncTasksForTesting;
|
|
|
|
@@ -72,7 +71,7 @@ public class InstanceIDBridge {
|
|
new BridgeAsyncTask<String>() {
|
|
@Override
|
|
protected String doBackgroundWork() {
|
|
- return mInstanceID.getId();
|
|
+ return "";
|
|
}
|
|
@Override
|
|
protected void sendResultToNative(String id) {
|
|
@@ -88,7 +87,7 @@ public class InstanceIDBridge {
|
|
new BridgeAsyncTask<Long>() {
|
|
@Override
|
|
protected Long doBackgroundWork() {
|
|
- return mInstanceID.getCreationTime();
|
|
+ return 0L;
|
|
}
|
|
@Override
|
|
protected void sendResultToNative(Long creationTime) {
|
|
@@ -110,21 +109,7 @@ public class InstanceIDBridge {
|
|
new BridgeAsyncTask<String>() {
|
|
@Override
|
|
protected String doBackgroundWork() {
|
|
- try {
|
|
- // TODO(crbug.com/1247170): Migrate stored LazySubscriptionsManager data to
|
|
- // SubscriptionFlagManager.
|
|
- LazySubscriptionsManager.storeLazinessInformation(
|
|
- LazySubscriptionsManager.buildSubscriptionUniqueId(
|
|
- mSubtype, authorizedEntity),
|
|
- (flags & InstanceIDFlags.IS_LAZY) == InstanceIDFlags.IS_LAZY);
|
|
- SubscriptionFlagManager.setFlags(
|
|
- SubscriptionFlagManager.buildSubscriptionUniqueId(
|
|
- mSubtype, authorizedEntity),
|
|
- flags);
|
|
- return mInstanceID.getToken(authorizedEntity, scope);
|
|
- } catch (IOException ex) {
|
|
return "";
|
|
- }
|
|
}
|
|
@Override
|
|
protected void sendResultToNative(String token) {
|
|
@@ -141,21 +126,7 @@ public class InstanceIDBridge {
|
|
new BridgeAsyncTask<Boolean>() {
|
|
@Override
|
|
protected Boolean doBackgroundWork() {
|
|
- try {
|
|
- mInstanceID.deleteToken(authorizedEntity, scope);
|
|
- String subscriptionId = LazySubscriptionsManager.buildSubscriptionUniqueId(
|
|
- mSubtype, authorizedEntity);
|
|
- if (LazySubscriptionsManager.isSubscriptionLazy(subscriptionId)) {
|
|
- LazySubscriptionsManager.deletePersistedMessagesForSubscriptionId(
|
|
- subscriptionId);
|
|
- }
|
|
- SubscriptionFlagManager.clearFlags(
|
|
- SubscriptionFlagManager.buildSubscriptionUniqueId(
|
|
- mSubtype, authorizedEntity));
|
|
- return true;
|
|
- } catch (IOException ex) {
|
|
- return false;
|
|
- }
|
|
+ return false;
|
|
}
|
|
@Override
|
|
protected void sendResultToNative(Boolean success) {
|
|
@@ -171,12 +142,7 @@ public class InstanceIDBridge {
|
|
new BridgeAsyncTask<Boolean>() {
|
|
@Override
|
|
protected Boolean doBackgroundWork() {
|
|
- try {
|
|
- mInstanceID.deleteInstanceID();
|
|
- return true;
|
|
- } catch (IOException ex) {
|
|
- return false;
|
|
- }
|
|
+ return true;
|
|
}
|
|
@Override
|
|
protected void sendResultToNative(Boolean success) {
|
|
@@ -206,11 +172,6 @@ public class InstanceIDBridge {
|
|
@Override
|
|
@SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native.
|
|
protected Result doInBackground() {
|
|
- synchronized (InstanceIDBridge.this) {
|
|
- if (mInstanceID == null) {
|
|
- mInstanceID = InstanceIDWithSubtype.getInstance(mSubtype);
|
|
- }
|
|
- }
|
|
return doBackgroundWork();
|
|
}
|
|
@Override
|
|
diff --git a/components/media_router/browser/android/BUILD.gn b/components/media_router/browser/android/BUILD.gn
|
|
--- a/components/media_router/browser/android/BUILD.gn
|
|
+++ b/components/media_router/browser/android/BUILD.gn
|
|
@@ -12,10 +12,6 @@ android_library("java") {
|
|
resources_package = "org.chromium.components.media_router"
|
|
deps = [
|
|
":java_resources",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
@@ -77,8 +73,6 @@ android_library("java") {
|
|
android_library("cast_options_provider_java") {
|
|
sources = [ "java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" ]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
]
|
|
}
|
|
|
|
@@ -104,7 +98,6 @@ android_library("test_support_java") {
|
|
":java",
|
|
":java_resources",
|
|
":test_jni_headers",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:jni_java",
|
|
@@ -148,10 +141,6 @@ robolectric_library("junit") {
|
|
deps = [
|
|
":java",
|
|
":test_support_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_cast_framework_java",
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_junit_test_support",
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/BrowserMediaRouter.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/BrowserMediaRouter.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/BrowserMediaRouter.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/BrowserMediaRouter.java
|
|
@@ -10,9 +10,6 @@ import androidx.annotation.Nullable;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import androidx.mediarouter.media.MediaRouter;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.base.Log;
|
|
import org.chromium.base.ResettersForTesting;
|
|
@@ -43,20 +40,7 @@ public class BrowserMediaRouter implements MediaRouteManager {
|
|
new MediaRouteProvider.Factory() {
|
|
@Override
|
|
public void addProviders(MediaRouteManager manager) {
|
|
- int googleApiAvailabilityResult =
|
|
- GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
|
|
- ContextUtils.getApplicationContext(),
|
|
- MIN_GOOGLE_PLAY_SERVICES_APK_VERSION);
|
|
- if (googleApiAvailabilityResult != ConnectionResult.SUCCESS) {
|
|
- GoogleApiAvailability.getInstance().showErrorNotification(
|
|
- ContextUtils.getApplicationContext(), googleApiAvailabilityResult);
|
|
- return;
|
|
- }
|
|
- MediaRouteProvider cafProvider = CafMediaRouteProvider.create(manager);
|
|
- manager.addMediaRouteProvider(cafProvider);
|
|
- MediaRouteProvider remotingProvider =
|
|
- CafRemotingMediaRouteProvider.create(manager);
|
|
- manager.addMediaRouteProvider(remotingProvider);
|
|
+ return;
|
|
}
|
|
};
|
|
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaSink.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaSink.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaSink.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaSink.java
|
|
@@ -8,41 +8,24 @@ import androidx.annotation.Nullable;
|
|
import androidx.mediarouter.media.MediaRouter;
|
|
import androidx.mediarouter.media.MediaRouter.RouteInfo;
|
|
|
|
-import com.google.android.gms.cast.CastDevice;
|
|
-
|
|
/**
|
|
* A common descriptor of a device that can present some URI.
|
|
*/
|
|
public class MediaSink {
|
|
private static final String CAST_SINK_URN_PREFIX = "urn:x-org.chromium:media:sink:cast-";
|
|
- private final String mId;
|
|
- private final String mName;
|
|
- private final CastDevice mDevice;
|
|
-
|
|
- /**
|
|
- * Constructor.
|
|
- * @param id A unique identifier of the sink.
|
|
- * @param name A user friendly name of the sink.
|
|
- * @param device {@link CastDevice} corresponding to this sink.
|
|
- */
|
|
- public MediaSink(String id, String name, CastDevice device) {
|
|
- mId = id;
|
|
- mName = name;
|
|
- mDevice = device;
|
|
- }
|
|
|
|
/**
|
|
* @return The unique identifier of the sink.
|
|
*/
|
|
public String getId() {
|
|
- return mId;
|
|
+ return "";
|
|
}
|
|
|
|
/**
|
|
* @return The user friendly name of the sink.
|
|
*/
|
|
public String getName() {
|
|
- return mName;
|
|
+ return "";
|
|
}
|
|
|
|
/**
|
|
@@ -52,17 +35,8 @@ public class MediaSink {
|
|
return CAST_SINK_URN_PREFIX + getId();
|
|
}
|
|
|
|
- public CastDevice getDevice() {
|
|
- return mDevice;
|
|
- }
|
|
-
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
- if (o == this) return true;
|
|
- if (o instanceof MediaSink) {
|
|
- MediaSink other = (MediaSink) o;
|
|
- return mId.equals(other.getId()) && mName.equals(other.getName());
|
|
- }
|
|
return false;
|
|
}
|
|
|
|
@@ -70,23 +44,15 @@ public class MediaSink {
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
- result = prime * result + ((mId == null) ? 0 : mId.hashCode());
|
|
- result = prime * result + ((mName == null) ? 0 : mName.hashCode());
|
|
return result;
|
|
}
|
|
|
|
- @Override
|
|
- public String toString() {
|
|
- return String.format("MediaSink: %s, %s", getId(), getName());
|
|
- }
|
|
-
|
|
/**
|
|
* @param route The route information provided by Android.
|
|
* @return A new MediaSink instance corresponding to the specified {@link RouteInfo}.
|
|
*/
|
|
public static MediaSink fromRoute(MediaRouter.RouteInfo route) {
|
|
- return new MediaSink(
|
|
- route.getId(), route.getName(), CastDevice.getFromBundle(route.getExtras()));
|
|
+ return null;
|
|
}
|
|
|
|
/**
|
|
@@ -97,10 +63,6 @@ public class MediaSink {
|
|
*/
|
|
@Nullable
|
|
public static MediaSink fromSinkId(String sinkId, MediaRouter router) {
|
|
- for (MediaRouter.RouteInfo route : router.getRoutes()) {
|
|
- MediaSink sink = MediaSink.fromRoute(route);
|
|
- if (sink.getId().equals(sinkId)) return sink;
|
|
- }
|
|
return null;
|
|
}
|
|
}
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java
|
|
@@ -4,10 +4,6 @@
|
|
|
|
package org.chromium.components.media_router;
|
|
|
|
-import com.google.android.gms.cast.MediaInfo;
|
|
-import com.google.android.gms.cast.MediaMetadata;
|
|
-import com.google.android.gms.cast.MediaStatus;
|
|
-
|
|
import org.chromium.base.annotations.CalledByNative;
|
|
import org.chromium.base.annotations.JNINamespace;
|
|
|
|
@@ -17,11 +13,6 @@ import org.chromium.base.annotations.JNINamespace;
|
|
*/
|
|
@JNINamespace("media_router")
|
|
public class MediaStatusBridge {
|
|
- private MediaStatus mStatus;
|
|
-
|
|
- public MediaStatusBridge(MediaStatus status) {
|
|
- mStatus = status;
|
|
- }
|
|
|
|
/**
|
|
* Gets the play state of the stream. Return values are defined as such:
|
|
@@ -34,7 +25,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public int playerState() {
|
|
- return mStatus.getPlayerState();
|
|
+ return 0;
|
|
}
|
|
|
|
/**
|
|
@@ -48,7 +39,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public int idleReason() {
|
|
- return mStatus.getIdleReason();
|
|
+ return 0;
|
|
}
|
|
|
|
/**
|
|
@@ -57,13 +48,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public String title() {
|
|
- MediaInfo info = mStatus.getMediaInfo();
|
|
- if (info == null) return "";
|
|
-
|
|
- MediaMetadata metadata = info.getMetadata();
|
|
- if (metadata == null) return "";
|
|
-
|
|
- return metadata.getString(MediaMetadata.KEY_TITLE);
|
|
+ return "";
|
|
}
|
|
|
|
/**
|
|
@@ -71,7 +56,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public boolean canPlayPause() {
|
|
- return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_PAUSE);
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -79,7 +64,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public boolean canMute() {
|
|
- return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_TOGGLE_MUTE);
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -87,7 +72,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public boolean canSetVolume() {
|
|
- return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_SET_VOLUME);
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -95,7 +80,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public boolean canSeek() {
|
|
- return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_SEEK);
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -103,7 +88,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public boolean isMuted() {
|
|
- return mStatus.isMute();
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -113,7 +98,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public double volume() {
|
|
- return mStatus.getStreamVolume();
|
|
+ return 0.0;
|
|
}
|
|
|
|
/**
|
|
@@ -122,10 +107,7 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public long duration() {
|
|
- MediaInfo info = mStatus.getMediaInfo();
|
|
- if (info == null) return 0;
|
|
-
|
|
- return info.getStreamDuration();
|
|
+ return 0;
|
|
}
|
|
|
|
/**
|
|
@@ -133,6 +115,6 @@ public class MediaStatusBridge {
|
|
*/
|
|
@CalledByNative
|
|
public long currentTime() {
|
|
- return mStatus.getStreamPosition();
|
|
+ return 0;
|
|
}
|
|
}
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java
|
|
@@ -6,10 +6,6 @@ package org.chromium.components.media_router.caf;
|
|
|
|
import android.content.Intent;
|
|
|
|
-import com.google.android.gms.cast.CastDevice;
|
|
-import com.google.android.gms.cast.MediaStatus;
|
|
-import com.google.android.gms.cast.framework.media.RemoteMediaClient;
|
|
-
|
|
import org.chromium.components.browser_ui.media.MediaNotificationInfo;
|
|
import org.chromium.components.browser_ui.media.MediaNotificationListener;
|
|
import org.chromium.components.browser_ui.media.MediaNotificationManager;
|
|
@@ -61,20 +57,6 @@ public abstract class BaseNotificationController
|
|
public void onStatusUpdated() {
|
|
if (mNotificationBuilder == null) return;
|
|
if (!mSessionController.isConnected()) return;
|
|
-
|
|
- MediaStatus mediaStatus = mSessionController.getRemoteMediaClient().getMediaStatus();
|
|
- if (mediaStatus == null) return;
|
|
-
|
|
- int playerState = mediaStatus.getPlayerState();
|
|
- if (playerState == MediaStatus.PLAYER_STATE_PAUSED
|
|
- || playerState == MediaStatus.PLAYER_STATE_PLAYING) {
|
|
- mNotificationBuilder.setPaused(playerState != MediaStatus.PLAYER_STATE_PLAYING);
|
|
- mNotificationBuilder.setActions(
|
|
- MediaNotificationInfo.ACTION_STOP | MediaNotificationInfo.ACTION_PLAY_PAUSE);
|
|
- } else {
|
|
- mNotificationBuilder.setActions(MediaNotificationInfo.ACTION_STOP);
|
|
- }
|
|
- MediaRouterClient.getInstance().showNotification(mNotificationBuilder.build());
|
|
}
|
|
|
|
/** Called when media metadata updated. */
|
|
@@ -92,35 +74,6 @@ public abstract class BaseNotificationController
|
|
mNotificationBuilder.setMetadata(notificationMetadata);
|
|
|
|
if (!mSessionController.isConnected()) return;
|
|
-
|
|
- CastDevice castDevice = mSessionController.getSession().getCastDevice();
|
|
- if (castDevice != null) {
|
|
- String friendlyName = castDevice.getFriendlyName();
|
|
- if (friendlyName != null && !friendlyName.isEmpty()) {
|
|
- notificationMetadata.setTitle(friendlyName);
|
|
- }
|
|
- }
|
|
-
|
|
- RemoteMediaClient remoteMediaClient = mSessionController.getRemoteMediaClient();
|
|
-
|
|
- com.google.android.gms.cast.MediaInfo info = remoteMediaClient.getMediaInfo();
|
|
- if (info == null) return;
|
|
-
|
|
- com.google.android.gms.cast.MediaMetadata metadata = info.getMetadata();
|
|
- if (metadata == null) return;
|
|
-
|
|
- String title = metadata.getString(com.google.android.gms.cast.MediaMetadata.KEY_TITLE);
|
|
- if (title != null && !title.isEmpty()) notificationMetadata.setTitle(title);
|
|
-
|
|
- String artist = metadata.getString(com.google.android.gms.cast.MediaMetadata.KEY_ARTIST);
|
|
- if (artist == null) {
|
|
- artist = metadata.getString(com.google.android.gms.cast.MediaMetadata.KEY_ALBUM_ARTIST);
|
|
- }
|
|
- if (artist != null) notificationMetadata.setArtist(artist);
|
|
-
|
|
- String album =
|
|
- metadata.getString(com.google.android.gms.cast.MediaMetadata.KEY_ALBUM_TITLE);
|
|
- if (album != null) notificationMetadata.setAlbum(album);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -128,16 +81,10 @@ public abstract class BaseNotificationController
|
|
|
|
@Override
|
|
public void onPlay(int actionSource) {
|
|
- if (!mSessionController.isConnected()) return;
|
|
-
|
|
- mSessionController.getRemoteMediaClient().play();
|
|
}
|
|
|
|
@Override
|
|
public void onPause(int actionSource) {
|
|
- if (!mSessionController.isConnected()) return;
|
|
-
|
|
- mSessionController.getRemoteMediaClient().pause();
|
|
}
|
|
|
|
@Override
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseSessionController.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseSessionController.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseSessionController.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseSessionController.java
|
|
@@ -6,12 +6,7 @@ package org.chromium.components.media_router.caf;
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
-import com.google.android.gms.cast.CastDevice;
|
|
-import com.google.android.gms.cast.framework.CastSession;
|
|
-import com.google.android.gms.cast.framework.media.RemoteMediaClient;
|
|
-
|
|
import org.chromium.base.Log;
|
|
-import org.chromium.components.media_router.CastSessionUtil;
|
|
import org.chromium.components.media_router.FlingingController;
|
|
import org.chromium.components.media_router.MediaSink;
|
|
import org.chromium.components.media_router.MediaSource;
|
|
@@ -42,15 +37,12 @@ public abstract class BaseSessionController {
|
|
void onMetadataUpdated();
|
|
}
|
|
|
|
- private CastSession mCastSession;
|
|
private final CafBaseMediaRouteProvider mProvider;
|
|
private CreateRouteRequestInfo mRouteCreationInfo;
|
|
- private final RemoteMediaClient.Callback mRemoteMediaClientCallback;
|
|
private final List<Callback> mCallbacks = new ArrayList<>();
|
|
|
|
public BaseSessionController(CafBaseMediaRouteProvider provider) {
|
|
mProvider = provider;
|
|
- mRemoteMediaClientCallback = new RemoteMediaClientCallback();
|
|
}
|
|
|
|
public void addCallback(Callback callback) {
|
|
@@ -63,9 +55,6 @@ public abstract class BaseSessionController {
|
|
|
|
public void requestSessionLaunch() {
|
|
mRouteCreationInfo = mProvider.getPendingCreateRouteRequestInfo();
|
|
- CastUtils.getCastContext().setReceiverApplicationId(
|
|
- mRouteCreationInfo.getMediaSource().getApplicationId());
|
|
-
|
|
// When the user clicks a route on the MediaRouteChooserDialog, we intercept the click event
|
|
// and do not select the route. Instead the route selection is postponed to here. This will
|
|
// trigger CAF to launch the session.
|
|
@@ -84,69 +73,22 @@ public abstract class BaseSessionController {
|
|
return mRouteCreationInfo;
|
|
}
|
|
|
|
- public CastSession getSession() {
|
|
- return mCastSession;
|
|
- }
|
|
-
|
|
- public RemoteMediaClient getRemoteMediaClient() {
|
|
- return isConnected() ? mCastSession.getRemoteMediaClient() : null;
|
|
- }
|
|
-
|
|
public abstract BaseNotificationController getNotificationController();
|
|
|
|
public void endSession() {
|
|
- CastUtils.getCastContext().getSessionManager().endCurrentSession(/* stopCasting= */ true);
|
|
- CastUtils.getCastContext().setReceiverApplicationId(null);
|
|
}
|
|
|
|
public List<String> getCapabilities() {
|
|
List<String> capabilities = new ArrayList<>();
|
|
- if (mCastSession == null || !mCastSession.isConnected()) return capabilities;
|
|
- CastDevice device = mCastSession.getCastDevice();
|
|
- if (device.hasCapability(CastDevice.CAPABILITY_AUDIO_IN)) {
|
|
- capabilities.add("audio_in");
|
|
- }
|
|
- if (device.hasCapability(CastDevice.CAPABILITY_AUDIO_OUT)) {
|
|
- capabilities.add("audio_out");
|
|
- }
|
|
- if (device.hasCapability(CastDevice.CAPABILITY_VIDEO_IN)) {
|
|
- capabilities.add("video_in");
|
|
- }
|
|
- if (device.hasCapability(CastDevice.CAPABILITY_VIDEO_OUT)) {
|
|
- capabilities.add("video_out");
|
|
- }
|
|
return capabilities;
|
|
}
|
|
|
|
public boolean isConnected() {
|
|
- return mCastSession != null && mCastSession.isConnected();
|
|
+ return false;
|
|
}
|
|
|
|
private void updateRemoteMediaClient(String message) {
|
|
if (!isConnected()) return;
|
|
-
|
|
- mCastSession.getRemoteMediaClient().onMessageReceived(
|
|
- mCastSession.getCastDevice(), CastSessionUtil.MEDIA_NAMESPACE, message);
|
|
- }
|
|
-
|
|
- /** Attaches the controller to the current {@link CastSession}. */
|
|
- public void attachToCastSession(CastSession session) {
|
|
- mCastSession = session;
|
|
- RemoteMediaClient uncheckedRemoteMediaClient = mCastSession.getRemoteMediaClient();
|
|
- if (uncheckedRemoteMediaClient != null) {
|
|
- uncheckedRemoteMediaClient.registerCallback(mRemoteMediaClientCallback);
|
|
- }
|
|
- }
|
|
-
|
|
- /** Detaches the controller from any {@link CastSession}. */
|
|
- public void detachFromCastSession() {
|
|
- if (mCastSession == null) return;
|
|
-
|
|
- RemoteMediaClient uncheckedRemoteMediaClient = mCastSession.getRemoteMediaClient();
|
|
- if (uncheckedRemoteMediaClient != null) {
|
|
- uncheckedRemoteMediaClient.unregisterCallback(mRemoteMediaClientCallback);
|
|
- }
|
|
- mCastSession = null;
|
|
}
|
|
|
|
/** Called when session started. */
|
|
@@ -163,50 +105,12 @@ public abstract class BaseSessionController {
|
|
return mProvider;
|
|
}
|
|
|
|
- /**
|
|
- * All sub-classes need to register this method to listen to messages of the namespaces they are
|
|
- * interested in.
|
|
- */
|
|
- protected void onMessageReceived(CastDevice castDevice, String namespace, String message) {
|
|
- Log.d(TAG,
|
|
- "Received message from Cast device: namespace=\"" + namespace + "\" message=\""
|
|
- + message + "\"");
|
|
- if (CastSessionUtil.MEDIA_NAMESPACE.equals(namespace)) {
|
|
- updateRemoteMediaClient(message);
|
|
- }
|
|
- }
|
|
-
|
|
- private class RemoteMediaClientCallback extends RemoteMediaClient.Callback {
|
|
- @Override
|
|
- public void onStatusUpdated() {
|
|
- BaseSessionController.this.onStatusUpdated();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onMetadataUpdated() {
|
|
- BaseSessionController.this.onMetadataUpdated();
|
|
- }
|
|
- }
|
|
-
|
|
- protected void onStatusUpdated() {
|
|
- notifyCallback((Callback callback) -> callback.onStatusUpdated());
|
|
- }
|
|
-
|
|
- protected void onMetadataUpdated() {
|
|
- notifyCallback((Callback callback) -> callback.onMetadataUpdated());
|
|
- }
|
|
-
|
|
- @Nullable
|
|
- public FlingingController getFlingingController() {
|
|
- return null;
|
|
- }
|
|
-
|
|
/**
|
|
* Helper message to get the session ID of the attached session. For stubbing in tests as
|
|
* {@link CastSession#getSessionId()} is final.
|
|
*/
|
|
public String getSessionId() {
|
|
- return isConnected() ? getSession().getSessionId() : null;
|
|
+ return null;
|
|
}
|
|
|
|
private void notifyCallback(NotifyCallbackAction action) {
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafBaseMediaRouteProvider.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafBaseMediaRouteProvider.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafBaseMediaRouteProvider.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafBaseMediaRouteProvider.java
|
|
@@ -12,9 +12,6 @@ import androidx.mediarouter.media.MediaRouteSelector;
|
|
import androidx.mediarouter.media.MediaRouter;
|
|
import androidx.mediarouter.media.MediaRouter.RouteInfo;
|
|
|
|
-import com.google.android.gms.cast.framework.CastSession;
|
|
-import com.google.android.gms.cast.framework.SessionManagerListener;
|
|
-
|
|
import org.chromium.base.Log;
|
|
import org.chromium.components.media_router.DiscoveryCallback;
|
|
import org.chromium.components.media_router.DiscoveryDelegate;
|
|
@@ -38,7 +35,7 @@ import java.util.Set;
|
|
* A base provider containing common implementation for CAF-based {@link MediaRouteProvider}s.
|
|
*/
|
|
public abstract class CafBaseMediaRouteProvider
|
|
- implements MediaRouteProvider, DiscoveryDelegate, SessionManagerListener<CastSession> {
|
|
+ implements MediaRouteProvider, DiscoveryDelegate {
|
|
private static final String TAG = "CafMR";
|
|
|
|
protected static final List<MediaSink> NO_SINKS = Collections.emptyList();
|
|
@@ -165,7 +162,6 @@ public abstract class CafBaseMediaRouteProvider
|
|
// current session and clean up the routes (can't wait for session ending as the signal
|
|
// might be delayed).
|
|
sessionController().endSession();
|
|
- handleSessionEnd();
|
|
}
|
|
if (mPendingCreateRouteRequestInfo != null) {
|
|
cancelPendingRequest("Request replaced");
|
|
@@ -194,9 +190,6 @@ public abstract class CafBaseMediaRouteProvider
|
|
mManager.onCreateRouteRequestError("The sink does not exist", nativeRequestId);
|
|
}
|
|
|
|
- CastUtils.getCastContext().getSessionManager().addSessionManagerListener(
|
|
- this, CastSession.class);
|
|
-
|
|
mPendingCreateRouteRequestInfo = new CreateRouteRequestInfo(source, sink, presentationId,
|
|
origin, tabId, isOffTheRecord, nativeRequestId, targetRouteInfo);
|
|
|
|
@@ -223,100 +216,6 @@ public abstract class CafBaseMediaRouteProvider
|
|
removeRoute(routeId, /* error= */ null);
|
|
}
|
|
|
|
- ///////////////////////////////////////////////////////
|
|
- // SessionManagerListener implementation begin
|
|
- ///////////////////////////////////////////////////////
|
|
-
|
|
- @Override
|
|
- public final void onSessionStarting(CastSession session) {
|
|
- // The session is not connected yet at this point so this is no-op.
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onSessionStartFailed(CastSession session, int error) {
|
|
- removeAllRoutes("Launch error");
|
|
- cancelPendingRequest("Launch error");
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onSessionStarted(CastSession session, String sessionId) {
|
|
- Log.d(TAG, "onSessionStarted");
|
|
-
|
|
- if (session != CastUtils.getCastContext().getSessionManager().getCurrentCastSession()) {
|
|
- // Sometimes the session start signal might come in for an earlier launch request, which
|
|
- // should be ignored.
|
|
- return;
|
|
- }
|
|
-
|
|
- if (session == sessionController().getSession() || mPendingCreateRouteRequestInfo == null) {
|
|
- // Early return for any possible case that the session start signal comes in twice for
|
|
- // the same session.
|
|
- return;
|
|
- }
|
|
- handleSessionStart(session, sessionId);
|
|
- }
|
|
-
|
|
- @Override
|
|
- public final void onSessionResumed(CastSession session, boolean wasSuspended) {
|
|
- sessionController().attachToCastSession(session);
|
|
- }
|
|
-
|
|
- @Override
|
|
- public final void onSessionResuming(CastSession session, String sessionId) {}
|
|
-
|
|
- @Override
|
|
- public final void onSessionResumeFailed(CastSession session, int error) {}
|
|
-
|
|
- @Override
|
|
- public final void onSessionEnding(CastSession session) {
|
|
- handleSessionEnd();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public final void onSessionEnded(CastSession session, int error) {
|
|
- Log.d(TAG, "Session ended with error code " + error);
|
|
- handleSessionEnd();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public final void onSessionSuspended(CastSession session, int reason) {
|
|
- sessionController().detachFromCastSession();
|
|
- }
|
|
-
|
|
- ///////////////////////////////////////////////////////
|
|
- // SessionManagerListener implementation end
|
|
- ///////////////////////////////////////////////////////
|
|
-
|
|
- protected void handleSessionStart(CastSession session, String sessionId) {
|
|
- sessionController().attachToCastSession(session);
|
|
- sessionController().onSessionStarted();
|
|
-
|
|
- MediaSink sink = mPendingCreateRouteRequestInfo.sink;
|
|
- MediaSource source = mPendingCreateRouteRequestInfo.getMediaSource();
|
|
- MediaRoute route = new MediaRoute(
|
|
- sink.getId(), source.getSourceId(), mPendingCreateRouteRequestInfo.presentationId);
|
|
- addRoute(route, mPendingCreateRouteRequestInfo.origin, mPendingCreateRouteRequestInfo.tabId,
|
|
- mPendingCreateRouteRequestInfo.nativeRequestId, /* wasLaunched= */ true);
|
|
-
|
|
- mPendingCreateRouteRequestInfo = null;
|
|
- }
|
|
-
|
|
- private void handleSessionEnd() {
|
|
- if (mPendingCreateRouteRequestInfo != null) {
|
|
- // The Cast SDK notifies about session ending when a route is unselected, even when
|
|
- // there's no current session. Because CastSessionController unselects the route to set
|
|
- // the receiver app ID, this needs to be guarded by a pending request null check to make
|
|
- // sure the listener is not unregistered during a session relaunch.
|
|
- return;
|
|
- }
|
|
- sessionController().onSessionEnded();
|
|
- sessionController().detachFromCastSession();
|
|
- getAndroidMediaRouter().selectRoute(getAndroidMediaRouter().getDefaultRoute());
|
|
- terminateAllRoutes();
|
|
- CastUtils.getCastContext().getSessionManager().removeSessionManagerListener(
|
|
- this, CastSession.class);
|
|
- }
|
|
-
|
|
private void cancelPendingRequest(String error) {
|
|
if (mPendingCreateRouteRequestInfo == null) return;
|
|
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMediaRouteProvider.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMediaRouteProvider.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMediaRouteProvider.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMediaRouteProvider.java
|
|
@@ -11,8 +11,6 @@ import androidx.annotation.Nullable;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import androidx.mediarouter.media.MediaRouter;
|
|
|
|
-import com.google.android.gms.cast.framework.CastSession;
|
|
-
|
|
import org.chromium.base.Log;
|
|
import org.chromium.components.media_router.BrowserMediaRouter;
|
|
import org.chromium.components.media_router.ClientRecord;
|
|
@@ -150,20 +148,6 @@ public class CafMediaRouteProvider extends CafBaseMediaRouteProvider {
|
|
return mMessageHandler;
|
|
}
|
|
|
|
- @Override
|
|
- protected void handleSessionStart(CastSession session, String sessionId) {
|
|
- super.handleSessionStart(session, sessionId);
|
|
-
|
|
- for (ClientRecord clientRecord : mClientIdToRecords.values()) {
|
|
- // Should be exactly one instance of MediaRoute/ClientRecord at this moment.
|
|
- mMessageHandler.sendReceiverActionToClient(clientRecord.routeId,
|
|
- sessionController().getSink(), clientRecord.clientId, "cast");
|
|
- }
|
|
-
|
|
- mMessageHandler.onSessionStarted();
|
|
- sessionController().getSession().getRemoteMediaClient().requestStatus();
|
|
- }
|
|
-
|
|
@Override
|
|
protected void addRoute(
|
|
MediaRoute route, String origin, int tabId, int nativeRequestId, boolean wasLaunched) {
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMessageHandler.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMessageHandler.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMessageHandler.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CafMessageHandler.java
|
|
@@ -13,10 +13,6 @@ import android.util.SparseArray;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import androidx.collection.ArrayMap;
|
|
|
|
-import com.google.android.gms.cast.ApplicationMetadata;
|
|
-import com.google.android.gms.common.api.PendingResult;
|
|
-import com.google.android.gms.common.api.Status;
|
|
-
|
|
import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
@@ -340,49 +336,7 @@ public class CafMessageHandler {
|
|
final int sequenceNumber) throws JSONException {
|
|
if (volumeMessage == null) return false;
|
|
if (!mSessionController.isConnected()) return false;
|
|
- boolean shouldWaitForVolumeChange = false;
|
|
- try {
|
|
- if (!volumeMessage.isNull("muted")) {
|
|
- boolean newMuted = volumeMessage.getBoolean("muted");
|
|
- if (mSessionController.getSession().isMute() != newMuted) {
|
|
- mSessionController.getSession().setMute(newMuted);
|
|
- shouldWaitForVolumeChange = true;
|
|
- }
|
|
- }
|
|
- if (!volumeMessage.isNull("level")) {
|
|
- double newLevel = volumeMessage.getDouble("level");
|
|
- double currentLevel = mSessionController.getSession().getVolume();
|
|
- if (!Double.isNaN(currentLevel)
|
|
- && Math.abs(currentLevel - newLevel)
|
|
- > CastSessionUtil.MIN_VOLUME_LEVEL_DELTA) {
|
|
- mSessionController.getSession().setVolume(newLevel);
|
|
- shouldWaitForVolumeChange = true;
|
|
- }
|
|
- }
|
|
- } catch (IOException | IllegalStateException e) {
|
|
- Log.e(TAG, "Failed to send volume command: " + e);
|
|
- return false;
|
|
- }
|
|
-
|
|
- // For each successful volume message we need to respond with an empty "v2_message" so the
|
|
- // Cast Web SDK can call the success callback of the page. If we expect the volume to change
|
|
- // as the result of the command, we're relying on {@link Cast.CastListener#onVolumeChanged}
|
|
- // to get called by the Android Cast SDK when the receiver status is updated. We keep the
|
|
- // sequence number until then. If the volume doesn't change as the result of the command, we
|
|
- // won't get notified by the Android SDK
|
|
- if (shouldWaitForVolumeChange) {
|
|
- mVolumeRequests.add(new RequestRecord(clientId, sequenceNumber));
|
|
- } else {
|
|
- // It's usually bad to have request and response on the same call stack so post the
|
|
- // response to the Android message loop.
|
|
- mHandler.post(new Runnable() {
|
|
- @Override
|
|
- public void run() {
|
|
- onVolumeChanged(clientId, sequenceNumber);
|
|
- }
|
|
- });
|
|
- }
|
|
- return true;
|
|
+ return false;
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@@ -670,19 +624,11 @@ public class CafMessageHandler {
|
|
try {
|
|
// "volume" is a part of "receiver" initialized below.
|
|
JSONObject jsonVolume = new JSONObject();
|
|
- jsonVolume.put("level", mSessionController.getSession().getVolume());
|
|
- jsonVolume.put("muted", mSessionController.getSession().isMute());
|
|
|
|
// "receiver" is a part of "message" initialized below.
|
|
JSONObject jsonReceiver = new JSONObject();
|
|
- jsonReceiver.put(
|
|
- "label", mSessionController.getSession().getCastDevice().getDeviceId());
|
|
- jsonReceiver.put("friendlyName",
|
|
- mSessionController.getSession().getCastDevice().getFriendlyName());
|
|
jsonReceiver.put("capabilities", toJSONArray(mSessionController.getCapabilities()));
|
|
jsonReceiver.put("volume", jsonVolume);
|
|
- jsonReceiver.put(
|
|
- "isActiveInput", mSessionController.getSession().getActiveInputState());
|
|
jsonReceiver.put("displayStatus", null);
|
|
jsonReceiver.put("receiverType", "cast");
|
|
|
|
@@ -695,25 +641,16 @@ public class CafMessageHandler {
|
|
|
|
JSONObject jsonMessage = new JSONObject();
|
|
jsonMessage.put("sessionId", mSessionController.getSessionId());
|
|
- jsonMessage.put("statusText", mSessionController.getSession().getApplicationStatus());
|
|
jsonMessage.put("receiver", jsonReceiver);
|
|
jsonMessage.put("namespaces", jsonNamespaces);
|
|
jsonMessage.put("media", toJSONArray(new ArrayList<>()));
|
|
jsonMessage.put("status", "connected");
|
|
jsonMessage.put("transportId", "web-4");
|
|
|
|
- ApplicationMetadata applicationMetadata =
|
|
- mSessionController.getSession().getApplicationMetadata();
|
|
- if (applicationMetadata != null) {
|
|
- jsonMessage.put("appId", applicationMetadata.getApplicationId());
|
|
- } else {
|
|
- jsonMessage.put("appId",
|
|
- mSessionController.getRouteCreationInfo()
|
|
+ jsonMessage.put("appId",
|
|
+ mSessionController.getRouteCreationInfo()
|
|
.getMediaSource()
|
|
.getApplicationId());
|
|
- }
|
|
- jsonMessage.put("displayName",
|
|
- mSessionController.getSession().getCastDevice().getFriendlyName());
|
|
|
|
return jsonMessage.toString();
|
|
} catch (JSONException e) {
|
|
@@ -794,32 +731,6 @@ public class CafMessageHandler {
|
|
boolean sendStringCastMessage(
|
|
String message, String namespace, String clientId, int sequenceNumber) {
|
|
if (!mSessionController.isConnected()) return false;
|
|
-
|
|
- PendingResult<Status> pendingResult =
|
|
- mSessionController.getSession().sendMessage(namespace, message);
|
|
- if (!TextUtils.equals(namespace, CastSessionUtil.MEDIA_NAMESPACE)) {
|
|
- // Media commands wait for the media status update as a result.
|
|
- pendingResult.setResultCallback(
|
|
- (Status result) -> onSendAppMessageResult(result, clientId, sequenceNumber));
|
|
- }
|
|
- return true;
|
|
- }
|
|
-
|
|
- /**
|
|
- * Notifies a client that an app message has been sent.
|
|
- * @param clientId The client id the message is sent from.
|
|
- * @param sequenceNumber The sequence number of the message.
|
|
- */
|
|
- void onSendAppMessageResult(Status result, String clientId, int sequenceNumber) {
|
|
- if (!result.isSuccess()) {
|
|
- // TODO(avayvod): should actually report back to the page.
|
|
- // See https://crbug.com/550445.
|
|
- Log.e(TAG, "Failed to send the message: " + result);
|
|
- return;
|
|
- }
|
|
-
|
|
- // App messages wait for the empty message with the sequence
|
|
- // number.
|
|
- sendEnclosedMessageToClient(clientId, "app_message", null, sequenceNumber);
|
|
+ return false;
|
|
}
|
|
}
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastMediaSource.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastMediaSource.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastMediaSource.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastMediaSource.java
|
|
@@ -9,8 +9,6 @@ import android.net.Uri;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.mediarouter.media.MediaRouteSelector;
|
|
|
|
-import com.google.android.gms.cast.CastMediaControlIntent;
|
|
-
|
|
import org.chromium.components.media_router.MediaSource;
|
|
|
|
import java.util.Arrays;
|
|
@@ -106,13 +104,7 @@ public class CastMediaSource implements MediaSource {
|
|
*/
|
|
@Override
|
|
public MediaRouteSelector buildRouteSelector() {
|
|
- try {
|
|
- return new MediaRouteSelector.Builder()
|
|
- .addControlCategory(CastMediaControlIntent.categoryForCast(mApplicationId))
|
|
- .build();
|
|
- } catch (IllegalArgumentException e) {
|
|
- return null;
|
|
- }
|
|
+ return null;
|
|
}
|
|
|
|
/**
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java
|
|
@@ -6,28 +6,8 @@ package org.chromium.components.media_router.caf;
|
|
|
|
import android.content.Context;
|
|
|
|
-import com.google.android.gms.cast.LaunchOptions;
|
|
-import com.google.android.gms.cast.framework.CastOptions;
|
|
-import com.google.android.gms.cast.framework.OptionsProvider;
|
|
-import com.google.android.gms.cast.framework.SessionProvider;
|
|
-
|
|
import java.util.List;
|
|
|
|
/** {@link OptionsProvider} implementation for Chrome MR. */
|
|
-public class CastOptionsProvider implements OptionsProvider {
|
|
- @Override
|
|
- public CastOptions getCastOptions(Context context) {
|
|
- return new CastOptions.Builder()
|
|
- .setCastMediaOptions(null)
|
|
- .setEnableReconnectionService(false)
|
|
- .setLaunchOptions(new LaunchOptions.Builder().setRelaunchIfRunning(true).build())
|
|
- .setResumeSavedSession(false)
|
|
- .setStopReceiverApplicationWhenEndingSession(true)
|
|
- .build();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public List<SessionProvider> getAdditionalSessionProviders(Context context) {
|
|
- return null;
|
|
- }
|
|
+public class CastOptionsProvider {
|
|
}
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastSessionController.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastSessionController.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastSessionController.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastSessionController.java
|
|
@@ -7,11 +7,6 @@ package org.chromium.components.media_router.caf;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.VisibleForTesting;
|
|
|
|
-import com.google.android.gms.cast.ApplicationMetadata;
|
|
-import com.google.android.gms.cast.Cast;
|
|
-import com.google.android.gms.cast.CastDevice;
|
|
-import com.google.android.gms.cast.framework.CastSession;
|
|
-
|
|
import org.chromium.base.Log;
|
|
|
|
import java.util.ArrayList;
|
|
@@ -24,12 +19,10 @@ public class CastSessionController extends BaseSessionController {
|
|
private static final String TAG = "CafSessionCtrl";
|
|
|
|
private List<String> mNamespaces = new ArrayList<String>();
|
|
- private CastListener mCastListener;
|
|
private CafNotificationController mNotificationController;
|
|
|
|
public CastSessionController(CafBaseMediaRouteProvider provider) {
|
|
super(provider);
|
|
- mCastListener = new CastListener();
|
|
mNotificationController = new CafNotificationController(this);
|
|
}
|
|
|
|
@@ -37,30 +30,6 @@ public class CastSessionController extends BaseSessionController {
|
|
return mNamespaces;
|
|
}
|
|
|
|
- /**
|
|
- * Init nested fields for testing. The reason is that nested classes are bound to the original
|
|
- * instance instead of the spyed instance.
|
|
- */
|
|
- void initNestedFieldsForTesting() {
|
|
- mCastListener = new CastListener();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void attachToCastSession(CastSession session) {
|
|
- super.attachToCastSession(session);
|
|
- getSession().addCastListener(mCastListener);
|
|
- updateNamespaces();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void detachFromCastSession() {
|
|
- if (getSession() == null) return;
|
|
-
|
|
- mNamespaces.clear();
|
|
- getSession().removeCastListener(mCastListener);
|
|
- super.detachFromCastSession();
|
|
- }
|
|
-
|
|
@Override
|
|
public void onSessionEnded() {
|
|
getMessageHandler().onSessionEnded();
|
|
@@ -72,24 +41,6 @@ public class CastSessionController extends BaseSessionController {
|
|
return mNotificationController;
|
|
}
|
|
|
|
- private class CastListener extends Cast.Listener {
|
|
- @Override
|
|
- public void onApplicationStatusChanged() {
|
|
- CastSessionController.this.onApplicationStatusChanged();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onApplicationMetadataChanged(ApplicationMetadata metadata) {
|
|
- CastSessionController.this.onApplicationStatusChanged();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onVolumeChanged() {
|
|
- CastSessionController.this.onApplicationStatusChanged();
|
|
- getMessageHandler().onVolumeChanged();
|
|
- }
|
|
- }
|
|
-
|
|
private void onApplicationStatusChanged() {
|
|
updateNamespaces();
|
|
|
|
@@ -100,53 +51,18 @@ public class CastSessionController extends BaseSessionController {
|
|
@VisibleForTesting
|
|
void updateNamespaces() {
|
|
if (!isConnected()) return;
|
|
-
|
|
- if (getSession().getApplicationMetadata() == null
|
|
- || getSession().getApplicationMetadata().getSupportedNamespaces() == null) {
|
|
- return;
|
|
- }
|
|
-
|
|
- Set<String> namespacesToAdd =
|
|
- new HashSet<>(getSession().getApplicationMetadata().getSupportedNamespaces());
|
|
- Set<String> namespacesToRemove = new HashSet<String>(mNamespaces);
|
|
-
|
|
- namespacesToRemove.removeAll(namespacesToAdd);
|
|
- namespacesToAdd.removeAll(mNamespaces);
|
|
-
|
|
- for (String namespace : namespacesToRemove) unregisterNamespace(namespace);
|
|
- for (String namespace : namespacesToAdd) registerNamespace(namespace);
|
|
}
|
|
|
|
private void registerNamespace(String namespace) {
|
|
assert !mNamespaces.contains(namespace);
|
|
|
|
if (!isConnected()) return;
|
|
-
|
|
- try {
|
|
- getSession().setMessageReceivedCallbacks(namespace, this::onMessageReceived);
|
|
- mNamespaces.add(namespace);
|
|
- } catch (Exception e) {
|
|
- Log.e(TAG, "Failed to register namespace listener for %s", namespace, e);
|
|
- }
|
|
}
|
|
|
|
private void unregisterNamespace(String namespace) {
|
|
assert mNamespaces.contains(namespace);
|
|
|
|
if (!isConnected()) return;
|
|
-
|
|
- try {
|
|
- getSession().removeMessageReceivedCallbacks(namespace);
|
|
- mNamespaces.remove(namespace);
|
|
- } catch (Exception e) {
|
|
- Log.e(TAG, "Failed to remove the namespace listener for %s", namespace, e);
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- protected void onMessageReceived(CastDevice castDevice, String namespace, String message) {
|
|
- super.onMessageReceived(castDevice, namespace, message);
|
|
- getMessageHandler().onMessageReceived(namespace, message);
|
|
}
|
|
|
|
@NonNull
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastUtils.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastUtils.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastUtils.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastUtils.java
|
|
@@ -4,18 +4,10 @@
|
|
|
|
package org.chromium.components.media_router.caf;
|
|
|
|
-import com.google.android.gms.cast.framework.CastContext;
|
|
-
|
|
import org.chromium.components.media_router.MediaRouterClient;
|
|
|
|
/** Utility methods for Cast. */
|
|
public class CastUtils {
|
|
- /** Helper method to return the {@link CastContext} instance. */
|
|
- public static CastContext getCastContext() {
|
|
- return CastContext.getSharedInstance(
|
|
- MediaRouterClient.getInstance().getContextForRemoting());
|
|
- }
|
|
-
|
|
/**
|
|
* Compares two origins. Empty origin strings correspond to unique origins in
|
|
* url::Origin.
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafExpandedControllerActivity.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafExpandedControllerActivity.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafExpandedControllerActivity.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafExpandedControllerActivity.java
|
|
@@ -44,54 +44,35 @@ public class CafExpandedControllerActivity
|
|
private MediaController.Delegate mControllerDelegate = new MediaController.Delegate() {
|
|
@Override
|
|
public void play() {
|
|
- if (!mSessionController.isConnected()) return;
|
|
-
|
|
- mSessionController.getSession().getRemoteMediaClient().play();
|
|
}
|
|
|
|
@Override
|
|
public void pause() {
|
|
- if (!mSessionController.isConnected()) return;
|
|
-
|
|
- mSessionController.getSession().getRemoteMediaClient().pause();
|
|
}
|
|
|
|
@Override
|
|
public long getDuration() {
|
|
- if (!mSessionController.isConnected()) return 0;
|
|
- return mSessionController.getFlingingController().getDuration();
|
|
+ return 0;
|
|
}
|
|
|
|
@Override
|
|
public long getPosition() {
|
|
- if (!mSessionController.isConnected()) return 0;
|
|
- return mSessionController.getFlingingController().getApproximateCurrentTime();
|
|
+ return 0;
|
|
}
|
|
|
|
@Override
|
|
public void seekTo(long pos) {
|
|
- if (!mSessionController.isConnected()) return;
|
|
-
|
|
- mSessionController.getSession().getRemoteMediaClient().seek(pos);
|
|
}
|
|
|
|
@Override
|
|
public boolean isPlaying() {
|
|
- if (!mSessionController.isConnected()) return false;
|
|
-
|
|
- return mSessionController.getSession().getRemoteMediaClient().isPlaying();
|
|
+ return false;
|
|
}
|
|
|
|
@Override
|
|
public long getActionFlags() {
|
|
long flags =
|
|
PlaybackStateCompat.ACTION_REWIND | PlaybackStateCompat.ACTION_FAST_FORWARD;
|
|
- if (mSessionController.isConnected()
|
|
- && mSessionController.getSession().getRemoteMediaClient().isPlaying()) {
|
|
- flags |= PlaybackStateCompat.ACTION_PAUSE;
|
|
- } else {
|
|
- flags |= PlaybackStateCompat.ACTION_PLAY;
|
|
- }
|
|
return flags;
|
|
}
|
|
};
|
|
@@ -180,20 +161,10 @@ public class CafExpandedControllerActivity
|
|
private void updateUi() {
|
|
if (!mSessionController.isConnected()) return;
|
|
|
|
- String deviceName = mSessionController.getSession().getCastDevice().getFriendlyName();
|
|
- String titleText = "";
|
|
- if (deviceName != null) {
|
|
- titleText = getResources().getString(R.string.cast_casting_video, deviceName);
|
|
- }
|
|
- mTitleView.setText(titleText);
|
|
-
|
|
mMediaController.refresh();
|
|
mMediaController.updateProgress();
|
|
|
|
cancelProgressUpdateTask();
|
|
- if (mSessionController.getSession().getRemoteMediaClient().isPlaying()) {
|
|
- scheduleProgressUpdateTask();
|
|
- }
|
|
}
|
|
|
|
private void scheduleProgressUpdateTask() {
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafRemotingMediaRouteProvider.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafRemotingMediaRouteProvider.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafRemotingMediaRouteProvider.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/CafRemotingMediaRouteProvider.java
|
|
@@ -69,7 +69,7 @@ public class CafRemotingMediaRouteProvider extends CafBaseMediaRouteProvider {
|
|
|
|
if (!mRoutes.containsKey(routeId)) return null;
|
|
|
|
- return sessionController().getFlingingController();
|
|
+ return null;
|
|
}
|
|
|
|
@Override
|
|
@@ -78,7 +78,7 @@ public class CafRemotingMediaRouteProvider extends CafBaseMediaRouteProvider {
|
|
var controller = sessionController();
|
|
|
|
// There is no active remote playback media route.
|
|
- if (!hasSession() || controller.getFlingingController() == null) return;
|
|
+ if (!hasSession() || (true)) return;
|
|
|
|
// Do not update media source for a detached session.
|
|
if (!mRoutes.containsKey(controller.getRouteCreationInfo().routeId)) return;
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java
|
|
@@ -4,11 +4,6 @@
|
|
|
|
package org.chromium.components.media_router.caf.remoting;
|
|
|
|
-import com.google.android.gms.cast.MediaInfo;
|
|
-import com.google.android.gms.cast.MediaStatus;
|
|
-import com.google.android.gms.cast.framework.media.RemoteMediaClient;
|
|
-import com.google.android.gms.common.api.Result;
|
|
-
|
|
import org.chromium.base.Log;
|
|
import org.chromium.components.media_router.FlingingController;
|
|
import org.chromium.components.media_router.MediaController;
|
|
@@ -80,14 +75,6 @@ public class FlingingControllerAdapter implements FlingingController, MediaContr
|
|
/** Starts loading the media URL, from the given position. */
|
|
public void load(long position, boolean autoplay) {
|
|
if (!mSessionController.isConnected()) return;
|
|
-
|
|
- mLoaded = true;
|
|
-
|
|
- MediaInfo mediaInfo = new MediaInfo.Builder(mMediaUrl)
|
|
- .setContentType("*/*")
|
|
- .setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)
|
|
- .build();
|
|
- mSessionController.getRemoteMediaClient().load(mediaInfo, autoplay, position);
|
|
}
|
|
|
|
////////////////////////////////////////////
|
|
@@ -102,89 +89,28 @@ public class FlingingControllerAdapter implements FlingingController, MediaContr
|
|
load(/* position= */ 0, /* autoplay= */ true);
|
|
return;
|
|
}
|
|
-
|
|
- mSessionController.getRemoteMediaClient().play().setResultCallback(
|
|
- this::onMediaCommandResult);
|
|
}
|
|
|
|
@Override
|
|
public void pause() {
|
|
if (!mSessionController.isConnected()) return;
|
|
- mSessionController.getRemoteMediaClient().pause().setResultCallback(
|
|
- this::onMediaCommandResult);
|
|
}
|
|
|
|
@Override
|
|
public void setMute(boolean mute) {
|
|
if (!mSessionController.isConnected()) return;
|
|
- mSessionController.getRemoteMediaClient().setStreamMute(mute).setResultCallback(
|
|
- this::onMediaCommandResult);
|
|
}
|
|
|
|
@Override
|
|
public void setVolume(double volume) {
|
|
if (!mSessionController.isConnected()) return;
|
|
- mSessionController.getRemoteMediaClient().setStreamVolume(volume).setResultCallback(
|
|
- this::onMediaCommandResult);
|
|
}
|
|
|
|
@Override
|
|
public void seek(long position) {
|
|
- if (!mSessionController.isConnected()) return;
|
|
-
|
|
- if (!mLoaded) {
|
|
- load(position, /* autoplay= */ true);
|
|
- return;
|
|
- }
|
|
-
|
|
- mSessionController.getRemoteMediaClient().seek(position).setResultCallback(
|
|
- this::onMediaCommandResult);
|
|
- mStreamPositionExtrapolator.onSeek(position);
|
|
}
|
|
|
|
////////////////////////////////////////////
|
|
// MediaController implementation end
|
|
////////////////////////////////////////////
|
|
-
|
|
- public void onStatusUpdated() {
|
|
- if (mMediaStatusObserver == null) return;
|
|
-
|
|
- RemoteMediaClient remoteMediaClient = mSessionController.getRemoteMediaClient();
|
|
-
|
|
- MediaStatus mediaStatus = remoteMediaClient.getMediaStatus();
|
|
- if (mediaStatus != null) {
|
|
- mHasEverReceivedValidMediaSession = true;
|
|
- if (mediaStatus.getPlayerState() == MediaStatus.PLAYER_STATE_IDLE
|
|
- && mediaStatus.getIdleReason() == MediaStatus.IDLE_REASON_FINISHED) {
|
|
- mLoaded = false;
|
|
- mStreamPositionExtrapolator.onFinish();
|
|
- } else {
|
|
- mStreamPositionExtrapolator.update(remoteMediaClient.getStreamDuration(),
|
|
- remoteMediaClient.getApproximateStreamPosition(),
|
|
- remoteMediaClient.isPlaying(), mediaStatus.getPlaybackRate());
|
|
- }
|
|
-
|
|
- mMediaStatusObserver.onMediaStatusUpdate(new MediaStatusBridge(mediaStatus));
|
|
-
|
|
- } else if (mHasEverReceivedValidMediaSession) {
|
|
- // We can receive a null |mediaStatus| while we are in the process of loading the video.
|
|
- // We should wait until we receive one valid media status before considering the video
|
|
- // unloaded. Otherwise, the first call to seek or play will reload the video.
|
|
- // See b/144325733.
|
|
- mLoaded = false;
|
|
- mStreamPositionExtrapolator.clear();
|
|
- }
|
|
- }
|
|
-
|
|
- private void onMediaCommandResult(Result result) {
|
|
- // When multiple API calls are made in quick succession, "Results have already been set"
|
|
- // IllegalStateExceptions might be thrown from GMS code. We prefer to catch the exception
|
|
- // and noop it, than to crash. This might lead to some API calls never getting their
|
|
- // onResult() called, so we should not rely on onResult() being called for every API call.
|
|
- // See https://crbug.com/853923.
|
|
- if (!result.getStatus().isSuccess()) {
|
|
- Log.e(TAG, "Error when sending command. Status code: %d",
|
|
- result.getStatus().getStatusCode());
|
|
- }
|
|
- }
|
|
}
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java
|
|
@@ -13,8 +13,6 @@ import android.util.Base64;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.mediarouter.media.MediaRouteSelector;
|
|
|
|
-import com.google.android.gms.cast.CastMediaControlIntent;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.base.Log;
|
|
import org.chromium.components.media_router.MediaSource;
|
|
@@ -84,9 +82,7 @@ public class RemotingMediaSource implements MediaSource {
|
|
*/
|
|
@Override
|
|
public MediaRouteSelector buildRouteSelector() {
|
|
- return new MediaRouteSelector.Builder()
|
|
- .addControlCategory(CastMediaControlIntent.categoryForCast(getApplicationId()))
|
|
- .build();
|
|
+ return null;
|
|
}
|
|
|
|
/**
|
|
@@ -113,7 +109,7 @@ public class RemotingMediaSource implements MediaSource {
|
|
|
|
sApplicationId = (customAppId != null && !customAppId.isEmpty())
|
|
? customAppId
|
|
- : CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID;
|
|
+ : "CC1AD845"; /*DEFAULT_MEDIA_RECEIVER_APPLICATION_ID*/
|
|
}
|
|
|
|
return sApplicationId;
|
|
diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingSessionController.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingSessionController.java
|
|
--- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingSessionController.java
|
|
+++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingSessionController.java
|
|
@@ -4,8 +4,6 @@
|
|
|
|
package org.chromium.components.media_router.caf.remoting;
|
|
|
|
-import com.google.android.gms.cast.framework.CastSession;
|
|
-
|
|
import org.chromium.base.Log;
|
|
import org.chromium.components.media_router.CastSessionUtil;
|
|
import org.chromium.components.media_router.MediaSource;
|
|
@@ -45,19 +43,6 @@ public class RemotingSessionController extends BaseSessionController {
|
|
getProvider().updateRouteMediaSource(getRouteCreationInfo().routeId, source.getSourceId());
|
|
}
|
|
|
|
- @Override
|
|
- public void attachToCastSession(CastSession session) {
|
|
- super.attachToCastSession(session);
|
|
-
|
|
- try {
|
|
- getSession().setMessageReceivedCallbacks(
|
|
- CastSessionUtil.MEDIA_NAMESPACE, this::onMessageReceived);
|
|
- } catch (Exception e) {
|
|
- Log.e(TAG, "Failed to register namespace listener for %s",
|
|
- CastSessionUtil.MEDIA_NAMESPACE, e);
|
|
- }
|
|
- }
|
|
-
|
|
@Override
|
|
public void onSessionStarted() {
|
|
super.onSessionStarted();
|
|
@@ -65,17 +50,6 @@ public class RemotingSessionController extends BaseSessionController {
|
|
mFlingingControllerAdapter = new FlingingControllerAdapter(this, source.getMediaUrl());
|
|
}
|
|
|
|
- @Override
|
|
- protected void onStatusUpdated() {
|
|
- mFlingingControllerAdapter.onStatusUpdated();
|
|
- super.onStatusUpdated();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public FlingingControllerAdapter getFlingingController() {
|
|
- return mFlingingControllerAdapter;
|
|
- }
|
|
-
|
|
@Override
|
|
public BaseNotificationController getNotificationController() {
|
|
return mNotificationController;
|
|
diff --git a/components/media_router/test/android/cast_emulator/BUILD.gn b/components/media_router/test/android/cast_emulator/BUILD.gn
|
|
--- a/components/media_router/test/android/cast_emulator/BUILD.gn
|
|
+++ b/components/media_router/test/android/cast_emulator/BUILD.gn
|
|
@@ -20,7 +20,6 @@ android_library("cast_emulator_java") {
|
|
"src/org/chromium/components/media_router/cast_emulator/router/DummyRoutePublisher.java",
|
|
]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_cast_java",
|
|
"//base:base_java",
|
|
"//third_party/androidx:androidx_mediarouter_mediarouter_java",
|
|
]
|
|
diff --git a/components/module_installer/android/BUILD.gn b/components/module_installer/android/BUILD.gn
|
|
--- a/components/module_installer/android/BUILD.gn
|
|
+++ b/components/module_installer/android/BUILD.gn
|
|
@@ -34,11 +34,9 @@ android_library("module_installer_java") {
|
|
]
|
|
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//components/crash/android:java",
|
|
- "//third_party/android_deps:playcore_java",
|
|
"//third_party/androidx:androidx_annotation_annotation_java",
|
|
]
|
|
|
|
@@ -58,11 +56,9 @@ robolectric_binary("module_installer_junit_tests") {
|
|
]
|
|
deps = [
|
|
":module_installer_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_junit_test_support",
|
|
- "//third_party/android_deps:playcore_java",
|
|
"//third_party/hamcrest:hamcrest_java",
|
|
]
|
|
}
|
|
diff --git a/components/signin/public/android/BUILD.gn b/components/signin/public/android/BUILD.gn
|
|
--- a/components/signin/public/android/BUILD.gn
|
|
+++ b/components/signin/public/android/BUILD.gn
|
|
@@ -3,8 +3,6 @@ import("//third_party/jni_zero/jni_zero.gni")
|
|
|
|
android_library("java") {
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_auth_base_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
@@ -178,7 +176,6 @@ robolectric_library("junit") {
|
|
deps = [
|
|
":java",
|
|
":signin_java_test_support",
|
|
- "$google_play_services_package:google_play_services_auth_base_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_java_test_support_uncommon",
|
|
diff --git a/components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java b/components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java
|
|
--- a/components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java
|
|
+++ b/components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java
|
|
@@ -10,10 +10,6 @@ import androidx.annotation.Nullable;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import androidx.annotation.WorkerThread;
|
|
|
|
-import com.google.android.gms.auth.AccountChangeEvent;
|
|
-import com.google.android.gms.auth.GoogleAuthException;
|
|
-import com.google.android.gms.auth.GoogleAuthUtil;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.base.Log;
|
|
import org.chromium.base.Promise;
|
|
@@ -51,18 +47,6 @@ public final class AccountRenameChecker {
|
|
*/
|
|
@Override
|
|
public @Nullable String getNewNameOfRenamedAccount(String accountEmail) {
|
|
- final Context context = ContextUtils.getApplicationContext();
|
|
- try {
|
|
- final List<AccountChangeEvent> accountChangeEvents =
|
|
- GoogleAuthUtil.getAccountChangeEvents(context, 0, accountEmail);
|
|
- for (AccountChangeEvent event : accountChangeEvents) {
|
|
- if (event.getChangeType() == GoogleAuthUtil.CHANGE_TYPE_ACCOUNT_RENAMED_TO) {
|
|
- return event.getChangeData();
|
|
- }
|
|
- }
|
|
- } catch (IOException | GoogleAuthException e) {
|
|
- Log.w(TAG, "Failed to get change events", e);
|
|
- }
|
|
return null;
|
|
}
|
|
}
|
|
diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/BUILD.gn
|
|
--- a/components/webauthn/android/BUILD.gn
|
|
+++ b/components/webauthn/android/BUILD.gn
|
|
@@ -7,8 +7,6 @@ import("//third_party/jni_zero/jni_zero.gni")
|
|
|
|
generate_jni("jni_headers") {
|
|
sources = [
|
|
- "java/src/org/chromium/components/webauthn/Fido2Api.java",
|
|
- "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java",
|
|
"java/src/org/chromium/components/webauthn/InternalAuthenticator.java",
|
|
"java/src/org/chromium/components/webauthn/WebAuthnBrowserBridge.java",
|
|
]
|
|
@@ -21,13 +19,8 @@ android_library("java") {
|
|
"java/src/org/chromium/components/webauthn/AuthenticatorImpl.java",
|
|
"java/src/org/chromium/components/webauthn/AuthenticatorIncognitoConfirmationBottomsheet.java",
|
|
"java/src/org/chromium/components/webauthn/Barrier.java",
|
|
- "java/src/org/chromium/components/webauthn/CredManHelper.java",
|
|
"java/src/org/chromium/components/webauthn/CredManMetricsHelper.java",
|
|
- "java/src/org/chromium/components/webauthn/Fido2Api.java",
|
|
- "java/src/org/chromium/components/webauthn/Fido2ApiCall.java",
|
|
"java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java",
|
|
- "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java",
|
|
- "java/src/org/chromium/components/webauthn/FidoErrorResponseCallback.java",
|
|
"java/src/org/chromium/components/webauthn/GetAssertionResponseCallback.java",
|
|
"java/src/org/chromium/components/webauthn/GetMatchingCredentialIdsResponseCallback.java",
|
|
"java/src/org/chromium/components/webauthn/InternalAuthenticator.java",
|
|
@@ -39,9 +32,6 @@ android_library("java") {
|
|
|
|
deps = [
|
|
":java_resources",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
@@ -96,8 +86,6 @@ android_library("test_support_java") {
|
|
|
|
source_set("android") {
|
|
sources = [
|
|
- "fido2api_native_android.cc",
|
|
- "fido2credentialrequest_native_android.cc",
|
|
"internal_authenticator_android.cc",
|
|
"internal_authenticator_android.h",
|
|
"webauthn_browser_bridge.cc",
|
|
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java
|
|
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java
|
|
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java
|
|
@@ -14,7 +14,6 @@ import android.util.Pair;
|
|
import androidx.annotation.Nullable;
|
|
|
|
import org.chromium.base.Callback;
|
|
-import org.chromium.base.PackageUtils;
|
|
import org.chromium.base.metrics.RecordHistogram;
|
|
import org.chromium.blink.mojom.Authenticator;
|
|
import org.chromium.blink.mojom.AuthenticatorStatus;
|
|
@@ -71,9 +70,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
/** The payment information to be added to the "clientDataJson". */
|
|
private PaymentOptions mPayment;
|
|
|
|
- /** Caches the GMS Core package version. */
|
|
- private int mGmsCorePackageVersion;
|
|
-
|
|
private MakeCredential_Response mMakeCredentialCallback;
|
|
private GetAssertion_Response mGetAssertionCallback;
|
|
// A queue is used to store pending IsUserVerifyingPlatformAuthenticatorAvailable request
|
|
@@ -82,14 +78,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
// situation does not matter because all pending requests will return the same value.
|
|
private Queue<org.chromium.mojo.bindings.Callbacks.Callback1<Boolean>>
|
|
mIsUserVerifyingPlatformAuthenticatorAvailableCallbackQueue = new LinkedList<>();
|
|
- private Fido2CredentialRequest mPendingFido2CredentialRequest;
|
|
- private Set<Fido2CredentialRequest> mUnclosedFido2CredentialRequests = new HashSet<>();
|
|
-
|
|
- // StaticFieldLeak complains that this is a memory leak because
|
|
- // `Fido2CredentialRequest` contains a `Context`. But this field is only
|
|
- // used in tests so a memory leak is irrelevent.
|
|
- @SuppressLint("StaticFieldLeak")
|
|
- private static Fido2CredentialRequest sFido2CredentialRequestOverrideForTesting;
|
|
|
|
/**
|
|
* Builds the Authenticator service implementation.
|
|
@@ -113,21 +101,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
mOrigin = mRenderFrameHost.getLastCommittedOrigin();
|
|
mTopOrigin = topOrigin;
|
|
mCreateConfirmationUiDelegate = createConfirmationUiDelegate;
|
|
-
|
|
- mGmsCorePackageVersion = PackageUtils.getPackageVersion(GMSCORE_PACKAGE_NAME);
|
|
- }
|
|
-
|
|
- public static void overrideFido2CredentialRequestForTesting(Fido2CredentialRequest request) {
|
|
- sFido2CredentialRequestOverrideForTesting = request;
|
|
- }
|
|
-
|
|
- private Fido2CredentialRequest getFido2CredentialRequest() {
|
|
- if (sFido2CredentialRequestOverrideForTesting != null) {
|
|
- return sFido2CredentialRequestOverrideForTesting;
|
|
- }
|
|
- Fido2CredentialRequest request = new Fido2CredentialRequest(mIntentSender);
|
|
- mUnclosedFido2CredentialRequests.add(request);
|
|
- return request;
|
|
}
|
|
|
|
/**
|
|
@@ -157,11 +130,9 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
|
|
mMakeCredentialCallback = callback;
|
|
mIsOperationPending = true;
|
|
- if (mGmsCorePackageVersion < GMSCORE_MIN_VERSION) {
|
|
- onError(AuthenticatorStatus.NOT_IMPLEMENTED);
|
|
- return;
|
|
- }
|
|
|
|
+ // Fido2 not supported on Bromite
|
|
+ onError(AuthenticatorStatus.NOT_IMPLEMENTED);
|
|
if (mCreateConfirmationUiDelegate != null) {
|
|
if (!mCreateConfirmationUiDelegate.show(
|
|
()
|
|
@@ -176,12 +147,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
|
|
private void continueMakeCredential(
|
|
PublicKeyCredentialCreationOptions options, MakeCredential_Response callback) {
|
|
- mPendingFido2CredentialRequest = getFido2CredentialRequest();
|
|
- mPendingFido2CredentialRequest.handleMakeCredentialRequest(mContext, options,
|
|
- mRenderFrameHost, /*maybeClientDataHash=*/null, mOrigin,
|
|
- (status, response)
|
|
- -> onRegisterResponse(status, response),
|
|
- status -> onError(status));
|
|
}
|
|
|
|
@Override
|
|
@@ -195,16 +160,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
mGetAssertionCallback = callback;
|
|
mIsOperationPending = true;
|
|
|
|
- if (mGmsCorePackageVersion < GMSCORE_MIN_VERSION) {
|
|
- onError(AuthenticatorStatus.NOT_IMPLEMENTED);
|
|
- return;
|
|
- }
|
|
-
|
|
- mPendingFido2CredentialRequest = getFido2CredentialRequest();
|
|
- mPendingFido2CredentialRequest.handleGetAssertionRequest(mContext, options,
|
|
- mRenderFrameHost,
|
|
- /*maybeClientDataHash=*/null, mOrigin, mTopOrigin, mPayment,
|
|
- (status, response) -> onSignResponse(status, response), status -> onError(status));
|
|
+ // Fido2 not supported on Bromite
|
|
+ onError(AuthenticatorStatus.NOT_IMPLEMENTED);
|
|
}
|
|
|
|
@Override
|
|
@@ -216,15 +173,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
callback.call(isUvpaa);
|
|
};
|
|
|
|
- if (mGmsCorePackageVersion < GMSCORE_MIN_VERSION) {
|
|
- decoratedCallback.call(false);
|
|
- return;
|
|
- }
|
|
-
|
|
- mIsUserVerifyingPlatformAuthenticatorAvailableCallbackQueue.add(decoratedCallback);
|
|
- getFido2CredentialRequest().handleIsUserVerifyingPlatformAuthenticatorAvailableRequest(
|
|
- mContext,
|
|
- isUvpaa -> onIsUserVerifyingPlatformAuthenticatorAvailableResponse(isUvpaa));
|
|
+ decoratedCallback.call(false);
|
|
+ return;
|
|
}
|
|
|
|
/**
|
|
@@ -233,7 +183,7 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
* version.
|
|
*/
|
|
public boolean isGetMatchingCredentialIdsSupported() {
|
|
- return mGmsCorePackageVersion >= GMSCORE_MIN_VERSION_GET_MATCHING_CRED_IDS;
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -247,32 +197,13 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
*/
|
|
public void getMatchingCredentialIds(String relyingPartyId, byte[][] credentialIds,
|
|
boolean requireThirdPartyPayment, GetMatchingCredentialIdsResponseCallback callback) {
|
|
- if (mGmsCorePackageVersion < GMSCORE_MIN_VERSION_GET_MATCHING_CRED_IDS) {
|
|
- callback.onResponse(new ArrayList<byte[]>());
|
|
- return;
|
|
- }
|
|
-
|
|
- getFido2CredentialRequest().handleGetMatchingCredentialIdsRequest(mRenderFrameHost,
|
|
- relyingPartyId, credentialIds, requireThirdPartyPayment, callback,
|
|
- status -> onError(status));
|
|
+ callback.onResponse(new ArrayList<byte[]>());
|
|
}
|
|
|
|
@Override
|
|
public void isConditionalMediationAvailable(
|
|
final IsConditionalMediationAvailable_Response callback) {
|
|
- if (mGmsCorePackageVersion < GMSCORE_MIN_VERSION
|
|
- || Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
|
- callback.call(false);
|
|
- return;
|
|
- }
|
|
-
|
|
- // If the gmscore and chromium versions are out of sync for some reason, this method will
|
|
- // return true but chrome will ignore conditional requests. Android surfaces only platform
|
|
- // credentials on conditional requests, use IsUVPAA as a proxy for availability.
|
|
- mIsUserVerifyingPlatformAuthenticatorAvailableCallbackQueue.add(callback);
|
|
- getFido2CredentialRequest().handleIsUserVerifyingPlatformAuthenticatorAvailableRequest(
|
|
- mContext,
|
|
- isUvpaa -> onIsUserVerifyingPlatformAuthenticatorAvailableResponse(isUvpaa));
|
|
+ callback.call(false);
|
|
}
|
|
|
|
@Override
|
|
@@ -284,8 +215,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
if (!mIsOperationPending || mGetAssertionCallback == null) {
|
|
return;
|
|
}
|
|
-
|
|
- mPendingFido2CredentialRequest.cancelConditionalGetAssertion(mRenderFrameHost);
|
|
}
|
|
|
|
/**
|
|
@@ -327,7 +256,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
} else if (mGetAssertionCallback != null) {
|
|
mGetAssertionCallback.call(status, null, null);
|
|
}
|
|
- if (mPendingFido2CredentialRequest != null) mPendingFido2CredentialRequest.destroyBridge();
|
|
cleanupRequest();
|
|
}
|
|
|
|
@@ -335,13 +263,10 @@ public final class AuthenticatorImpl implements Authenticator {
|
|
mIsOperationPending = false;
|
|
mMakeCredentialCallback = null;
|
|
mGetAssertionCallback = null;
|
|
- mPendingFido2CredentialRequest = null;
|
|
}
|
|
|
|
@Override
|
|
public void close() {
|
|
- mUnclosedFido2CredentialRequests.forEach(Fido2CredentialRequest::destroyBridge);
|
|
- mUnclosedFido2CredentialRequests.clear();
|
|
cleanupRequest();
|
|
}
|
|
|
|
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java
|
|
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java
|
|
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java
|
|
@@ -7,7 +7,6 @@ package org.chromium.components.webauthn;
|
|
import androidx.annotation.IntDef;
|
|
|
|
import org.chromium.base.metrics.RecordHistogram;
|
|
-import org.chromium.components.webauthn.Fido2CredentialRequest.ConditionalUiState;
|
|
|
|
/**
|
|
* This class is responsible for emitting histograms regarding CredMan usage in
|
|
@@ -77,20 +76,4 @@ public class CredManMetricsHelper {
|
|
RecordHistogram.recordTimesHistogram(
|
|
"WebAuthentication.Android.CredManPrepareRequestDuration", durationMs);
|
|
}
|
|
-
|
|
- public void reportGetCredentialMetrics(
|
|
- @CredManGetRequestEnum int value, ConditionalUiState conditionalUiState) {
|
|
- assert !(conditionalUiState == ConditionalUiState.NONE)
|
|
- || !(value == CredManGetRequestEnum.SUCCESS_PASSWORD)
|
|
- : "Passwords cannot be received from modal requests!";
|
|
- if (conditionalUiState == ConditionalUiState.NONE) {
|
|
- RecordHistogram.recordEnumeratedHistogram(
|
|
- "WebAuthentication.Android.CredManModalRequests", value,
|
|
- CredManGetRequestEnum.NUM_ENTRIES);
|
|
- return;
|
|
- }
|
|
- RecordHistogram.recordEnumeratedHistogram(
|
|
- "WebAuthentication.Android.CredManConditionalRequest", value,
|
|
- CredManGetRequestEnum.NUM_ENTRIES);
|
|
- }
|
|
}
|
|
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java
|
|
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java
|
|
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java
|
|
@@ -8,10 +8,6 @@ import android.app.PendingIntent;
|
|
import android.net.Uri;
|
|
import android.os.Parcel;
|
|
|
|
-import com.google.android.gms.tasks.OnFailureListener;
|
|
-import com.google.android.gms.tasks.OnSuccessListener;
|
|
-import com.google.android.gms.tasks.Task;
|
|
-
|
|
import org.chromium.base.ContextUtils;
|
|
import org.chromium.blink.mojom.PublicKeyCredentialCreationOptions;
|
|
import org.chromium.blink.mojom.PublicKeyCredentialRequestOptions;
|
|
@@ -43,58 +39,6 @@ public class Fido2ApiCallHelper {
|
|
}
|
|
|
|
public boolean arePlayServicesAvailable() {
|
|
- return ExternalAuthUtils.getInstance().canUseGooglePlayServices(
|
|
- new UserRecoverableErrorHandler.Silent());
|
|
- }
|
|
-
|
|
- public void invokeFido2GetCredentials(String relyingPartyId,
|
|
- OnSuccessListener<List<WebAuthnCredentialDetails>> successCallback,
|
|
- OnFailureListener failureCallback) {
|
|
- Fido2ApiCall call = new Fido2ApiCall(ContextUtils.getApplicationContext());
|
|
- Parcel args = call.start();
|
|
- Fido2ApiCall.WebAuthnCredentialDetailsListResult result =
|
|
- new Fido2ApiCall.WebAuthnCredentialDetailsListResult();
|
|
- args.writeStrongBinder(result);
|
|
- args.writeString(relyingPartyId);
|
|
-
|
|
- Task<List<WebAuthnCredentialDetails>> task =
|
|
- call.run(Fido2ApiCall.METHOD_BROWSER_GETCREDENTIALS,
|
|
- Fido2ApiCall.TRANSACTION_GETCREDENTIALS, args, result);
|
|
- task.addOnSuccessListener(successCallback);
|
|
- task.addOnFailureListener(failureCallback);
|
|
- }
|
|
-
|
|
- public void invokeFido2MakeCredential(PublicKeyCredentialCreationOptions options, Uri uri,
|
|
- byte[] clientDataHash, OnSuccessListener<PendingIntent> successCallback,
|
|
- OnFailureListener failureCallback) throws NoSuchAlgorithmException {
|
|
- Fido2ApiCall call = new Fido2ApiCall(ContextUtils.getApplicationContext());
|
|
- Parcel args = call.start();
|
|
- Fido2ApiCall.PendingIntentResult result = new Fido2ApiCall.PendingIntentResult();
|
|
- args.writeStrongBinder(result);
|
|
- args.writeInt(1); // This indicates that the following options are present.
|
|
-
|
|
- Fido2Api.appendBrowserMakeCredentialOptionsToParcel(options, uri, clientDataHash, args);
|
|
-
|
|
- Task<PendingIntent> task = call.run(Fido2ApiCall.METHOD_BROWSER_REGISTER,
|
|
- Fido2ApiCall.TRANSACTION_REGISTER, args, result);
|
|
- task.addOnSuccessListener(successCallback);
|
|
- task.addOnFailureListener(failureCallback);
|
|
- }
|
|
-
|
|
- public void invokeFido2GetAssertion(PublicKeyCredentialRequestOptions options, Uri uri,
|
|
- byte[] clientDataHash, OnSuccessListener<PendingIntent> successCallback,
|
|
- OnFailureListener failureCallback) {
|
|
- Fido2ApiCall call = new Fido2ApiCall(ContextUtils.getApplicationContext());
|
|
- Parcel args = call.start();
|
|
- Fido2ApiCall.PendingIntentResult result = new Fido2ApiCall.PendingIntentResult();
|
|
- args.writeStrongBinder(result);
|
|
- args.writeInt(1); // This indicates that the following options are present.
|
|
-
|
|
- Fido2Api.appendBrowserGetAssertionOptionsToParcel(
|
|
- options, uri, clientDataHash, /*tunnelId=*/null, args);
|
|
- Task<PendingIntent> task = call.run(
|
|
- Fido2ApiCall.METHOD_BROWSER_SIGN, Fido2ApiCall.TRANSACTION_SIGN, args, result);
|
|
- task.addOnSuccessListener(successCallback);
|
|
- task.addOnFailureListener(failureCallback);
|
|
+ return false;
|
|
}
|
|
}
|
|
diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/browser/push_messaging/push_messaging_manager.cc
|
|
--- a/content/browser/push_messaging/push_messaging_manager.cc
|
|
+++ b/content/browser/push_messaging/push_messaging_manager.cc
|
|
@@ -802,7 +802,7 @@ void PushMessagingManager::GetSubscriptionInfo(
|
|
}
|
|
|
|
PushMessagingService* PushMessagingManager::GetService() {
|
|
- return render_process_host_->GetBrowserContext()->GetPushMessagingService();
|
|
+ return nullptr;
|
|
}
|
|
|
|
} // namespace content
|
|
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
|
|
--- a/content/public/android/BUILD.gn
|
|
+++ b/content/public/android/BUILD.gn
|
|
@@ -142,10 +142,6 @@ android_library("content_full_java") {
|
|
deps = [
|
|
":content_java_resources",
|
|
":content_main_dex_java",
|
|
- "$google_play_services_package:google_play_services_auth_api_phone_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//base:process_launcher_java",
|
|
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
|
--- a/content/test/BUILD.gn
|
|
+++ b/content/test/BUILD.gn
|
|
@@ -3405,10 +3405,6 @@ if (is_android) {
|
|
testonly = true
|
|
sources = content_java_sources_needing_jni
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_auth_api_phone_java",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//content/public/android:content_java",
|
|
diff --git a/device/BUILD.gn b/device/BUILD.gn
|
|
--- a/device/BUILD.gn
|
|
+++ b/device/BUILD.gn
|
|
@@ -506,9 +506,6 @@ if (is_android) {
|
|
"gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java",
|
|
]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_location_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_junit_test_support",
|
|
"//device/gamepad:java",
|
|
diff --git a/remoting/android/client_java_tmpl.gni b/remoting/android/client_java_tmpl.gni
|
|
--- a/remoting/android/client_java_tmpl.gni
|
|
+++ b/remoting/android/client_java_tmpl.gni
|
|
@@ -105,9 +105,6 @@ template("remoting_android_client_java_tmpl") {
|
|
|
|
if (defined(invoker.play_services_package)) {
|
|
deps += [
|
|
- "${invoker.play_services_package}:google_play_services_auth_base_java",
|
|
- "${invoker.play_services_package}:google_play_services_base_java",
|
|
- "${invoker.play_services_package}:google_play_services_basement_java",
|
|
]
|
|
}
|
|
|
|
diff --git a/services/BUILD.gn b/services/BUILD.gn
|
|
--- a/services/BUILD.gn
|
|
+++ b/services/BUILD.gn
|
|
@@ -123,11 +123,6 @@ if (is_android) {
|
|
"shape_detection/android/junit/src/org/chromium/shape_detection/BitmapUtilsTest.java",
|
|
]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_location_java",
|
|
- "$google_play_services_package:google_play_services_vision_common_java",
|
|
- "$google_play_services_package:google_play_services_vision_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//base:base_junit_test_support",
|
|
@@ -157,10 +152,6 @@ if (is_android) {
|
|
"shape_detection/android/javatests/src/org/chromium/shape_detection/TextDetectionImplTest.java",
|
|
]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_vision_common_java",
|
|
- "$google_play_services_package:google_play_services_vision_java",
|
|
"//base:base_java",
|
|
"//base:base_java_test_support",
|
|
"//mojo/public/java:base_java",
|
|
diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn
|
|
--- a/services/device/geolocation/BUILD.gn
|
|
+++ b/services/device/geolocation/BUILD.gn
|
|
@@ -167,10 +167,6 @@ if (is_android) {
|
|
|
|
deps = [
|
|
":geolocation_jni_headers",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_location_java",
|
|
- "$google_play_services_package:google_play_services_tasks_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//build/android:build_java",
|
|
diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD.gn
|
|
--- a/services/shape_detection/BUILD.gn
|
|
+++ b/services/shape_detection/BUILD.gn
|
|
@@ -116,8 +116,6 @@ if (is_android) {
|
|
]
|
|
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"//base:base_java",
|
|
"//base:jni_java",
|
|
"//mojo/public/java:base_java",
|
|
diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.gn
|
|
--- a/third_party/android_deps/BUILD.gn
|
|
+++ b/third_party/android_deps/BUILD.gn
|
|
@@ -81,22 +81,13 @@ if (!limit_android_deps) {
|
|
|
|
android_library("chromium_play_services_availability_java") {
|
|
sources = [ "util/org/chromium/gms/ChromiumPlayServicesAvailability.java" ]
|
|
- deps = [ "$google_play_services_package:google_play_services_base_java" ]
|
|
+ deps = [ ]
|
|
}
|
|
|
|
robolectric_library("chromium_play_services_availability_shadows_java") {
|
|
sources = [ "util/org/chromium/gms/shadows/ShadowChromiumPlayServicesAvailability.java" ]
|
|
deps = [ ":chromium_play_services_availability_java" ]
|
|
}
|
|
-
|
|
- java_group("playcore_java") {
|
|
- preferred_dep = true
|
|
- if (defined(playcore_target)) {
|
|
- deps = [ playcore_target ]
|
|
- } else {
|
|
- deps = [ "//third_party/android_deps:com_google_android_play_feature_delivery_java" ]
|
|
- }
|
|
- }
|
|
}
|
|
|
|
# TODO(crbug.com/1366370) Remove this once all depencencies are updated to
|
|
@@ -767,212 +758,6 @@ if (!limit_android_deps) {
|
|
]
|
|
}
|
|
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_auth_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_auth/play-services-auth-20.1.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_auth/com_google_android_gms_play_services_auth.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_auth_api_phone_java",
|
|
- ":google_play_services_auth_base_java",
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_fragment_fragment_java",
|
|
- "//third_party/androidx:androidx_loader_loader_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_auth_api_phone_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_auth_api_phone/play-services-auth-api-phone-18.0.1.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_auth_api_phone/com_google_android_gms_play_services_auth_api_phone.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_auth_base_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_auth_base/play-services-auth-base-18.0.2.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_auth_base/com_google_android_gms_play_services_auth_base.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_base_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_base/play-services-base-18.0.1.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_base/com_google_android_gms_play_services_base.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- "//third_party/androidx:androidx_fragment_fragment_java",
|
|
- ]
|
|
- bytecode_rewriter_target =
|
|
- "//build/android/bytecode:fragment_activity_replacer"
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_basement_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_basement/play-services-basement-18.1.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_basement/com_google_android_gms_play_services_basement.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- "//third_party/androidx:androidx_fragment_fragment_java",
|
|
- ]
|
|
-
|
|
- jar_excluded_patterns = []
|
|
- if (!enable_java_asserts) {
|
|
- # Omit the file since we use our own copy.
|
|
- jar_excluded_patterns +=
|
|
- [ "com/google/android/gms/common/internal/Preconditions.class" ]
|
|
- deps += [ "//third_party/android_deps/local_modifications/preconditions:gms_stub_preconditions_java" ]
|
|
- }
|
|
-
|
|
- # https://crbug.com/989505
|
|
- jar_excluded_patterns += [ "META-INF/proguard/*" ]
|
|
- input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ]
|
|
- bytecode_rewriter_target =
|
|
- "//build/android/bytecode:fragment_activity_replacer"
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_cast_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_cast/play-services-cast-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_cast/com_google_android_gms_play_services_cast.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_flags_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- "//third_party/androidx:androidx_mediarouter_mediarouter_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_cast_framework_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_cast_framework/play-services-cast-framework-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_cast_framework/com_google_android_gms_play_services_cast_framework.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_cast_java",
|
|
- "//third_party/androidx:androidx_appcompat_appcompat_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- "//third_party/androidx:androidx_fragment_fragment_java",
|
|
- "//third_party/androidx:androidx_media_media_java",
|
|
- "//third_party/androidx:androidx_mediarouter_mediarouter_java",
|
|
- "//third_party/androidx:androidx_recyclerview_recyclerview_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_gcm_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_gcm/play-services-gcm-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_gcm/com_google_android_gms_play_services_gcm.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_iid_java",
|
|
- ":google_play_services_stats_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_iid_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_iid/play-services-iid-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_iid/com_google_android_gms_play_services_iid.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_stats_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_instantapps_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_instantapps/play-services-instantapps-18.0.1.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_instantapps/com_google_android_gms_play_services_instantapps.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_location_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_location/play-services-location-19.0.1.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_location/com_google_android_gms_play_services_location.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_places_placereport_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_tasks_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_tasks/play-services-tasks-18.0.2.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_tasks/com_google_android_gms_play_services_tasks.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [ ":google_play_services_basement_java" ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_vision_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_vision/play-services-vision-20.1.3.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_vision/com_google_android_gms_play_services_vision.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_vision_common_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_vision_common_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_vision_common/play-services-vision-common-19.1.3.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_vision_common/com_google_android_gms_play_services_vision_common.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_clearcut_java",
|
|
- ":google_play_services_flags_java",
|
|
- ":google_play_services_phenotype_java",
|
|
- ]
|
|
- }
|
|
|
|
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
android_aar_prebuilt("com_google_android_material_material_java") {
|
|
@@ -1017,62 +802,6 @@ if (!limit_android_deps) {
|
|
]
|
|
}
|
|
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("com_google_android_play_feature_delivery_java") {
|
|
- aar_path = "libs/com_google_android_play_feature_delivery/feature-delivery-2.0.1.aar"
|
|
- info_path = "libs/com_google_android_play_feature_delivery/com_google_android_play_feature_delivery.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":com_google_android_play_core_common_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_iid_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_iid/firebase-iid-21.0.1.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_iid/com_google_firebase_firebase_iid.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_firebase_firebase_common_java",
|
|
- ":google_firebase_firebase_components_java",
|
|
- ":google_firebase_firebase_iid_interop_java",
|
|
- ":google_firebase_firebase_installations_interop_java",
|
|
- ":google_firebase_firebase_installations_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_cloud_messaging_java",
|
|
- ":google_play_services_stats_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_messaging_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_messaging/firebase-messaging-21.0.1.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_messaging/com_google_firebase_firebase_messaging.info"
|
|
- enable_bytecode_checks = false
|
|
- deps = [
|
|
- ":google_android_datatransport_transport_api_java",
|
|
- ":google_firebase_firebase_common_java",
|
|
- ":google_firebase_firebase_components_java",
|
|
- ":google_firebase_firebase_encoders_java",
|
|
- ":google_firebase_firebase_encoders_json_java",
|
|
- ":google_firebase_firebase_iid_java",
|
|
- ":google_firebase_firebase_installations_interop_java",
|
|
- ":google_firebase_firebase_installations_java",
|
|
- ":google_firebase_firebase_measurement_connector_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_cloud_messaging_java",
|
|
- ":google_play_services_stats_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_collection_collection_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- ]
|
|
- }
|
|
|
|
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
java_prebuilt("com_google_guava_guava_android_java") {
|
|
@@ -1406,19 +1135,6 @@ if (!limit_android_deps) {
|
|
is_robolectric = true
|
|
}
|
|
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- java_prebuilt("org_robolectric_shadows_playservices_java") {
|
|
- jar_path = "libs/org_robolectric_shadows_playservices/shadows-playservices-4.10.3.jar"
|
|
- output_name = "org_robolectric_shadows_playservices"
|
|
- enable_bytecode_checks = false
|
|
- testonly = true
|
|
- deps = [
|
|
- ":com_google_guava_guava_java",
|
|
- ":org_robolectric_annotations_java",
|
|
- ]
|
|
- is_robolectric = true
|
|
- }
|
|
-
|
|
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
java_prebuilt("org_robolectric_utils_java") {
|
|
jar_path = "libs/org_robolectric_utils/utils-4.10.3.jar"
|
|
@@ -1878,290 +1594,6 @@ if (!limit_android_deps) {
|
|
deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
|
|
}
|
|
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_clearcut_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_clearcut/play-services-clearcut-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_clearcut/com_google_android_gms_play_services_clearcut.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_phenotype_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_cloud_messaging_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_cloud_messaging/play-services-cloud-messaging-16.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_cloud_messaging/com_google_android_gms_play_services_cloud_messaging.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_flags_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_flags/play-services-flags-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_flags/com_google_android_gms_play_services_flags.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_phenotype_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_phenotype/play-services-phenotype-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_phenotype/com_google_android_gms_play_services_phenotype.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- "//third_party/androidx:androidx_core_core_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_places_placereport_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_places_placereport/play-services-places-placereport-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_places_placereport/com_google_android_gms_play_services_places_placereport.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [ ":google_play_services_basement_java" ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_play_services_stats_java") {
|
|
- aar_path = "libs/com_google_android_gms_play_services_stats/play-services-stats-17.0.0.aar"
|
|
- info_path = "libs/com_google_android_gms_play_services_stats/com_google_android_gms_play_services_stats.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_play_services_basement_java",
|
|
- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("com_google_android_play_core_common_java") {
|
|
- aar_path = "libs/com_google_android_play_core_common/core-common-2.0.2.aar"
|
|
- info_path = "libs/com_google_android_play_core_common/com_google_android_play_core_common.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- java_prebuilt("google_firebase_firebase_annotations_java") {
|
|
- jar_path = "libs/com_google_firebase_firebase_annotations/firebase-annotations-16.0.0.jar"
|
|
- output_name = "com_google_firebase_firebase_annotations"
|
|
- supports_android = true
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_common_java") {
|
|
- aar_path =
|
|
- "libs/com_google_firebase_firebase_common/firebase-common-19.5.0.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_common/com_google_firebase_firebase_common.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_firebase_firebase_components_java",
|
|
- ":google_play_services_basement_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_components_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_components/firebase-components-16.1.0.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_components/com_google_firebase_firebase_components.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_firebase_firebase_annotations_java",
|
|
- "//third_party/androidx:androidx_annotation_annotation_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- java_prebuilt("google_firebase_firebase_encoders_java") {
|
|
- jar_path = "libs/com_google_firebase_firebase_encoders/firebase-encoders-16.1.0.jar"
|
|
- output_name = "com_google_firebase_firebase_encoders"
|
|
- supports_android = true
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
|
|
-
|
|
- # https://crbug.com/1412551
|
|
- requires_android = true
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_encoders_json_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_encoders_json/firebase-encoders-json-17.1.0.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_encoders_json/com_google_firebase_firebase_encoders_json.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_firebase_firebase_encoders_java",
|
|
- "//third_party/androidx:androidx_annotation_annotation_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_iid_interop_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_iid_interop/firebase-iid-interop-17.0.0.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_iid_interop/com_google_firebase_firebase_iid_interop.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_play_services_base_java",
|
|
- ":google_play_services_basement_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_installations_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_installations/firebase-installations-16.3.5.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_installations/com_google_firebase_firebase_installations.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_firebase_firebase_common_java",
|
|
- ":google_firebase_firebase_components_java",
|
|
- ":google_firebase_firebase_installations_interop_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_installations_interop_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_installations_interop/firebase-installations-interop-16.0.1.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_installations_interop/com_google_firebase_firebase_installations_interop.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [
|
|
- ":google_firebase_firebase_annotations_java",
|
|
- ":google_play_services_tasks_java",
|
|
- ]
|
|
- }
|
|
-
|
|
- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
- android_aar_prebuilt("google_firebase_firebase_measurement_connector_java") {
|
|
- aar_path = "libs/com_google_firebase_firebase_measurement_connector/firebase-measurement-connector-18.0.0.aar"
|
|
- info_path = "libs/com_google_firebase_firebase_measurement_connector/com_google_firebase_firebase_measurement_connector.info"
|
|
- enable_bytecode_checks = false
|
|
-
|
|
- # To remove visibility constraint, add this dependency to
|
|
- # //third_party/android_deps/build.gradle.
|
|
- visibility = [
|
|
- ":*",
|
|
- "//third_party/androidx:*",
|
|
- ]
|
|
- deps = [ ":google_play_services_basement_java" ]
|
|
- }
|
|
|
|
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
java_prebuilt("com_squareup_javawriter_java") {
|
|
diff --git a/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn b/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn
|
|
--- a/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn
|
|
+++ b/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn
|
|
@@ -8,7 +8,6 @@ android_library("javatests") {
|
|
testonly = true
|
|
sources = [ "org/chromium/preconditions/PreconditionsTest.java" ]
|
|
deps = [
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
"//base:base_java_test_support",
|
|
"//base/test:test_support_java",
|
|
"//build/android:build_java",
|
|
diff --git a/third_party/android_deps/util/org/chromium/gms/ChromiumPlayServicesAvailability.java b/third_party/android_deps/util/org/chromium/gms/ChromiumPlayServicesAvailability.java
|
|
--- a/third_party/android_deps/util/org/chromium/gms/ChromiumPlayServicesAvailability.java
|
|
+++ b/third_party/android_deps/util/org/chromium/gms/ChromiumPlayServicesAvailability.java
|
|
@@ -5,9 +5,6 @@ package org.chromium.gms;
|
|
|
|
import android.content.Context;
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
-
|
|
// Refer to go/doubledown-play-services#new-apis for more detail.
|
|
public final class ChromiumPlayServicesAvailability {
|
|
/**
|
|
@@ -30,9 +27,7 @@ public final class ChromiumPlayServicesAvailability {
|
|
* PM/UX.
|
|
*/
|
|
public static boolean isGooglePlayServicesAvailable(final Context context) {
|
|
- return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
|
|
- context, GMS_VERSION_NUMBER)
|
|
- == ConnectionResult.SUCCESS;
|
|
+ return false;
|
|
}
|
|
|
|
/**
|
|
@@ -50,7 +45,6 @@ public final class ChromiumPlayServicesAvailability {
|
|
* PM/UX.
|
|
*/
|
|
public static int getGooglePlayServicesConnectionResult(final Context context) {
|
|
- return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
|
|
- context, GMS_VERSION_NUMBER);
|
|
+ return 16; // API_UNAVAILABLE
|
|
}
|
|
}
|
|
diff --git a/third_party/cardboard/BUILD.gn b/third_party/cardboard/BUILD.gn
|
|
--- a/third_party/cardboard/BUILD.gn
|
|
+++ b/third_party/cardboard/BUILD.gn
|
|
@@ -51,10 +51,6 @@ android_library("cardboard_java") {
|
|
deps = [
|
|
":cardboard_proto_java",
|
|
":cardboard_resources",
|
|
- "$google_play_services_package:google_play_services_base_java",
|
|
- "$google_play_services_package:google_play_services_basement_java",
|
|
- "$google_play_services_package:google_play_services_vision_common_java",
|
|
- "$google_play_services_package:google_play_services_vision_java",
|
|
"//third_party/android_deps:protobuf_lite_runtime_java",
|
|
"//third_party/androidx:androidx_annotation_annotation_jvm_java",
|
|
"//third_party/androidx:androidx_appcompat_appcompat_java",
|
|
--
|
|
2.25.1
|