summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java')
-rw-r--r--StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java32
1 files changed, 13 insertions, 19 deletions
diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java
index 0d399a61..23682ac8 100644
--- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java
+++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java
@@ -11,7 +11,7 @@ import android.support.v4.app.RemoteInput;
public class PushHandlerActivity extends Activity implements PushConstants {
- private static String LOG_TAG = "Push_HandlerActivity";
+ private static String LOG_TAG = "PushPlugin_PushHandlerActivity";
/*
* this activity will be started if the user touches a notification that we own.
@@ -21,7 +21,7 @@ public class PushHandlerActivity extends Activity implements PushConstants {
*/
@Override
public void onCreate(Bundle savedInstanceState) {
- FCMService gcm = new FCMService();
+ GCMIntentService gcm = new GCMIntentService();
Intent intent = getIntent();
@@ -34,18 +34,16 @@ public class PushHandlerActivity extends Activity implements PushConstants {
Log.d(LOG_TAG, "callback = " + callback);
boolean foreground = getIntent().getExtras().getBoolean("foreground", true);
boolean startOnBackground = getIntent().getExtras().getBoolean(START_IN_BACKGROUND, false);
- boolean dismissed = getIntent().getExtras().getBoolean(DISMISSED, false);
- Log.d(LOG_TAG, "dismissed = " + dismissed);
if(!startOnBackground){
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- notificationManager.cancel(FCMService.getAppName(this), notId);
+ notificationManager.cancel(GCMIntentService.getAppName(this), notId);
}
boolean isPushPluginActive = PushPlugin.isActive();
boolean inline = processPushBundle(isPushPluginActive, intent);
- if(inline && android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N && !startOnBackground){
+ if(inline && android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N){
foreground = true;
}
@@ -53,17 +51,15 @@ public class PushHandlerActivity extends Activity implements PushConstants {
finish();
- if(!dismissed) {
- Log.d(LOG_TAG, "isPushPluginActive = " + isPushPluginActive);
- if (!isPushPluginActive && foreground && inline) {
- Log.d(LOG_TAG, "forceMainActivityReload");
- forceMainActivityReload(false);
- } else if(startOnBackground) {
- Log.d(LOG_TAG, "startOnBackgroundTrue");
- forceMainActivityReload(true);
- } else {
- Log.d(LOG_TAG, "don't want main activity");
- }
+ Log.d(LOG_TAG, "isPushPluginActive = " + isPushPluginActive);
+ if (!isPushPluginActive && foreground && inline) {
+ Log.d(LOG_TAG, "forceMainActivityReload");
+ forceMainActivityReload(false);
+ } else if(startOnBackground) {
+ Log.d(LOG_TAG, "startOnBackgroundTrue");
+ forceMainActivityReload(true);
+ } else {
+ Log.d(LOG_TAG, "don't want main activity");
}
}
@@ -80,9 +76,7 @@ public class PushHandlerActivity extends Activity implements PushConstants {
originalExtras.putBoolean(FOREGROUND, false);
originalExtras.putBoolean(COLDSTART, !isPushPluginActive);
- originalExtras.putBoolean(DISMISSED, extras.getBoolean(DISMISSED));
originalExtras.putString(ACTION_CALLBACK, extras.getString(CALLBACK));
- originalExtras.remove(NO_CACHE);
remoteInput = RemoteInput.getResultsFromIntent(intent);
if (remoteInput != null) {