From 362350a54359c22e94c25edc008978645c8e6ee9 Mon Sep 17 00:00:00 2001 From: uabdullah Date: Thu, 8 Mar 2018 18:24:33 -0800 Subject: Implement non-ui logic for delete/undo delete voicemails When a voicemail is deleted we have to allow the user the option of cancelling the deleting of voicemail. This is done by showing the user a snack bar which when a user taps will prevent the voicemail from being deleted. This CL only adds the underlying logic for the delete/undelete to take place via a ScheduledFuture, it does not fix all the UI issues that come with it, which will be sent in a follow up CL, issues such as: -Updating the group label when a delete/undo happens -Updating the entries above and below when a delete/undo happens -Showing the empty view immediately when a user deletes a single voicemail -Removing the empty view immediately when a user taps undo -Updating tests Bug: 69858266 Test: Manual PiperOrigin-RevId: 188424489 Change-Id: Iecf5cb7be5b80fa5e91acaad3a7cc4a6c8702521 --- java/com/android/dialer/blocking/BlockNumberDialogFragment.java | 4 ++-- java/com/android/dialer/blocking/res/values/strings.xml | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'java/com/android/dialer/blocking') diff --git a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java index f723a9cbe..dfd6ef076 100644 --- a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java +++ b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java @@ -244,7 +244,7 @@ public class BlockNumberDialogFragment extends DialogFragment { }; Snackbar.make(parentView, message, Snackbar.LENGTH_LONG) - .setAction(R.string.block_number_undo, undoListener) + .setAction(R.string.snackbar_undo, undoListener) .setActionTextColor(actionTextColor) .show(); @@ -295,7 +295,7 @@ public class BlockNumberDialogFragment extends DialogFragment { }; Snackbar.make(parentView, message, Snackbar.LENGTH_LONG) - .setAction(R.string.block_number_undo, undoListener) + .setAction(R.string.snackbar_undo, undoListener) .setActionTextColor(actionTextColor) .show(); diff --git a/java/com/android/dialer/blocking/res/values/strings.xml b/java/com/android/dialer/blocking/res/values/strings.xml index a660731b4..7b344da4a 100644 --- a/java/com/android/dialer/blocking/res/values/strings.xml +++ b/java/com/android/dialer/blocking/res/values/strings.xml @@ -78,9 +78,6 @@ %1$sunblocked - - UNDO - Import failed -- cgit v1.2.3