@ -17,17 +17,17 @@ Subject: kill GCM
.../BackgroundTaskSchedulerGcmNetworkManager.java | 206 +--------------------
components/gcm_driver/android/BUILD.gn | 1 -
components/gcm_driver/instance_id/android/BUILD.gn | 1 -
.../gcm_driver/instance_id/InstanceIDBridge.java | 49 + ----
.../gcm_driver/instance_id/InstanceIDBridge.java | 52 +- ----
components/sync/android/BUILD.gn | 1 -
third_party/cacheinvalidation/BUILD.gn | 6 -
.../client/contrib/MultiplexingGcmListener.java | 91 +--------
.../android2/channel/AndroidNetworkChannel.java | 6 +-
19 files changed, 9 insertions(+), 597 deletions(-)
19 files changed, 9 insertions(+), 600 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -378,7 +378 ,6 @@ android_library("chrome_java") {
@@ -379,7 +379 ,6 @@ android_library("chrome_java") {
"//third_party/android_deps:com_google_protobuf_protobuf_lite_java",
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
@ -38,7 +38,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
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
@@ -20,7 +20 ,6 @@ chrome_java_sources = [
@@ -19,7 +19 ,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/ChromeActivity.java",
"java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
"java/src/org/chromium/chrome/browser/ChromeApplication.java",
@ -61,7 +61,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_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
@@ -7 8,22 +7 8,17 @@ by a child template that "extends" this file.
@@ -85 ,22 +85 ,17 @@ 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" />
@ -83,8 +83,8 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
- <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
{% block extra_uses_permissions %}
@@ -1068,49 +1063,8 @@ by a child template that "extends" this file.
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
@@ -1087,45 +1082,6 @@ by a child template that "extends" this file.
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -127,6 +127,11 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
- <service android:name="org.chromium.chrome.browser.services.gcm.InvalidationGcmUpstreamSender"
- android:exported="false"/>
-
<!-- Notification service for sync. -->
<meta-data android:name="ipc.invalidation.ticl.listener_service_class"
android:value="org.chromium.chrome.browser.invalidation.ChromeInvalidationClientService"/>
@@ -1137,8 +1093,6 @@ by a child template that "extends" this file.
</service>
<service android:name="com.google.ipc.invalidation.ticl.android2.TiclService"
android:exported="false"/>
- <service android:name="com.google.ipc.invalidation.ticl.android2.channel.AndroidMessageSenderService"
@ -134,7 +139,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<receiver android:name="com.google.ipc.invalidation.ticl.android2.AndroidInternalScheduler$AlarmReceiver"
android:exported="false"/>
<receiver android:name="com.google.ipc.invalidation.external.client.contrib.AndroidListener$AlarmReceiver"
@@ -1137,24 +1091 ,6 @@ by a child template that "extends" this file.
@@ -1165,24 +1119 ,6 @@ by a child template that "extends" this file.
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -379,10 +384,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/Sn
private boolean mGCMEnabled = true;
/**
@@ -78,7 +71,6 @@ public class SnippetsLauncher {
@@ -78,7 +71,7 @@ public class SnippetsLauncher {
protected SnippetsLauncher() {
checkGCM();
+ mGCMEnabled = false;
- mScheduler = GcmNetworkManager.getInstance(ContextUtils.getApplicationContext());
}
@ -527,7 +533,7 @@ diff --git a/components/background_task_scheduler/android/java/src/org/chromium/
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
@@ -42,212 +34,16 @@ class BackgroundTaskSchedulerGcmNetworkManager implements BackgroundTaskSchedule
@@ -42,212 +34,14 @@ class BackgroundTaskSchedulerGcmNetworkManager implements BackgroundTaskSchedule
sClock = clock;
}
@ -690,7 +696,7 @@ diff --git a/components/background_task_scheduler/android/java/src/org/chromium/
- return Task.NETWORK_STATE_ANY;
- }
-
@Override
- @Override
public boolean schedule(Context context, @NonNull TaskInfo taskInfo) {
ThreadUtils.assertOnUiThread();
@ -714,7 +720,7 @@ diff --git a/components/background_task_scheduler/android/java/src/org/chromium/
+ return false;
}
@Override
- @Override
public void cancel(Context context, int taskId) {
ThreadUtils.assertOnUiThread();
-
@ -792,7 +798,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Long creationTime) {
@@ -113,21 +112,7 @@ public class InstanceIDBridge {
@@ -113,24 +112,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<String>() {
@Override
protected String doBackgroundWork() {
@ -807,7 +813,10 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
- SubscriptionFlagManager.buildSubscriptionUniqueId(
- mSubtype, authorizedEntity),
- flags);
- return mInstanceID.getToken(authorizedEntity, scope, extras);
- if (mInstanceID != null)
- return mInstanceID.getToken(authorizedEntity, scope, extras);
- else
- return "";
- } catch (IOException ex) {
- return "";
- }
@ -815,7 +824,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(String token) {
@@ -143 ,21 +128,7 @@ public class InstanceIDBridge {
@@ -146 ,21 +128,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Boolean>() {
@Override
protected Boolean doBackgroundWork() {
@ -838,7 +847,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Boolean success) {
@@ -172 ,12 +143,7 @@ public class InstanceIDBridge {
@@ -175 ,12 +143,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Boolean>() {
@Override
protected Boolean doBackgroundWork() {
@ -852,7 +861,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Boolean success) {
@@ -216 ,11 +182,6 @@ public class InstanceIDBridge {
@@ -219 ,11 +182,6 @@ public class InstanceIDBridge {
@Override
@SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native.
protected Result doInBackground() {
@ -922,10 +931,11 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
/* This class is public so that it can be instantiated by the Android runtime. */
/** Constants used in broadcast Intents. */
@@ -106,18 +103,6 @@ public class MultiplexingGcmListener extends GCMBaseIntentService {
@@ -105,18 +102,6 @@ public class MultiplexingGcmListener extends GCMBaseIntentService {
public static final String EXTRA_DATA_NUM_DELETED_MSGS = PREFIX + "NUM_DELETED_MSGS";
}
/**
- /**
- * {@link GCMBroadcastReceiver} that forwards GCM intents to the {@code MultiplexingGcmListener}
- * class.
- */
@ -937,10 +947,9 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
- }
- }
-
- /**
/**
* Convenience base class for client implementations. It provides base classes for a broadcast
* receiver and an intent service that work together to handle events from the
* {@code MultiplexingGcmListener} while holding a wake lock.
@@ -260,80 +245,6 @@ public class MultiplexingGcmListener extends GCMBaseIntentService {
/** Logger. */
private static final Logger logger = AndroidLogger.forTag("MplexGcmListener");