summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2017-09-28 23:17:33 (GMT)
committerHyunyoung Song <hyunyoungs@google.com>2017-09-29 20:41:43 (GMT)
commit7a77f1e678f0a2125c208aeab09376494d4dd031 (patch)
treea145b5ad8a1533682134d1959e23bc45c6f42b19
parentd772c0aece9a1d4239ec81c59007a41c0a5b5bb8 (diff)
downloadandroid_packages_apps_Trebuchet-7a77f1e678f0a2125c208aeab09376494d4dd031.zip
android_packages_apps_Trebuchet-7a77f1e678f0a2125c208aeab09376494d4dd031.tar.gz
android_packages_apps_Trebuchet-7a77f1e678f0a2125c208aeab09376494d4dd031.tar.bz2
Fix predictiveApps
Bug: 67010327 Change-Id: Iab6ea790e99bb66bd0d7d4f07a8ad9fa05387d13
-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;