mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
Adding item rank when parsing a folder
Bug: 22059402 Change-Id: Ie57f2dd58d2b4bc2eb277f10e93a25d026d1cdd2
This commit is contained in:
@@ -580,6 +580,7 @@ public class AutoInstallsLayout {
|
||||
|
||||
int type;
|
||||
int folderDepth = parser.getDepth();
|
||||
int rank = 0;
|
||||
while ((type = parser.next()) != XmlPullParser.END_TAG ||
|
||||
parser.getDepth() > folderDepth) {
|
||||
if (type != XmlPullParser.START_TAG) {
|
||||
@@ -587,12 +588,14 @@ public class AutoInstallsLayout {
|
||||
}
|
||||
mValues.clear();
|
||||
mValues.put(Favorites.CONTAINER, folderId);
|
||||
mValues.put(Favorites.RANK, rank);
|
||||
|
||||
TagParser tagParser = mFolderElements.get(parser.getName());
|
||||
if (tagParser != null) {
|
||||
final long id = tagParser.parseAndAdd(parser);
|
||||
if (id >= 0) {
|
||||
folderItems.add(id);
|
||||
rank++;
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("Invalid folder item " + parser.getName());
|
||||
|
||||
Reference in New Issue
Block a user