Stripping LiveFolders from Launcher

Change-Id: Ic105fbeb1289e43469d5975b7d977b2fc7900c0b
This commit is contained in:
Adam Cohen committed 2011-04-28 12:28:39 -07:00
1 parent 9e87bd8ee7
commit df2cc41acb
18 files changed
+385 -1270

No files matched your search

+37 -1
View File
@@ -16,12 +16,15 @@
package com.android.launcher2;
import java.util.ArrayList;
import android.content.ContentValues;
/**
* Represents a folder containing shortcuts or apps.
*/
class FolderInfo extends ItemInfo {
/**
* Whether this folder has been opened
*/
@@ -31,4 +34,37 @@ class FolderInfo extends ItemInfo {
* The folder name.
*/
CharSequence title;
/**
* The apps and shortcuts
*/
ArrayList<ShortcutInfo> contents = new ArrayList<ShortcutInfo>();
FolderInfo() {
itemType = LauncherSettings.Favorites.ITEM_TYPE_FOLDER;
}
/**
* Add an app or shortcut
*
* @param item
*/
public void add(ShortcutInfo item) {
contents.add(item);
}
/**
* Remove an app or shortcut. Does not change the DB.
*
* @param item
*/
public void remove(ShortcutInfo item) {
contents.remove(item);
}
@Override
void onAddToDatabase(ContentValues values) {
super.onAddToDatabase(values);
values.put(LauncherSettings.Favorites.TITLE, title.toString());
}
}