summaryrefslogtreecommitdiff
path: root/notification
diff options
context:
space:
mode:
authorTony Mak <tonymak@google.com>2021-01-13 21:12:07 +0000
committerTony Mak <tonymak@google.com>2021-01-14 12:24:26 +0000
commit13125538c0ff4149d681d8647ab909c1e1295cf0 (patch)
treefdf6e9cc0bc21c68a87daff0900ae0e559c186e8 /notification
parent5f3aa6550d0d3e49fc9af103148c59c9021c7e40 (diff)
downloadlibtextclassifier-13125538c0ff4149d681d8647ab909c1e1295cf0.tar.gz
Export libtextclassifier to mainline-prod
It was blocked by the fact that the flatbuffer library was too old. This is now fixed in ag/13303352. Test: m mts && mts-tradefed run mts-extservices Test: Sideload the apk on R. Tested smart selection + notification suggestion. Test: Repeat the above with only the factory models in the APK Bug: 169042373 Merged-In: I5bc23741edf1da74fc15a4b25f4b43efe352e88b Change-Id: I29874698204111b10d8e8cd86caed979eb763046
Diffstat (limited to 'notification')
-rw-r--r--notification/src/com/android/textclassifier/notification/SmartSuggestionsHelper.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/notification/src/com/android/textclassifier/notification/SmartSuggestionsHelper.java b/notification/src/com/android/textclassifier/notification/SmartSuggestionsHelper.java
index 0fee3b3..44af148 100644
--- a/notification/src/com/android/textclassifier/notification/SmartSuggestionsHelper.java
+++ b/notification/src/com/android/textclassifier/notification/SmartSuggestionsHelper.java
@@ -312,7 +312,15 @@ public class SmartSuggestionsHelper {
*/
public void onNotificationExpansionChanged(
StatusBarNotification statusBarNotification, boolean isExpanded) {
- SmartSuggestionsLogSession session = sessionCache.get(statusBarNotification.getKey());
+ onNotificationExpansionChanged(statusBarNotification.getKey(), isExpanded);
+ }
+
+ /**
+ * Similar to {@link onNotificationExpansionChanged}, except that this takes the notificataion key
+ * as input.
+ */
+ public void onNotificationExpansionChanged(String key, boolean isExpanded) {
+ SmartSuggestionsLogSession session = sessionCache.get(key);
if (session == null) {
return;
}