Merge "Fix the dot state for persisted bubbles & clean up labels" into rvc-dev am: f8b08dfa4a am: a1a8fc3806 am: 116537e5fd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11915546

Change-Id: If1bc92fe16c9f6e089f014760b893043f253c55b
This commit is contained in:
TreeHugger Robot
2020-06-18 20:27:56 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 13 deletions

View File

@@ -144,6 +144,7 @@ class Bubble implements BubbleViewProvider {
mDesiredHeight = desiredHeight; mDesiredHeight = desiredHeight;
mDesiredHeightResId = desiredHeightResId; mDesiredHeightResId = desiredHeightResId;
mTitle = title; mTitle = title;
mShowBubbleUpdateDot = false;
} }
/** Used in tests when no UI is required. */ /** Used in tests when no UI is required. */

View File

@@ -22,7 +22,6 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.pm.ShortcutInfo;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.content.res.TypedArray; import android.content.res.TypedArray;
@@ -289,18 +288,10 @@ class BubbleOverflowAdapter extends RecyclerView.Adapter<BubbleOverflowAdapter.V
} }
}); });
// If the bubble was persisted, the entry is null but it should have shortcut info CharSequence label = b.getShortcutInfo() != null
ShortcutInfo info = b.getShortcutInfo(); ? b.getShortcutInfo().getLabel()
if (info == null) { : b.getAppName();
Log.d(TAG, "ShortcutInfo required to bubble but none found for " + b); vh.textView.setText(label);
} else {
CharSequence label = info.getLabel();
if (label == null) {
vh.textView.setText(b.getAppName());
} else {
vh.textView.setText(label.toString());
}
}
} }
@Override @Override