summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Martinz <amartinz@shiftphones.com>2018-07-04 16:43:04 (GMT)
committerJoey Rizzoli <joey@lineageos.org>2018-07-14 13:32:29 (GMT)
commit03596d9d21d4c1287966cdc4f950e44cd2869113 (patch)
tree34079e08c4e8aa18d0967efedb4717d9eea65ffd
parentc64d89382da590b15c15e5ee081a2ff044c321fa (diff)
downloadandroid_packages_apps_Trebuchet-03596d9d21d4c1287966cdc4f950e44cd2869113.zip
android_packages_apps_Trebuchet-03596d9d21d4c1287966cdc4f950e44cd2869113.tar.gz
android_packages_apps_Trebuchet-03596d9d21d4c1287966cdc4f950e44cd2869113.tar.bz2
logging: prevent NPE at logDeepShortcutsOpen
getLaunchProviderRecursive(View) can return null. Check if provider is null before using it. Change-Id: I8cd157ba315e1dcc1fed428e0474b55b774bbd2f Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
-rw-r--r--src/com/android/launcher3/logging/UserEventDispatcher.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java
index d5c6515..21fce97 100644
--- a/src/com/android/launcher3/logging/UserEventDispatcher.java
+++ b/src/com/android/launcher3/logging/UserEventDispatcher.java
@@ -246,7 +246,7 @@ public class UserEventDispatcher {
public void logDeepShortcutsOpen(View icon) {
LogContainerProvider provider = getLaunchProviderRecursive(icon);
- if (icon == null || !(icon.getTag() instanceof ItemInfo)) {
+ if (icon == null || !(icon.getTag() instanceof ItemInfo) || provider == null) {
return;
}
ItemInfo info = (ItemInfo) icon.getTag();