summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-09-29 20:49:18 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-09-29 20:49:18 (GMT)
commit230cf17fe6de48f1720724a272c653dcfc05a056 (patch)
tree983c8948a88e21f9d2de0c7352a8f1e26efb8e79
parent88312523993a5984bfdcf1cb1841f4a577921c24 (diff)
parent7a77f1e678f0a2125c208aeab09376494d4dd031 (diff)
downloadandroid_packages_apps_Trebuchet-230cf17fe6de48f1720724a272c653dcfc05a056.zip
android_packages_apps_Trebuchet-230cf17fe6de48f1720724a272c653dcfc05a056.tar.gz
android_packages_apps_Trebuchet-230cf17fe6de48f1720724a272c653dcfc05a056.tar.bz2
Merge "Fix predictiveApps Bug: 67010327" into ub-launcher3-dorval-polish2
-rw-r--r--src/com/android/launcher3/logging/LoggerUtils.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/logging/LoggerUtils.java b/src/com/android/launcher3/logging/LoggerUtils.java
index ebb69c4..81333b1 100644
--- a/src/com/android/launcher3/logging/LoggerUtils.java
+++ b/src/com/android/launcher3/logging/LoggerUtils.java
@@ -105,13 +105,13 @@ public class LoggerUtils {
private static String getItemStr(Target t) {
String typeStr = getFieldName(t.itemType, ItemType.class);
if (t.packageNameHash != 0) {
- typeStr += ", packageHash=" + t.packageNameHash;
+ typeStr += ", packageHash=" + t.packageNameHash + ", predictiveRank=" + t.predictedRank;
}
if (t.componentHash != 0) {
- typeStr += ", componentHash=" + t.componentHash;
+ typeStr += ", componentHash=" + t.componentHash + ", predictiveRank=" + t.predictedRank;
}
if (t.intentHash != 0) {
- typeStr += ", intentHash=" + t.intentHash;
+ typeStr += ", intentHash=" + t.intentHash + ", predictiveRank=" + t.predictedRank;
}
return typeStr + ", grid(" + t.gridX + "," + t.gridY + "), span(" + t.spanX + "," + t.spanY
+ "), pageIdx=" + t.pageIndex;
@@ -125,9 +125,11 @@ public class LoggerUtils {
public static Target newItemTarget(ItemInfo info) {
Target t = newTarget(Target.Type.ITEM);
+
switch (info.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
t.itemType = ItemType.APP_ICON;
+ t.predictedRank = -100; // Never assigned
break;
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
t.itemType = ItemType.SHORTCUT;