diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2017-06-26 15:59:54 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2017-06-29 13:16:52 -0700 |
commit | e8ca28179b5a1a1114c13d04d57e5fb2800c8b55 (patch) | |
tree | 6a61044fe9479c61e011dfe8f969cdee4ed945e7 /src/com/android/launcher3/logging | |
parent | 69c340a05e846b4b1b2d457164fd313e249df353 (diff) | |
download | android_packages_apps_Trebuchet-e8ca28179b5a1a1114c13d04d57e5fb2800c8b55.tar.gz android_packages_apps_Trebuchet-e8ca28179b5a1a1114c13d04d57e5fb2800c8b55.tar.bz2 android_packages_apps_Trebuchet-e8ca28179b5a1a1114c13d04d57e5fb2800c8b55.zip |
Salt the package hash code using the device serial
Bug: 62676166
Change-Id: Id723cc3f283bc05b01185abef9084d6dbd75fbbc
Diffstat (limited to 'src/com/android/launcher3/logging')
-rw-r--r-- | src/com/android/launcher3/logging/UserEventDispatcher.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java index edbb88c93..32cf9d42c 100644 --- a/src/com/android/launcher3/logging/UserEventDispatcher.java +++ b/src/com/android/launcher3/logging/UserEventDispatcher.java @@ -20,6 +20,7 @@ import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.os.SystemClock; import android.support.annotation.Nullable; import android.util.Log; @@ -131,14 +132,20 @@ public class UserEventDispatcher { LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.TAP), newItemTarget(v), newTarget(Target.Type.CONTAINER)); + String serial; + if (Utilities.isAtLeastO()) { + serial = Build.getSerial(); + } else { + serial = Build.SERIAL; + } // TODO: make idx percolate up the view hierarchy if needed. int idx = 0; if (fillInLogContainerData(event, v)) { ItemInfo itemInfo = (ItemInfo) v.getTag(); event.srcTarget[idx].intentHash = intentHashCode; if (cn != null) { - event.srcTarget[idx].packageNameHash = cn.getPackageName().hashCode(); - event.srcTarget[idx].componentHash = cn.hashCode(); + event.srcTarget[idx].packageNameHash = (cn.getPackageName() + serial).hashCode(); + event.srcTarget[idx].componentHash = (cn.flattenToString() + serial).hashCode(); if (mPredictedApps != null) { event.srcTarget[idx].predictedRank = mPredictedApps.indexOf( new ComponentKey(cn, itemInfo.user)); |