diff options
author | Alexander Martinz <amartinz@shiftphones.com> | 2018-07-04 18:43:04 +0200 |
---|---|---|
committer | Joey Rizzoli <joey@lineageos.org> | 2018-07-14 15:32:29 +0200 |
commit | 03596d9d21d4c1287966cdc4f950e44cd2869113 (patch) | |
tree | 34079e08c4e8aa18d0967efedb4717d9eea65ffd | |
parent | c64d89382da590b15c15e5ee081a2ff044c321fa (diff) | |
download | android_packages_apps_Trebuchet-03596d9d21d4c1287966cdc4f950e44cd2869113.tar.gz android_packages_apps_Trebuchet-03596d9d21d4c1287966cdc4f950e44cd2869113.tar.bz2 android_packages_apps_Trebuchet-03596d9d21d4c1287966cdc4f950e44cd2869113.zip |
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.java | 2 |
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 d5c6515c0..21fce97a5 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(); |