summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-06-02 13:32:25 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-06-02 13:32:25 +0000
commit3f6cd5033c43f0e459a56b84a1f845b1332b1410 (patch)
tree9681fb6399b260ca3bda79d491cac43de3a320d3
parentd935321873c18b836d9530cd99b0a57bb2540278 (diff)
parent33f840317db7314f759fe734a65865fc4414d05f (diff)
Merge "Use shortcut label for overflow conversation title" into rvc-dev am: 33f840317d
Original change: undetermined Change-Id: Ied9c8695abf038a63a0f910f59e0163d8d3188f5
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java
index bea4ba776beb..8fd20517782f 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java
@@ -22,6 +22,7 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME
import android.app.Activity;
import android.content.Context;
+import android.content.pm.ShortcutInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -204,6 +205,8 @@ public class BubbleOverflowActivity extends Activity {
}
class BubbleOverflowAdapter extends RecyclerView.Adapter<BubbleOverflowAdapter.ViewHolder> {
+ private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleOverflowAdapter" : TAG_BUBBLES;
+
private Context mContext;
private Consumer<Bubble> mPromoteBubbleFromOverflow;
private List<Bubble> mBubbles;
@@ -282,11 +285,16 @@ class BubbleOverflowAdapter extends RecyclerView.Adapter<BubbleOverflowAdapter.V
}
});
- Bubble.FlyoutMessage message = b.getFlyoutMessage();
- if (message != null && message.senderName != null) {
- vh.textView.setText(message.senderName.toString());
+ ShortcutInfo info = b.getEntry().getRanking().getShortcutInfo();
+ if (info == null) {
+ Log.d(TAG, "ShortcutInfo required to bubble but none found for " + b);
} else {
- vh.textView.setText(b.getAppName());
+ CharSequence label = info.getLabel();
+ if (label == null) {
+ vh.textView.setText(b.getAppName());
+ } else {
+ vh.textView.setText(label.toString());
+ }
}
}