diff --git a/app/src/main/java/net/headlezz/notificationlogger/DatabaseUtils.java b/app/src/main/java/net/headlezz/notificationlogger/DatabaseUtils.java index 7baddf8..045a774 100644 --- a/app/src/main/java/net/headlezz/notificationlogger/DatabaseUtils.java +++ b/app/src/main/java/net/headlezz/notificationlogger/DatabaseUtils.java @@ -75,4 +75,11 @@ public class DatabaseUtils { ); } + public static void deleteNotification(Context context, long id) { + context.getContentResolver().delete( + Logged_notificationTable.CONTENT_URI, + Logged_notificationTable.FIELD__ID + " = ?", + new String[] {String.valueOf(id)} + ); + } } diff --git a/app/src/main/java/net/headlezz/notificationlogger/notificationlist/NotificationListAdapter.java b/app/src/main/java/net/headlezz/notificationlogger/notificationlist/NotificationListAdapter.java index 7370007..21c3a83 100644 --- a/app/src/main/java/net/headlezz/notificationlogger/notificationlist/NotificationListAdapter.java +++ b/app/src/main/java/net/headlezz/notificationlogger/notificationlist/NotificationListAdapter.java @@ -22,7 +22,7 @@ import butterknife.Bind; import butterknife.ButterKnife; -public class NotificationListAdapter extends CursorRecyclerViewAdapter implements View.OnClickListener { +public class NotificationListAdapter extends CursorRecyclerViewAdapter implements View.OnClickListener, View.OnLongClickListener { class NotificationViewHolder extends RecyclerView.ViewHolder { @@ -74,6 +74,7 @@ public class NotificationListAdapter extends CursorRecyclerViewAdapterExporting ... Failed to export data. Exported to %s. + Share Notification + %s blacklisted. + Undo + + + Show more info + Delete notification + Create filter + Blacklist this app + Share message + Alarm