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

Commit 8e01ddd9 authored by vadimt's avatar vadimt Committed by Vadim Tryshev
Browse files

Patching null dereference in AbstractFloatingView.getOpenView()

If there is a better solution, bug assignee, please proceed with it.

I'll land this immediately, as a lot of tests are broken.

Bug: 130739123
Change-Id: Iacdb9adbbf41f1f9de1390c3e7525ee0bd7beda6
(cherry picked from commit 5a22ef7e)
parent 917af755
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -182,6 +182,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
    protected static <T extends AbstractFloatingView> T getOpenView(
    protected static <T extends AbstractFloatingView> T getOpenView(
            ActivityContext activity, @FloatingViewType int type) {
            ActivityContext activity, @FloatingViewType int type) {
        BaseDragLayer dragLayer = activity.getDragLayer();
        BaseDragLayer dragLayer = activity.getDragLayer();
        if (dragLayer == null) return null;
        // Iterate in reverse order. AbstractFloatingView is added later to the dragLayer,
        // Iterate in reverse order. AbstractFloatingView is added later to the dragLayer,
        // and will be one of the last views.
        // and will be one of the last views.
        for (int i = dragLayer.getChildCount() - 1; i >= 0; i--) {
        for (int i = dragLayer.getChildCount() - 1; i >= 0; i--) {