Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Greer committed Jan 21, 2025
1 parent e6f9a67 commit fc1c1d9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,21 @@ private PendingIntent getPendingIntent(Context context, IterableNotificationData
buttonIntent.putExtra(IterableConstants.ITERABLE_DATA_ACTION_IDENTIFIER, button.identifier);
buttonIntent.putExtra(IterableConstants.ACTION_IDENTIFIER, button.identifier);

int pendingIntentFlag = button.buttonType.equals(IterableNotificationData.Button.BUTTON_TYPE_TEXT_INPUT) ?
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE :
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE;

if (button.openApp) {
IterableLogger.d(TAG, "Go through TrampolineActivity");
buttonIntent.setClass(context, IterableTrampolineActivity.class);
buttonIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
int pendingIntentFlag = button.buttonType.equals(IterableNotificationData.Button.BUTTON_TYPE_TEXT_INPUT) ? PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE : PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE;
// int pendingIntentFlag = pendingIntentFlag;
pendingButtonIntent = PendingIntent.getActivity(context, buttonIntent.hashCode(),
buttonIntent, pendingIntentFlag);
} else {
IterableLogger.d(TAG, "Go through IterablePushActionReceiver");
buttonIntent.setClass(context, IterablePushActionReceiver.class);
int pendingIntentFlag = button.buttonType.equals(IterableNotificationData.Button.BUTTON_TYPE_TEXT_INPUT) ? PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE : PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE;
// int pendingIntentFlag = pendingIntentFlag;
pendingButtonIntent = PendingIntent.getBroadcast(context, buttonIntent.hashCode(),
buttonIntent, pendingIntentFlag);
}
Expand Down

0 comments on commit fc1c1d9

Please sign in to comment.