Skip to content

Commit

Permalink
confirmDeleteAlarm
Browse files Browse the repository at this point in the history
nullcheck
  • Loading branch information
forrestguice committed Oct 2, 2023
1 parent a0d5d56 commit fa01950
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,13 @@ public boolean onMenuItemClick(MenuItem menuItem)
menu.show();
}

public static void confirmDeleteAlarm(final Context context, final AlarmClockItem item, DialogInterface.OnClickListener onDeleteConfirmed)
public static void confirmDeleteAlarm(@Nullable final Context context, @Nullable final AlarmClockItem item, DialogInterface.OnClickListener onDeleteConfirmed)
{
if (context == null || item == null) {
Log.w("AlarmEditDialog", "confirmDeleteAlarm: null context or item! confirmation message was not shown.");
return;
}

int[] attrs = { R.attr.icActionDelete };
TypedArray a = context.obtainStyledAttributes(attrs);
int iconResID = a.getResourceId(0, R.drawable.ic_action_discard);
Expand Down

0 comments on commit fa01950

Please sign in to comment.