Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b23612c2 authored by Brandon Dayauon's avatar Brandon Dayauon Committed by Android (Google) Code Review
Browse files

Merge "Null check activityContext because the activityContext can be null when...

Merge "Null check activityContext because the activityContext can be null when called from SearchDelegateView." into main
parents e3a60337 e9c7f419
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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;