Merge "allow smart folder to support more than 2 items" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot
2019-12-06 05:29:24 +00:00
committed by Android (Google) Code Review
+2 -1
View File
@@ -417,7 +417,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
* Show suggested folder title.
*/
public void showSuggestedTitle(String[] suggestName) {
if (FeatureFlags.FOLDER_NAME_SUGGEST.get() && mInfo.contents.size() == 2) {
if (FeatureFlags.FOLDER_NAME_SUGGEST.get()
&& TextUtils.isEmpty(mFolderName.getText().toString())) {
if (suggestName.length > 0 && !TextUtils.isEmpty(suggestName[0])) {
mFolderName.setHint(suggestName[0]);
mFolderName.setText(suggestName[0]);