Add a11y announcement

Since the button for clearing recent conversations may still
exist after the user triggers the button since some of the
conversations might not be removable

Test: manual with talkback
Fixes: 185433664
Change-Id: Id58d76237643e4e206ea6d551cdf7dd9f5742282
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4f377ee..561a076 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -8985,9 +8985,12 @@
     <!-- [CHAR LIMIT=100] preference category title -->
     <string name="recent_conversations">Recent conversations</string>
 
-    <!-- [CHAR LIMIT=40] button title -->
+    <!-- [CHAR LIMIT=60] button title -->
     <string name="conversation_settings_clear_recents">Clear recent conversations</string>
 
+    <!-- a11y feedeback for 'clear recents' button' -->
+    <string name="recent_convos_removed">Recent conversations removed</string>
+
     <!-- a11y string -->
     <string name="clear">Clear</string>
 
diff --git a/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java b/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
index d4ad994..8bb64e2 100644
--- a/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
+++ b/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
@@ -92,6 +92,7 @@
                         }
                     }
                 }
+                button.announceForAccessibility(mContext.getString(R.string.recent_convos_removed));
             } catch (RemoteException e) {
                 Slog.w(TAG, "Could not clear recents", e);
             }