Adds additional folder label states (UNLABELED & EMPTY_LABEL)
UNLABELED -> title==null and EMPTY_LABEL -> title=="". When adding new items for the folder if the folder is in UNLABELED state, auto-labeling will be enabled. This change also addresses auto-labeling issue due to false edit from UNLABELED to EMPTY. Bug: 159164315 Change-Id: Ia17cd27b4afb60420dc15c544f544061fc46ad33
This commit is contained in:
1 parent
5c9a1ef5cd
commit
ec75cbd85a
6 files changed
+94
-26
No files matched your search
@@ -52,6 +52,7 @@ import com.android.launcher3.logger.LauncherAtom.SearchResultContainer;
|
||||
import com.android.launcher3.logger.LauncherAtom.SettingsContainer;
|
||||
import com.android.launcher3.logger.LauncherAtom.ShortcutsContainer;
|
||||
import com.android.launcher3.logger.LauncherAtom.TaskSwitcherContainer;
|
||||
import com.android.launcher3.model.ModelWriter;
|
||||
import com.android.launcher3.util.ContentWriter;
|
||||
|
||||
import java.util.Optional;
|
||||
@@ -405,7 +406,10 @@ public class ItemInfo {
|
||||
return itemInfo;
|
||||
}
|
||||
|
||||
public void setTitle(CharSequence title) {
|
||||
/**
|
||||
* Sets the title of the item and writes to DB model if needed.
|
||||
*/
|
||||
public void setTitle(CharSequence title, ModelWriter modelWriter) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user