|
|
@ -0,0 +1,746 @@ |
|
|
|
Remove dependency on com.google.android.gms.gcm (play-services-gcm-15.0.1.aar). |
|
|
|
author: Wengling Chen <[email protected]> |
|
|
|
|
|
|
|
---
|
|
|
|
chrome/android/BUILD.gn | 2 - |
|
|
|
.../invalidation/InvalidationController.java | 8 +- |
|
|
|
.../services/gcm/ChromeGcmListenerService.java | 57 +------ |
|
|
|
components/background_task_scheduler/BUILD.gn | 3 - |
|
|
|
.../BackgroundTaskGcmTaskService.java | 53 +------ |
|
|
|
.../BackgroundTaskSchedulerFactory.java | 2 +- |
|
|
|
.../BackgroundTaskSchedulerGcmNetworkManager.java | 164 +-------------------- |
|
|
|
third_party/android_deps/BUILD.gn | 20 --- |
|
|
|
third_party/cacheinvalidation/BUILD.gn | 1 - |
|
|
|
.../client/android2/AndroidManifestUpdatedGcm.xml | 20 --- |
|
|
|
.../android2/channel/AndroidGcmController.java | 42 +----- |
|
|
|
.../channel/AndroidInstanceIDListenerService.java | 13 +- |
|
|
|
.../channel/GcmRegistrationTaskService.java | 89 +---------- |
|
|
|
13 files changed, 11 insertions(+), 463 deletions(-) |
|
|
|
|
|
|
|
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
|
|
|
--- a/chrome/android/BUILD.gn
|
|
|
|
+++ b/chrome/android/BUILD.gn
|
|
|
|
@@ -255,7 +255,6 @@ android_library("chrome_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_fido_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", |
|
|
|
@@ -720,7 +719,6 @@ android_library("chrome_test_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_fido_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", |
|
|
|
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
|
|
|
|
@@ -169,6 +169,7 @@ public class InvalidationController implements ApplicationStatus.ApplicationStat
|
|
|
|
|
|
|
|
// Ensure GCM has been initialized. |
|
|
|
ensureGcmIsInitialized(); |
|
|
|
+ if (!mGcmInitialized) return;
|
|
|
|
|
|
|
|
// Do not apply changes to {@link #mSessionInvalidationsEnabled} yet because the timer task |
|
|
|
// may be scheduled far into the future. |
|
|
|
@@ -194,12 +195,7 @@ public class InvalidationController implements ApplicationStatus.ApplicationStat
|
|
|
|
*/ |
|
|
|
private void ensureGcmIsInitialized() { |
|
|
|
if (mGcmInitialized) return; |
|
|
|
- mGcmInitialized = true;
|
|
|
|
- PostTask.postTask(TaskTraits.BEST_EFFORT_MAY_BLOCK, () -> {
|
|
|
|
- boolean useGcmUpstream = true;
|
|
|
|
- AndroidGcmController.get(ContextUtils.getApplicationContext())
|
|
|
|
- .initializeGcm(useGcmUpstream);
|
|
|
|
- });
|
|
|
|
+ mGcmInitialized = false;
|
|
|
|
} |
|
|
|
|
|
|
|
@VisibleForTesting |
|
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java
|
|
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java
|
|
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java
|
|
|
|
@@ -10,7 +10,6 @@ import android.os.Bundle;
|
|
|
|
import android.os.SystemClock; |
|
|
|
import android.text.TextUtils; |
|
|
|
|
|
|
|
-import com.google.android.gms.gcm.GcmListenerService;
|
|
|
|
import com.google.ipc.invalidation.ticl.android2.channel.AndroidGcmController; |
|
|
|
|
|
|
|
import org.chromium.base.ApplicationStatus; |
|
|
|
@@ -33,62 +32,9 @@ import org.chromium.content_public.browser.UiThreadTaskTraits;
|
|
|
|
/** |
|
|
|
* Receives Downstream messages and status of upstream messages from GCM. |
|
|
|
*/ |
|
|
|
-public class ChromeGcmListenerService extends GcmListenerService {
|
|
|
|
+public class ChromeGcmListenerService {
|
|
|
|
private static final String TAG = "ChromeGcmListener"; |
|
|
|
|
|
|
|
- @Override
|
|
|
|
- public void onCreate() {
|
|
|
|
- ProcessInitializationHandler.getInstance().initializePreNative();
|
|
|
|
- super.onCreate();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public void onMessageReceived(final String from, final Bundle data) {
|
|
|
|
- boolean hasCollapseKey = !TextUtils.isEmpty(data.getString("collapse_key"));
|
|
|
|
- GcmUma.recordDataMessageReceived(ContextUtils.getApplicationContext(), hasCollapseKey);
|
|
|
|
-
|
|
|
|
- String invalidationSenderId = AndroidGcmController.get(this).getSenderId();
|
|
|
|
- if (from.equals(invalidationSenderId)) {
|
|
|
|
- AndroidGcmController.get(this).onMessageReceived(data);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // Dispatch the message to the GCM Driver for native features.
|
|
|
|
- PostTask.runOrPostTask(UiThreadTaskTraits.DEFAULT, () -> {
|
|
|
|
- GCMMessage message = null;
|
|
|
|
- try {
|
|
|
|
- message = new GCMMessage(from, data);
|
|
|
|
- } catch (IllegalArgumentException e) {
|
|
|
|
- Log.e(TAG, "Received an invalid GCM Message", e);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- scheduleOrDispatchMessageToDriver(message);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public void onMessageSent(String msgId) {
|
|
|
|
- Log.d(TAG, "Message sent successfully. Message id: " + msgId);
|
|
|
|
- GcmUma.recordGcmUpstreamHistogram(
|
|
|
|
- ContextUtils.getApplicationContext(), GcmUma.UMA_UPSTREAM_SUCCESS);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public void onSendError(String msgId, String error) {
|
|
|
|
- Log.w(TAG, "Error in sending message. Message id: " + msgId + " Error: " + error);
|
|
|
|
- GcmUma.recordGcmUpstreamHistogram(
|
|
|
|
- ContextUtils.getApplicationContext(), GcmUma.UMA_UPSTREAM_SEND_FAILED);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public void onDeletedMessages() {
|
|
|
|
- // TODO(johnme): Ask GCM to include the subtype in this event.
|
|
|
|
- Log.w(TAG, "Push messages were deleted, but we can't tell the Service Worker as we don't"
|
|
|
|
- + "know what subtype (app ID) it occurred for.");
|
|
|
|
- GcmUma.recordDeletedMessages(ContextUtils.getApplicationContext());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/** |
|
|
|
* If Chrome is backgrounded, messages coming from lazy subscriptions are |
|
|
|
* persisted on disk and replayed next time Chrome is forgrounded. If Chrome is forgrounded or |
|
|
|
@@ -149,7 +95,6 @@ public class ChromeGcmListenerService extends GcmListenerService {
|
|
|
|
|
|
|
|
try { |
|
|
|
ChromeBrowserInitializer.getInstance(applicationContext).handleSynchronousStartup(); |
|
|
|
- GCMDriver.dispatchMessage(message);
|
|
|
|
|
|
|
|
} catch (ProcessInitException e) { |
|
|
|
Log.e(TAG, "ProcessInitException while starting the browser process"); |
|
|
|
diff --git a/components/background_task_scheduler/BUILD.gn b/components/background_task_scheduler/BUILD.gn
|
|
|
|
--- a/components/background_task_scheduler/BUILD.gn
|
|
|
|
+++ b/components/background_task_scheduler/BUILD.gn
|
|
|
|
@@ -53,7 +53,6 @@ if (is_android) {
|
|
|
|
":background_task_scheduler_task_ids_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_gcm_java",
|
|
|
|
"$google_play_services_package:google_play_services_tasks_java", |
|
|
|
"//base:base_java", |
|
|
|
"//third_party/android_deps:com_android_support_support_annotations_java", |
|
|
|
@@ -73,7 +72,6 @@ if (is_android) {
|
|
|
|
":background_task_scheduler_task_ids_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_gcm_java",
|
|
|
|
"$google_play_services_package:google_play_services_tasks_java", |
|
|
|
"//base:base_java", |
|
|
|
"//base:base_java_test_support", |
|
|
|
@@ -98,7 +96,6 @@ if (is_android) {
|
|
|
|
"$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_gcm_java",
|
|
|
|
"$google_play_services_package:google_play_services_tasks_java", |
|
|
|
"//base:base_java", |
|
|
|
"//base:base_java_test_support", |
|
|
|
diff --git a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskService.java b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskService.java
|
|
|
|
--- a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskService.java
|
|
|
|
+++ b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskService.java
|
|
|
|
@@ -6,10 +6,6 @@ package org.chromium.components.background_task_scheduler;
|
|
|
|
|
|
|
|
import android.os.Build; |
|
|
|
|
|
|
|
-import com.google.android.gms.gcm.GcmNetworkManager;
|
|
|
|
-import com.google.android.gms.gcm.GcmTaskService;
|
|
|
|
-import com.google.android.gms.gcm.TaskParams;
|
|
|
|
-
|
|
|
|
import org.chromium.base.ContextUtils; |
|
|
|
import org.chromium.base.Log; |
|
|
|
import org.chromium.base.ThreadUtils; |
|
|
|
@@ -19,7 +15,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
import java.util.concurrent.atomic.AtomicBoolean; |
|
|
|
|
|
|
|
/** Delegates calls out to various tasks that need to run in the background. */ |
|
|
|
-public class BackgroundTaskGcmTaskService extends GcmTaskService {
|
|
|
|
+public class BackgroundTaskGcmTaskService {
|
|
|
|
private static final String TAG = "BkgrdTaskGcmTS"; |
|
|
|
|
|
|
|
/** Class that waits for the processing to be done. */ |
|
|
|
@@ -81,53 +77,6 @@ public class BackgroundTaskGcmTaskService extends GcmTaskService {
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- @Override
|
|
|
|
- public int onRunTask(TaskParams params) {
|
|
|
|
- final BackgroundTask backgroundTask =
|
|
|
|
- BackgroundTaskSchedulerGcmNetworkManager.getBackgroundTaskFromTaskParams(params);
|
|
|
|
- if (backgroundTask == null) {
|
|
|
|
- Log.w(TAG, "Failed to start task. Could not instantiate class.");
|
|
|
|
- return GcmNetworkManager.RESULT_FAILURE;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- final TaskParameters taskParams =
|
|
|
|
- BackgroundTaskSchedulerGcmNetworkManager.getTaskParametersFromTaskParams(params);
|
|
|
|
- final Waiter waiter = new Waiter(Waiter.MAX_TIMEOUT_SECONDS);
|
|
|
|
-
|
|
|
|
- final AtomicBoolean taskNeedsBackgroundProcessing = new AtomicBoolean();
|
|
|
|
- ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- BackgroundTaskSchedulerUma.getInstance().reportTaskStarted(taskParams.getTaskId());
|
|
|
|
- taskNeedsBackgroundProcessing.set(
|
|
|
|
- backgroundTask.onStartTask(ContextUtils.getApplicationContext(), taskParams,
|
|
|
|
- new TaskFinishedCallbackGcmTaskService(waiter)));
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- if (!taskNeedsBackgroundProcessing.get()) return GcmNetworkManager.RESULT_SUCCESS;
|
|
|
|
-
|
|
|
|
- waiter.startWaiting();
|
|
|
|
-
|
|
|
|
- if (waiter.isRescheduleNeeded()) return GcmNetworkManager.RESULT_RESCHEDULE;
|
|
|
|
- if (!waiter.hasTaskTimedOut()) return GcmNetworkManager.RESULT_SUCCESS;
|
|
|
|
-
|
|
|
|
- final AtomicBoolean taskNeedsRescheduling = new AtomicBoolean();
|
|
|
|
- ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- BackgroundTaskSchedulerUma.getInstance().reportTaskStopped(taskParams.getTaskId());
|
|
|
|
- taskNeedsRescheduling.set(backgroundTask.onStopTask(
|
|
|
|
- ContextUtils.getApplicationContext(), taskParams));
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- if (taskNeedsRescheduling.get()) return GcmNetworkManager.RESULT_RESCHEDULE;
|
|
|
|
-
|
|
|
|
- return GcmNetworkManager.RESULT_SUCCESS;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
public void onInitializeTasks() { |
|
|
|
// Ignore the event on OSs supporting JobScheduler. |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) return; |
|
|
|
diff --git a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java
|
|
|
|
--- a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java
|
|
|
|
+++ b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java
|
|
|
|
@@ -19,7 +19,7 @@ public final class BackgroundTaskSchedulerFactory {
|
|
|
|
if (sdkInt >= Build.VERSION_CODES.M) { |
|
|
|
return new BackgroundTaskSchedulerJobService(); |
|
|
|
} else { |
|
|
|
- return new BackgroundTaskSchedulerGcmNetworkManager();
|
|
|
|
+ return null; /* minSDK is 24 */
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diff --git a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java
|
|
|
|
--- a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java
|
|
|
|
+++ b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java
|
|
|
|
@@ -8,14 +8,6 @@ import android.content.Context;
|
|
|
|
import android.os.Bundle; |
|
|
|
import android.support.annotation.NonNull; |
|
|
|
|
|
|
|
-import com.google.android.gms.common.ConnectionResult;
|
|
|
|
-import com.google.android.gms.common.GoogleApiAvailability;
|
|
|
|
-import com.google.android.gms.gcm.GcmNetworkManager;
|
|
|
|
-import com.google.android.gms.gcm.OneoffTask;
|
|
|
|
-import com.google.android.gms.gcm.PeriodicTask;
|
|
|
|
-import com.google.android.gms.gcm.Task;
|
|
|
|
-import com.google.android.gms.gcm.TaskParams;
|
|
|
|
-
|
|
|
|
import org.chromium.base.Log; |
|
|
|
import org.chromium.base.ThreadUtils; |
|
|
|
import org.chromium.base.VisibleForTesting; |
|
|
|
@@ -26,7 +18,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
* An implementation of {@link BackgroundTaskSchedulerDelegate} that uses the Play Services |
|
|
|
* {@link GcmNetworkManager} to schedule jobs. |
|
|
|
*/ |
|
|
|
-class BackgroundTaskSchedulerGcmNetworkManager implements BackgroundTaskSchedulerDelegate {
|
|
|
|
+class BackgroundTaskSchedulerGcmNetworkManager {
|
|
|
|
private static final String TAG = "BkgrdTaskSchedGcmNM"; |
|
|
|
|
|
|
|
@VisibleForTesting |
|
|
|
@@ -34,160 +26,6 @@ class BackgroundTaskSchedulerGcmNetworkManager implements BackgroundTaskSchedule
|
|
|
|
@VisibleForTesting |
|
|
|
static final String BACKGROUND_TASK_EXTRAS_KEY = "_background_task_extras"; |
|
|
|
|
|
|
|
- static BackgroundTask getBackgroundTaskFromTaskParams(@NonNull TaskParams taskParams) {
|
|
|
|
- String backgroundTaskClassName = getBackgroundTaskClassFromTaskParams(taskParams);
|
|
|
|
- return BackgroundTaskReflection.getBackgroundTaskFromClassName(backgroundTaskClassName);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private static String getBackgroundTaskClassFromTaskParams(@NonNull TaskParams taskParams) {
|
|
|
|
- Bundle extras = taskParams.getExtras();
|
|
|
|
- if (extras == null) return null;
|
|
|
|
- return extras.getString(BACKGROUND_TASK_CLASS_KEY);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Retrieves the {@link TaskParameters} from the {@link TaskParams}, which are passed as
|
|
|
|
- * one of the keys. Only values valid for {@link android.os.BaseBundle} are supported, and other
|
|
|
|
- * values are stripped at the time when the task is scheduled.
|
|
|
|
- *
|
|
|
|
- * @param taskParams the {@link TaskParams} to extract the {@link TaskParameters} from.
|
|
|
|
- * @return the {@link TaskParameters} for the current job.
|
|
|
|
- */
|
|
|
|
- static TaskParameters getTaskParametersFromTaskParams(@NonNull TaskParams taskParams) {
|
|
|
|
- int taskId;
|
|
|
|
- try {
|
|
|
|
- taskId = Integer.parseInt(taskParams.getTag());
|
|
|
|
- } catch (NumberFormatException e) {
|
|
|
|
- Log.e(TAG, "Cound not parse task ID from task tag: " + taskParams.getTag());
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- TaskParameters.Builder builder = TaskParameters.create(taskId);
|
|
|
|
-
|
|
|
|
- Bundle extras = taskParams.getExtras();
|
|
|
|
- Bundle taskExtras = extras.getBundle(BACKGROUND_TASK_EXTRAS_KEY);
|
|
|
|
- builder.addExtras(taskExtras);
|
|
|
|
-
|
|
|
|
- return builder.build();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @VisibleForTesting
|
|
|
|
- static Task createTaskFromTaskInfo(@NonNull TaskInfo taskInfo) {
|
|
|
|
- Bundle taskExtras = new Bundle();
|
|
|
|
- taskExtras.putString(
|
|
|
|
- BACKGROUND_TASK_CLASS_KEY, taskInfo.getBackgroundTaskClass().getName());
|
|
|
|
- taskExtras.putBundle(BACKGROUND_TASK_EXTRAS_KEY, taskInfo.getExtras());
|
|
|
|
-
|
|
|
|
- Task.Builder builder;
|
|
|
|
- if (taskInfo.isPeriodic()) {
|
|
|
|
- builder = getPeriodicTaskBuilder(taskInfo.getPeriodicInfo());
|
|
|
|
- } else {
|
|
|
|
- builder = getOneOffTaskBuilder(taskInfo.getOneOffInfo());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- builder.setExtras(taskExtras)
|
|
|
|
- .setPersisted(taskInfo.isPersisted())
|
|
|
|
- .setRequiredNetwork(getGcmNetworkManagerNetworkTypeFromTypeFromTaskNetworkType(
|
|
|
|
- taskInfo.getRequiredNetworkType()))
|
|
|
|
- .setRequiresCharging(taskInfo.requiresCharging())
|
|
|
|
- .setService(BackgroundTaskGcmTaskService.class)
|
|
|
|
- .setTag(taskIdToTaskTag(taskInfo.getTaskId()))
|
|
|
|
- .setUpdateCurrent(taskInfo.shouldUpdateCurrent());
|
|
|
|
-
|
|
|
|
- return builder.build();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private static Task.Builder getPeriodicTaskBuilder(TaskInfo.PeriodicInfo periodicInfo) {
|
|
|
|
- PeriodicTask.Builder builder = new PeriodicTask.Builder();
|
|
|
|
- builder.setPeriod(TimeUnit.MILLISECONDS.toSeconds(periodicInfo.getIntervalMs()));
|
|
|
|
- if (periodicInfo.hasFlex()) {
|
|
|
|
- builder.setFlex(TimeUnit.MILLISECONDS.toSeconds(periodicInfo.getFlexMs()));
|
|
|
|
- }
|
|
|
|
- return builder;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private static Task.Builder getOneOffTaskBuilder(TaskInfo.OneOffInfo oneOffInfo) {
|
|
|
|
- OneoffTask.Builder builder = new OneoffTask.Builder();
|
|
|
|
- long windowStartSeconds = oneOffInfo.hasWindowStartTimeConstraint()
|
|
|
|
- ? TimeUnit.MILLISECONDS.toSeconds(oneOffInfo.getWindowStartTimeMs())
|
|
|
|
- : 0;
|
|
|
|
- builder.setExecutionWindow(windowStartSeconds,
|
|
|
|
- TimeUnit.MILLISECONDS.toSeconds(oneOffInfo.getWindowEndTimeMs()));
|
|
|
|
- return builder;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private static int getGcmNetworkManagerNetworkTypeFromTypeFromTaskNetworkType(
|
|
|
|
- @TaskInfo.NetworkType int networkType) {
|
|
|
|
- switch (networkType) {
|
|
|
|
- // This is correct: GcmNM ANY means no network is guaranteed.
|
|
|
|
- case TaskInfo.NetworkType.NONE:
|
|
|
|
- return Task.NETWORK_STATE_ANY;
|
|
|
|
- case TaskInfo.NetworkType.ANY:
|
|
|
|
- return Task.NETWORK_STATE_CONNECTED;
|
|
|
|
- case TaskInfo.NetworkType.UNMETERED:
|
|
|
|
- return Task.NETWORK_STATE_UNMETERED;
|
|
|
|
- default:
|
|
|
|
- assert false;
|
|
|
|
- }
|
|
|
|
- return Task.NETWORK_STATE_ANY;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public boolean schedule(Context context, @NonNull TaskInfo taskInfo) {
|
|
|
|
- ThreadUtils.assertOnUiThread();
|
|
|
|
- if (!BackgroundTaskReflection.hasParameterlessPublicConstructor(
|
|
|
|
- taskInfo.getBackgroundTaskClass())) {
|
|
|
|
- Log.e(TAG,
|
|
|
|
- "BackgroundTask " + taskInfo.getBackgroundTaskClass()
|
|
|
|
- + " has no parameterless public constructor.");
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- GcmNetworkManager gcmNetworkManager = getGcmNetworkManager(context);
|
|
|
|
- if (gcmNetworkManager == null) {
|
|
|
|
- Log.e(TAG, "GcmNetworkManager is not available.");
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- try {
|
|
|
|
- Task task = createTaskFromTaskInfo(taskInfo);
|
|
|
|
- gcmNetworkManager.schedule(task);
|
|
|
|
- } catch (IllegalArgumentException e) {
|
|
|
|
- String gcmErrorMessage = e.getMessage() == null ? "null." : e.getMessage();
|
|
|
|
- Log.e(TAG,
|
|
|
|
- "GcmNetworkManager failed to schedule task, gcm message: " + gcmErrorMessage);
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public void cancel(Context context, int taskId) {
|
|
|
|
- ThreadUtils.assertOnUiThread();
|
|
|
|
-
|
|
|
|
- GcmNetworkManager gcmNetworkManager = getGcmNetworkManager(context);
|
|
|
|
- if (gcmNetworkManager == null) {
|
|
|
|
- Log.e(TAG, "GcmNetworkManager is not available.");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- try {
|
|
|
|
- gcmNetworkManager.cancelTask(
|
|
|
|
- taskIdToTaskTag(taskId), BackgroundTaskGcmTaskService.class);
|
|
|
|
- } catch (IllegalArgumentException e) {
|
|
|
|
- Log.e(TAG, "GcmNetworkManager failed to cancel task.");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private GcmNetworkManager getGcmNetworkManager(Context context) {
|
|
|
|
- if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context)
|
|
|
|
- == ConnectionResult.SUCCESS) {
|
|
|
|
- return GcmNetworkManager.getInstance(context);
|
|
|
|
- }
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private static String taskIdToTaskTag(int taskId) { |
|
|
|
return Integer.toString(taskId); |
|
|
|
} |
|
|
|
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
|
|
|
|
@@ -75,11 +75,6 @@ java_group("google_play_services_instantapps_java") {
|
|
|
|
":com_google_android_gms_play_services_instantapps_java", |
|
|
|
] |
|
|
|
} |
|
|
|
-java_group("google_play_services_gcm_java") {
|
|
|
|
- deps = [
|
|
|
|
- ":com_google_android_gms_play_services_gcm_java",
|
|
|
|
- ]
|
|
|
|
-}
|
|
|
|
java_group("google_play_services_location_java") { |
|
|
|
deps = [ |
|
|
|
":com_google_android_gms_play_services_location_java", |
|
|
|
@@ -496,21 +491,6 @@ android_aar_prebuilt("com_google_android_gms_play_services_fido_java") {
|
|
|
|
strip_drawables = true |
|
|
|
} |
|
|
|
|
|
|
|
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
|
|
|
-android_aar_prebuilt("com_google_android_gms_play_services_gcm_java") {
|
|
|
|
- aar_path = "libs/com_google_android_gms_play_services_gcm/play-services-gcm-15.0.1.aar"
|
|
|
|
- info_path = "libs/com_google_android_gms_play_services_gcm/com_google_android_gms_play_services_gcm.info"
|
|
|
|
- deps = [
|
|
|
|
- ":com_google_android_gms_play_services_base_java",
|
|
|
|
- ":com_google_android_gms_play_services_basement_java",
|
|
|
|
- ":com_google_android_gms_play_services_iid_java",
|
|
|
|
- ":com_google_android_gms_play_services_stats_java",
|
|
|
|
- ]
|
|
|
|
-
|
|
|
|
- # Removing drawables from GMS .aars as they are unused bloat.
|
|
|
|
- strip_drawables = true
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead. |
|
|
|
android_aar_prebuilt("com_google_android_gms_play_services_iid_java") { |
|
|
|
aar_path = "libs/com_google_android_gms_play_services_iid/play-services-iid-15.0.1.aar" |
|
|
|
diff --git a/third_party/cacheinvalidation/BUILD.gn b/third_party/cacheinvalidation/BUILD.gn
|
|
|
|
--- a/third_party/cacheinvalidation/BUILD.gn
|
|
|
|
+++ b/third_party/cacheinvalidation/BUILD.gn
|
|
|
|
@@ -137,7 +137,6 @@ if (is_android) {
|
|
|
|
emma_never_instrument = true |
|
|
|
deps = [ |
|
|
|
":cacheinvalidation_proto_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", |
|
|
|
"//third_party/android_protobuf:protobuf_nano_javalib", |
|
|
|
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
|
|
|
|
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
|
|
|
|
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
|
|
|
|
@@ -24,17 +24,6 @@
|
|
|
|
<receiver android:exported="false" |
|
|
|
android:name="com.google.ipc.invalidation.ticl2.android2.AndroidInternalScheduler$AlarmReceiver"/> |
|
|
|
|
|
|
|
- <!-- GCM Broadcast Receiver -->
|
|
|
|
- <receiver android:exported="true"
|
|
|
|
- android:name="com.google.android.gms.gcm.GcmReceiver"
|
|
|
|
- android:permission="com.google.android.c2dm.permission.SEND">
|
|
|
|
- <intent-filter>
|
|
|
|
- <action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
|
|
|
- <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
|
|
|
- <category android:name="com.google.ipc.invalidation.client2.android2"/>
|
|
|
|
- </intent-filter>
|
|
|
|
- </receiver>
|
|
|
|
-
|
|
|
|
<!-- InstanceID Listener Service --> |
|
|
|
<service android:exported="false" |
|
|
|
android:name="com.google.ipc.invalidation.ticl2.android2.channel.AndroidInstanceIDListenerService"> |
|
|
|
@@ -42,14 +31,5 @@
|
|
|
|
<action android:name="com.google.android.gms.iid.InstanceID"/> |
|
|
|
</intent-filter> |
|
|
|
</service> |
|
|
|
-
|
|
|
|
- <!-- GcmTaskService for registration -->
|
|
|
|
- <service android:name="com.google.ipc.invalidation.ticl2.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>
|
|
|
|
</application> |
|
|
|
</manifest> |
|
|
|
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidGcmController.java b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidGcmController.java
|
|
|
|
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidGcmController.java
|
|
|
|
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidGcmController.java
|
|
|
|
@@ -15,8 +15,6 @@
|
|
|
|
*/ |
|
|
|
package com.google.ipc.invalidation.ticl.android2.channel; |
|
|
|
|
|
|
|
-import com.google.android.gms.gcm.GcmNetworkManager;
|
|
|
|
-import com.google.android.gms.gcm.OneoffTask;
|
|
|
|
import com.google.ipc.invalidation.common.GcmSharedConstants; |
|
|
|
import com.google.ipc.invalidation.external.client.SystemResources.Logger; |
|
|
|
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; |
|
|
|
@@ -50,7 +48,7 @@ public class AndroidGcmController {
|
|
|
|
|
|
|
|
private static AndroidGcmController androidGcmController; |
|
|
|
|
|
|
|
- private GcmNetworkManager gcmNetworkManager;
|
|
|
|
+// private GcmNetworkManager gcmNetworkManager;
|
|
|
|
|
|
|
|
private Context context; |
|
|
|
|
|
|
|
@@ -64,32 +62,12 @@ public class AndroidGcmController {
|
|
|
|
public static AndroidGcmController get(Context context) { |
|
|
|
synchronized (lock) { |
|
|
|
if (androidGcmController == null) { |
|
|
|
- androidGcmController =
|
|
|
|
- new AndroidGcmController(context, GcmNetworkManager.getInstance(context));
|
|
|
|
+ androidGcmController = null;
|
|
|
|
} |
|
|
|
} |
|
|
|
return androidGcmController; |
|
|
|
} |
|
|
|
|
|
|
|
- /**
|
|
|
|
- * Override AndroidGcmController with a custom GcmNetworkManager in tests. This overrides the
|
|
|
|
- * existing instance of AndroidGcmController if any.
|
|
|
|
- *
|
|
|
|
- * @param context the application context.
|
|
|
|
- * @param gcmNetworkManager the custom GcmNetworkManager to use.
|
|
|
|
- */
|
|
|
|
- public static void overrideAndroidGcmControllerForTests(
|
|
|
|
- Context context, GcmNetworkManager gcmNetworkManager) {
|
|
|
|
- synchronized (lock) {
|
|
|
|
- androidGcmController = new AndroidGcmController(context, gcmNetworkManager);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private AndroidGcmController(Context context, GcmNetworkManager gcmNetworkManager) {
|
|
|
|
- this.context = context;
|
|
|
|
- this.gcmNetworkManager = gcmNetworkManager;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/** |
|
|
|
* Returns true if no registration token is stored or the current application version is higher |
|
|
|
* than the version for the token stored. |
|
|
|
@@ -142,21 +120,7 @@ public class AndroidGcmController {
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
- OneoffTask registrationTask =
|
|
|
|
- new OneoffTask.Builder()
|
|
|
|
- .setExecutionWindow(0, 1)
|
|
|
|
- .setTag(AndroidChannelConstants.GCM_REGISTRATION_TASK_SERVICE_TAG)
|
|
|
|
- .setService(GcmRegistrationTaskService.class)
|
|
|
|
- .build();
|
|
|
|
-
|
|
|
|
- try {
|
|
|
|
- gcmNetworkManager.schedule(registrationTask);
|
|
|
|
- } catch (IllegalArgumentException exception) {
|
|
|
|
- // Scheduling the service can throw an exception due to a framework error on Android when
|
|
|
|
- // the the look up for the GCMTaskService being scheduled to be run fails.
|
|
|
|
- // See crbug/548314.
|
|
|
|
- logger.warning("Failed to schedule GCM registration task. Exception: %s", exception);
|
|
|
|
- }
|
|
|
|
+ logger.warning("Failed to schedule GCM registration task.");
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidInstanceIDListenerService.java b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidInstanceIDListenerService.java
|
|
|
|
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidInstanceIDListenerService.java
|
|
|
|
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidInstanceIDListenerService.java
|
|
|
|
@@ -15,7 +15,6 @@
|
|
|
|
*/ |
|
|
|
package com.google.ipc.invalidation.ticl.android2.channel; |
|
|
|
|
|
|
|
-import com.google.android.gms.iid.InstanceIDListenerService;
|
|
|
|
import com.google.ipc.invalidation.external.client.SystemResources.Logger; |
|
|
|
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; |
|
|
|
|
|
|
|
@@ -23,16 +22,6 @@ import com.google.ipc.invalidation.external.client.android.service.AndroidLogger
|
|
|
|
* Implementation of {@link InstanceIDListenerService} to receive notifications from GCM to |
|
|
|
* update the registration token. |
|
|
|
*/ |
|
|
|
-public class AndroidInstanceIDListenerService extends InstanceIDListenerService {
|
|
|
|
+public class AndroidInstanceIDListenerService {
|
|
|
|
private static final Logger logger = AndroidLogger.forTag("InstanceIDListener"); |
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Called when the token needs to updated. {@link AndroidGcmController#fetchToken} clears the
|
|
|
|
- * current token and schedules a task to fetch a new token.
|
|
|
|
- */
|
|
|
|
- @Override
|
|
|
|
- public void onTokenRefresh() {
|
|
|
|
- logger.info("Received token refresh request");
|
|
|
|
- AndroidGcmController.get(this).fetchToken();
|
|
|
|
- }
|
|
|
|
} |
|
|
|
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/GcmRegistrationTaskService.java b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/GcmRegistrationTaskService.java
|
|
|
|
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/GcmRegistrationTaskService.java
|
|
|
|
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/GcmRegistrationTaskService.java
|
|
|
|
@@ -15,11 +15,6 @@
|
|
|
|
*/ |
|
|
|
package com.google.ipc.invalidation.ticl.android2.channel; |
|
|
|
|
|
|
|
-import com.google.android.gms.gcm.GcmNetworkManager;
|
|
|
|
-import com.google.android.gms.gcm.GcmTaskService;
|
|
|
|
-import com.google.android.gms.gcm.GoogleCloudMessaging;
|
|
|
|
-import com.google.android.gms.gcm.TaskParams;
|
|
|
|
-import com.google.android.gms.iid.InstanceID;
|
|
|
|
import com.google.ipc.invalidation.common.GcmSharedConstants; |
|
|
|
import com.google.ipc.invalidation.external.client.SystemResources.Logger; |
|
|
|
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; |
|
|
|
@@ -42,88 +37,6 @@ import java.io.IOException;
|
|
|
|
* failure to fetch the token, the task is rescheduled using the GcmNetworkManager which uses |
|
|
|
* exponential back-offs to control when the task is executed. |
|
|
|
*/ |
|
|
|
-public class GcmRegistrationTaskService extends GcmTaskService {
|
|
|
|
+public class GcmRegistrationTaskService {
|
|
|
|
private static final Logger logger = AndroidLogger.forTag("RegistrationTaskService"); |
|
|
|
-
|
|
|
|
- public InstanceID getInstanceID(Context context) {
|
|
|
|
- return InstanceID.getInstance(context);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Called when the task is ready to be executed. Registers with GCM using
|
|
|
|
- * {@link InstanceID#getToken} and stores the registration token.
|
|
|
|
- *
|
|
|
|
- * <p>Returns {@link GcmNetworkManager#RESULT_SUCCESS} when the token is successfully retrieved.
|
|
|
|
- * On failure {@link GcmNetworkManager#RESULT_RESCHEDULE} is used which reschedules the service
|
|
|
|
- * to be executed again using exponential back-off.
|
|
|
|
- */
|
|
|
|
- @Override
|
|
|
|
- public int onRunTask(TaskParams params) {
|
|
|
|
- if (!AndroidChannelConstants.GCM_REGISTRATION_TASK_SERVICE_TAG.equals(params.getTag())) {
|
|
|
|
- logger.warning("Unknown task received with tag: %s", params.getTag());
|
|
|
|
- return GcmNetworkManager.RESULT_FAILURE;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- String senderId = GcmSharedConstants.GCM_UPDATED_SENDER_ID;
|
|
|
|
- try {
|
|
|
|
- String token = getInstanceID(this).getToken(
|
|
|
|
- senderId, GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
|
|
|
|
- storeToken(token);
|
|
|
|
- return GcmNetworkManager.RESULT_SUCCESS;
|
|
|
|
- } catch (IOException exception) {
|
|
|
|
- logger.warning("Failed to get token for sender: %s. Exception : %s", senderId, exception);
|
|
|
|
- return GcmNetworkManager.RESULT_RESCHEDULE;
|
|
|
|
- } catch (SecurityException exception) {
|
|
|
|
- // InstanceID#getToken occasionally throws a security exception when trying send the
|
|
|
|
- // registration intent to GMSCore. Catching the exception here to prevent crashes.
|
|
|
|
- logger.warning("Security exception when fetching token: %s", exception);
|
|
|
|
- return GcmNetworkManager.RESULT_RESCHEDULE;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /** Stores the registration token and the current application version in Shared Preferences. */
|
|
|
|
- private void storeToken(String token) {
|
|
|
|
- AndroidChannelPreferences.setRegistrationToken(this, token);
|
|
|
|
- AndroidChannelPreferences.setAppVersion(
|
|
|
|
- this, CommonUtils.getPackageVersion(this, getPackageName()));
|
|
|
|
- // Send the updated token to the server.
|
|
|
|
- updateServer();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /** Sends a message to the server to update the GCM registration token. */
|
|
|
|
- private void updateServer() {
|
|
|
|
- // Inform the sender service that the registration token has changed. If the sender service
|
|
|
|
- // had buffered a message because no registration token was previously available, this intent
|
|
|
|
- // will cause it to send that message.
|
|
|
|
- Intent sendBuffered = new Intent();
|
|
|
|
- final String ignoredData = "";
|
|
|
|
- sendBuffered.putExtra(AndroidChannelConstants.MESSAGE_SENDER_SVC_GCM_REGID_CHANGE, ignoredData);
|
|
|
|
-
|
|
|
|
- // Select the sender service to use for upstream message.
|
|
|
|
- if (AndroidChannelPreferences.getGcmChannelType(this) == GcmChannelType.GCM_UPSTREAM) {
|
|
|
|
- String upstreamServiceClass = new AndroidTiclManifest(this).getGcmUpstreamServiceClass();
|
|
|
|
- if (upstreamServiceClass == null) {
|
|
|
|
- logger.warning("GcmUpstreamSenderService class not found.");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- sendBuffered.setClassName(this, upstreamServiceClass);
|
|
|
|
- } else {
|
|
|
|
- sendBuffered.setClass(this, AndroidMessageSenderService.class);
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
- startService(sendBuffered);
|
|
|
|
- } catch (IllegalStateException exception) {
|
|
|
|
- logger.warning("Unable to send buffered message(s): %s", exception);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // Inform the Ticl service that the registration id has changed. This will cause it to send
|
|
|
|
- // a message to the data center and update the GCM registration id stored at the data center.
|
|
|
|
- Intent updateServer = ProtocolIntents.InternalDowncalls.newNetworkAddrChangeIntent();
|
|
|
|
- updateServer.setClassName(this, new AndroidTiclManifest(this).getTiclServiceClass());
|
|
|
|
- try {
|
|
|
|
- startService(updateServer);
|
|
|
|
- } catch (IllegalStateException exception) {
|
|
|
|
- logger.warning("Unable to inform server about new registration id: %s", exception);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
} |