Merge "Return null from compat when resolveActivity returns null." into ub-now-nova
diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
index c933712..21f2659 100644
--- a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
+++ b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
@@ -110,8 +110,13 @@
}
public LauncherActivityInfoCompat resolveActivity(Intent intent, UserHandleCompat user) {
- return new LauncherActivityInfoCompatVL(ReflectUtils.invokeMethod(mLauncherApps,
- mResolveActivity, intent, user.getUser()));
+ Object activity = ReflectUtils.invokeMethod(mLauncherApps, mResolveActivity,
+ intent, user.getUser());
+ if (activity != null) {
+ return new LauncherActivityInfoCompatVL(activity);
+ } else {
+ return null;
+ }
}
public void startActivityForProfile(ComponentName component, Rect sourceBounds,