Skip to content

Commit fc1c1d9

Browse files
author
Evan Greer
committed
clean up
1 parent e6f9a67 commit fc1c1d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableNotificationBuilder.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,21 @@ private PendingIntent getPendingIntent(Context context, IterableNotificationData
129129
buttonIntent.putExtra(IterableConstants.ITERABLE_DATA_ACTION_IDENTIFIER, button.identifier);
130130
buttonIntent.putExtra(IterableConstants.ACTION_IDENTIFIER, button.identifier);
131131

132+
int pendingIntentFlag = button.buttonType.equals(IterableNotificationData.Button.BUTTON_TYPE_TEXT_INPUT) ?
133+
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE :
134+
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE;
135+
132136
if (button.openApp) {
133137
IterableLogger.d(TAG, "Go through TrampolineActivity");
134138
buttonIntent.setClass(context, IterableTrampolineActivity.class);
135139
buttonIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
136-
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;
140+
// int pendingIntentFlag = pendingIntentFlag;
137141
pendingButtonIntent = PendingIntent.getActivity(context, buttonIntent.hashCode(),
138142
buttonIntent, pendingIntentFlag);
139143
} else {
140144
IterableLogger.d(TAG, "Go through IterablePushActionReceiver");
141145
buttonIntent.setClass(context, IterablePushActionReceiver.class);
142-
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;
146+
// int pendingIntentFlag = pendingIntentFlag;
143147
pendingButtonIntent = PendingIntent.getBroadcast(context, buttonIntent.hashCode(),
144148
buttonIntent, pendingIntentFlag);
145149
}

0 commit comments

Comments
 (0)