|
@@ -17,17 +17,17 @@ Subject: kill GCM
|
|
|
.../BackgroundTaskSchedulerGcmNetworkManager.java | 30 ++++-------
|
|
|
components/gcm_driver/android/BUILD.gn | 1 -
|
|
|
components/gcm_driver/instance_id/android/BUILD.gn | 1 -
|
|
|
- .../gcm_driver/instance_id/InstanceIDBridge.java | 29 ++--------
|
|
|
+ .../gcm_driver/instance_id/InstanceIDBridge.java | 29 +++-------
|
|
|
components/sync/android/BUILD.gn | 1 -
|
|
|
third_party/cacheinvalidation/BUILD.gn | 6 ---
|
|
|
.../client/contrib/MultiplexingGcmListener.java | 49 ++---------------
|
|
|
.../android2/channel/AndroidNetworkChannel.java | 18 +++----
|
|
|
- 19 files changed, 34 insertions(+), 252 deletions(-)
|
|
|
+ 19 files changed, 36 insertions(+), 250 deletions(-)
|
|
|
|
|
|
diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn
|
|
|
--- a/build/secondary/third_party/android_tools/BUILD.gn
|
|
|
+++ b/build/secondary/third_party/android_tools/BUILD.gn
|
|
|
-@@ -43,8 +43,6 @@ if (enable_java_templates) {
|
|
|
+@@ -64,8 +64,6 @@ if (enable_java_templates) {
|
|
|
support_lib_alias("android_support_chromium_java") {
|
|
|
testonly = true
|
|
|
}
|
|
@@ -54,7 +54,7 @@ diff --git a/build/secondary/third_party/android_tools/support/BUILD.gn b/build/
|
|
|
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
|
|
--- a/chrome/android/BUILD.gn
|
|
|
+++ b/chrome/android/BUILD.gn
|
|
|
-@@ -260,7 +260,6 @@ android_library("chrome_java") {
|
|
|
+@@ -269,7 +269,6 @@ android_library("chrome_java") {
|
|
|
"//third_party/android_swipe_refresh:android_swipe_refresh_java",
|
|
|
"//third_party/android_tools:android_arch_lifecycle_common_java",
|
|
|
"//third_party/android_tools:android_arch_lifecycle_runtime_java",
|
|
@@ -65,7 +65,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
|
|
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
|
|
|
-@@ -74,22 +74,17 @@ by a child template that "extends" this file.
|
|
|
+@@ -77,22 +77,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" />
|
|
@@ -88,7 +88,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
|
|
|
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
|
|
|
|
|
|
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
|
|
|
-@@ -913,43 +908,6 @@ by a child template that "extends" this file.
|
|
|
+@@ -919,43 +914,6 @@ by a child template that "extends" this file.
|
|
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
|
|
|
android:hardwareAccelerated="false" />
|
|
|
|
|
@@ -132,7 +132,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
|
|
|
<!-- Notification service for sync. -->
|
|
|
<meta-data android:name="ipc.invalidation.ticl.listener_service_class"
|
|
|
android:value="org.chromium.chrome.browser.invalidation.ChromeInvalidationClientService"/>
|
|
|
-@@ -961,8 +919,6 @@ by a child template that "extends" this file.
|
|
|
+@@ -967,8 +925,6 @@ by a child template that "extends" this file.
|
|
|
</service>
|
|
|
<service android:name="com.google.ipc.invalidation.ticl.android2.TiclService"
|
|
|
android:exported="false"/>
|
|
@@ -141,7 +141,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"
|
|
|
-@@ -989,24 +945,6 @@ by a child template that "extends" this file.
|
|
|
+@@ -995,24 +951,6 @@ by a child template that "extends" this file.
|
|
|
android:exported="false"
|
|
|
android:permission="android.permission.BIND_JOB_SERVICE"/>
|
|
|
|
|
@@ -169,17 +169,17 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
|
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java b/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java
|
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java
|
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java
|
|
|
-@@ -9,10 +9,6 @@ import android.content.SharedPreferences;
|
|
|
- import android.os.AsyncTask;
|
|
|
+@@ -8,10 +8,6 @@ import android.content.Context;
|
|
|
+ import android.content.SharedPreferences;
|
|
|
import android.os.StrictMode;
|
|
|
|
|
|
-import com.google.android.gms.gcm.GcmNetworkManager;
|
|
|
-import com.google.android.gms.gcm.OneoffTask;
|
|
|
-import com.google.android.gms.gcm.Task;
|
|
|
-
|
|
|
+ import org.chromium.base.AsyncTask;
|
|
|
import org.chromium.base.ContextUtils;
|
|
|
import org.chromium.base.Log;
|
|
|
- import org.chromium.base.VisibleForTesting;
|
|
|
@@ -37,8 +33,6 @@ public class BackgroundSyncLauncher {
|
|
|
// BackgroundSyncLauncherAndroid, if any. If it is non-null then the browser is running.
|
|
|
private static BackgroundSyncLauncher sInstance;
|
|
@@ -251,7 +251,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncL
|
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java b/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java
|
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java
|
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java
|
|
|
-@@ -12,8 +12,6 @@ import android.os.Build;
|
|
|
+@@ -11,8 +11,6 @@ import android.os.Build;
|
|
|
import android.os.Handler;
|
|
|
import android.os.SystemClock;
|
|
|
|
|
@@ -259,7 +259,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/invalidation/In
|
|
|
-
|
|
|
import org.chromium.base.ApplicationState;
|
|
|
import org.chromium.base.ApplicationStatus;
|
|
|
- import org.chromium.base.Log;
|
|
|
+ import org.chromium.base.AsyncTask;
|
|
|
@@ -200,16 +198,7 @@ public class InvalidationController implements ApplicationStatus.ApplicationStat
|
|
|
* Registers for Google Cloud Messaging (GCM) for Invalidations.
|
|
|
*/
|
|
@@ -386,15 +386,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GC
|
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
|
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
|
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
|
|
|
-@@ -13,7 +13,6 @@ import android.os.Parcel;
|
|
|
+@@ -12,7 +12,6 @@ import android.os.Parcel;
|
|
|
import android.support.annotation.MainThread;
|
|
|
import android.util.Log;
|
|
|
|
|
|
-import com.google.android.gms.gcm.GoogleCloudMessaging;
|
|
|
import com.google.ipc.invalidation.ticl.android2.channel.GcmUpstreamSenderService;
|
|
|
|
|
|
- import org.chromium.base.ThreadUtils;
|
|
|
-@@ -92,6 +91,7 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
|
|
|
+ import org.chromium.base.AsyncTask;
|
|
|
+@@ -95,6 +94,7 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
|
|
|
* This function runs on a thread from the AsyncTask.THREAD_POOL_EXECUTOR.
|
|
|
*/
|
|
|
private void sendUpstreamMessage(String to, Bundle data, String token, Context context) {
|
|
@@ -402,7 +402,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/In
|
|
|
// Add the OAuth2 token to the bundle. The token should have the prefix Bearer added to it.
|
|
|
data.putString("Authorization", "Bearer " + token);
|
|
|
if (!isMessageWithinLimit(data)) {
|
|
|
-@@ -105,6 +105,7 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
|
|
|
+@@ -109,6 +109,7 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
|
|
|
Log.w(TAG, "Send message failed");
|
|
|
GcmUma.recordGcmUpstreamHistogram(context, GcmUma.UMA_UPSTREAM_SEND_FAILED);
|
|
|
}
|
|
@@ -413,7 +413,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/In
|
|
|
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
|
|
|
--- a/chrome/android/java_sources.gni
|
|
|
+++ b/chrome/android/java_sources.gni
|
|
|
-@@ -25,7 +25,6 @@ chrome_java_sources = [
|
|
|
+@@ -27,7 +27,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",
|
|
@@ -421,7 +421,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
|
|
|
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
|
|
|
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
|
|
|
"java/src/org/chromium/chrome/browser/ChromeFeatureList.java",
|
|
|
-@@ -1160,7 +1159,6 @@ chrome_java_sources = [
|
|
|
+@@ -1217,7 +1216,6 @@ chrome_java_sources = [
|
|
|
"java/src/org/chromium/chrome/browser/services/AndroidEduAndChildAccountHelper.java",
|
|
|
"java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
|
|
|
"java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",
|
|
@@ -560,7 +560,7 @@ diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm
|
|
|
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
|
|
|
-@@ -26,7 +26,6 @@ public class InstanceIDBridge {
|
|
|
+@@ -25,7 +25,6 @@ public class InstanceIDBridge {
|
|
|
* Underlying InstanceIDWithSubtype. May be shared by multiple InstanceIDBridges. Must be
|
|
|
* initialized on a background thread.
|
|
|
*/
|
|
@@ -568,7 +568,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
|
|
|
|
|
|
private static boolean sBlockOnAsyncTasksForTesting;
|
|
|
|
|
|
-@@ -71,7 +70,7 @@ public class InstanceIDBridge {
|
|
|
+@@ -70,7 +69,7 @@ public class InstanceIDBridge {
|
|
|
new BridgeAsyncTask<String>() {
|
|
|
@Override
|
|
|
protected String doBackgroundWork() {
|
|
@@ -577,7 +577,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
|
|
|
}
|
|
|
@Override
|
|
|
protected void sendResultToNative(String id) {
|
|
|
-@@ -86,7 +85,7 @@ public class InstanceIDBridge {
|
|
|
+@@ -85,7 +84,7 @@ public class InstanceIDBridge {
|
|
|
new BridgeAsyncTask<Long>() {
|
|
|
@Override
|
|
|
protected Long doBackgroundWork() {
|
|
@@ -586,7 +586,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
|
|
|
}
|
|
|
@Override
|
|
|
protected void sendResultToNative(Long creationTime) {
|
|
|
-@@ -107,11 +106,7 @@ public class InstanceIDBridge {
|
|
|
+@@ -106,11 +105,7 @@ public class InstanceIDBridge {
|
|
|
new BridgeAsyncTask<String>() {
|
|
|
@Override
|
|
|
protected String doBackgroundWork() {
|
|
@@ -599,7 +599,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
|
|
|
}
|
|
|
@Override
|
|
|
protected void sendResultToNative(String token) {
|
|
|
-@@ -127,12 +122,7 @@ public class InstanceIDBridge {
|
|
|
+@@ -126,12 +121,7 @@ public class InstanceIDBridge {
|
|
|
new BridgeAsyncTask<Boolean>() {
|
|
|
@Override
|
|
|
protected Boolean doBackgroundWork() {
|
|
@@ -613,7 +613,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
|
|
|
}
|
|
|
@Override
|
|
|
protected void sendResultToNative(Boolean success) {
|
|
|
-@@ -147,12 +137,7 @@ public class InstanceIDBridge {
|
|
|
+@@ -146,12 +136,7 @@ public class InstanceIDBridge {
|
|
|
new BridgeAsyncTask<Boolean>() {
|
|
|
@Override
|
|
|
protected Boolean doBackgroundWork() {
|
|
@@ -627,17 +627,20 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
|
|
|
}
|
|
|
@Override
|
|
|
protected void sendResultToNative(Boolean success) {
|
|
|
-@@ -192,10 +177,6 @@ public class InstanceIDBridge {
|
|
|
+@@ -190,11 +175,11 @@ public class InstanceIDBridge {
|
|
|
+ @Override
|
|
|
@SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native.
|
|
|
protected Result doInBackground(Void... params) {
|
|
|
- synchronized (InstanceIDBridge.this) {
|
|
|
-- if (mInstanceID == null) {
|
|
|
-- mInstanceID = InstanceIDWithSubtype.getInstance(
|
|
|
-- ContextUtils.getApplicationContext(), mSubtype);
|
|
|
-- }
|
|
|
- }
|
|
|
+- synchronized (InstanceIDBridge.this) {
|
|
|
++/* synchronized (InstanceIDBridge.this) {
|
|
|
+ if (mInstanceID == null) {
|
|
|
+ mInstanceID = InstanceIDWithSubtype.getInstance(mSubtype);
|
|
|
+ }
|
|
|
+- }
|
|
|
++ }*/
|
|
|
return doBackgroundWork();
|
|
|
}
|
|
|
+ @Override
|
|
|
diff --git a/components/sync/android/BUILD.gn b/components/sync/android/BUILD.gn
|
|
|
--- a/components/sync/android/BUILD.gn
|
|
|
+++ b/components/sync/android/BUILD.gn
|