From c0ca13be1911b572b77efb895cf8e481988f4542 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Thu, 24 Nov 2016 17:13:59 -0500 Subject: [PATCH] Refactor GCMIntentService to FCMService --- .../adobe/phonegap/push/BackgroundActionButtonHandler.java | 2 +- .../phonegap/push/{GCMIntentService.java => FCMService.java} | 2 +- src/android/com/adobe/phonegap/push/PushHandlerActivity.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/android/com/adobe/phonegap/push/{GCMIntentService.java => FCMService.java} (99%) diff --git a/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java b/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java index 3ccea6cb5..08658d70d 100644 --- a/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java +++ b/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java @@ -19,7 +19,7 @@ public void onReceive(Context context, Intent intent) { int notId = intent.getIntExtra(NOT_ID, 0); Log.d(LOG_TAG, "not id = " + notId); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.cancel(GCMIntentService.getAppName(context), notId); + notificationManager.cancel(FCMService.getAppName(context), notId); if (extras != null) { Bundle originalExtras = extras.getBundle(PUSH_BUNDLE); diff --git a/src/android/com/adobe/phonegap/push/GCMIntentService.java b/src/android/com/adobe/phonegap/push/FCMService.java similarity index 99% rename from src/android/com/adobe/phonegap/push/GCMIntentService.java rename to src/android/com/adobe/phonegap/push/FCMService.java index 902f767e3..52c33125b 100644 --- a/src/android/com/adobe/phonegap/push/GCMIntentService.java +++ b/src/android/com/adobe/phonegap/push/FCMService.java @@ -41,7 +41,7 @@ import java.util.Random; @SuppressLint("NewApi") -public class GCMIntentService extends FirebaseMessagingService implements PushConstants { +public class FCMService extends FirebaseMessagingService implements PushConstants { private static final String LOG_TAG = "PushPlugin_FCMService"; private static HashMap> messageMap = new HashMap>(); diff --git a/src/android/com/adobe/phonegap/push/PushHandlerActivity.java b/src/android/com/adobe/phonegap/push/PushHandlerActivity.java index 23682ac8e..883349be4 100644 --- a/src/android/com/adobe/phonegap/push/PushHandlerActivity.java +++ b/src/android/com/adobe/phonegap/push/PushHandlerActivity.java @@ -21,7 +21,7 @@ public class PushHandlerActivity extends Activity implements PushConstants { */ @Override public void onCreate(Bundle savedInstanceState) { - GCMIntentService gcm = new GCMIntentService(); + FCMService gcm = new FCMService(); Intent intent = getIntent(); @@ -37,7 +37,7 @@ public void onCreate(Bundle savedInstanceState) { if(!startOnBackground){ NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.cancel(GCMIntentService.getAppName(this), notId); + notificationManager.cancel(FCMService.getAppName(this), notId); } boolean isPushPluginActive = PushPlugin.isActive();