Skip to content

Commit

Permalink
Merge pull request #88 from freeflyk/issue#87
Browse files Browse the repository at this point in the history
Issue#87
  • Loading branch information
0xf104a committed Jun 22, 2024
2 parents aa3b831 + 3d09e2d commit 5adcafb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ private static PendingIntent getCustomActionIntent(Context context,
}
intent.putExtra("action_link", link);
intent.putExtra("action_method", type);
intent.setPackage(context.getPackageName()); // Issue 78 --> https://developer.android.com/about/versions/14/behavior-changes-14?hl=en#safer-intents
} catch (JSONException e) {
Log.e(TAG, "Can not get link or method from action provided by Nextcloud API");
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ public int iconByApp(String appName) {
}


@SuppressLint("UnspecifiedImmutableFlag")
//@SuppressLint("UnspecifiedImmutableFlag")
private PendingIntent createNotificationDeleteIntent(Context context, int id) {
Intent intent = new Intent();
intent.setAction(Config.NotificationEventAction);
intent.putExtra("notification_id", id);
intent.putExtra("notification_event", NOTIFICATION_EVENT_DELETE);
intent.setPackage(context.getPackageName());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
return PendingIntent.getBroadcast(
context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private NotificationCompat.Builder setTalkOpenIntent(Context context,
Log.d(TAG, "Setting up talk notification open intent");

Intent intent = pm.getLaunchIntentForPackage("com.nextcloud.talk2");
intent.setPackage(context.getPackageName());
PendingIntent pending_intent;
pending_intent = PendingIntent.getActivity(context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
Expand Down

0 comments on commit 5adcafb

Please sign in to comment.