Merge "Null check activityContext because the activityContext can be null when called from SearchDelegateView." into main
This commit is contained in:
commit
b23612c2c0
1 file changed
+6
-2
@@ -166,12 +166,16 @@ public class OptionsPopupView<T extends Context & ActivityContext> extends Arrow
|
||||
return show(activityContext, targetRect, items, shouldAddArrow, 0 /* width */);
|
||||
}
|
||||
|
||||
public static <T extends Context & ActivityContext> OptionsPopupView<T> show(
|
||||
ActivityContext activityContext,
|
||||
@Nullable
|
||||
private static <T extends Context & ActivityContext> OptionsPopupView<T> show(
|
||||
@Nullable ActivityContext activityContext,
|
||||
RectF targetRect,
|
||||
List<OptionItem> items,
|
||||
boolean shouldAddArrow,
|
||||
int width) {
|
||||
if (activityContext == null) {
|
||||
return null;
|
||||
}
|
||||
OptionsPopupView<T> popup = (OptionsPopupView<T>) activityContext.getLayoutInflater()
|
||||
.inflate(R.layout.longpress_options_menu, activityContext.getDragLayer(), false);
|
||||
popup.mTargetRect = targetRect;
|
||||
|
||||
Reference in new issue
Block a user