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

Commit ecded08d authored by Brian Isganitis's avatar Brian Isganitis
Browse files

Dispatch insets from overlay drag layer.

This simplifies insets handling for All Apps and EDU, and also fixes
some edge cases with All Apps popup menus. KeyboardQuickSwitchView now
needs to ignore insets since it has a hardcoded top margin,
keyboard_quick_switch_margin_top.

Fix: 276804708
Test: All Apps, EDU, and Quick Switch all have proper insets handling.
Change-Id: I93237a057b4f9ae62f71a70c59a58f3c8401c102
parent d5d4880d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@
    android:clipToOutline="true"
    android:alpha="0"
    android:visibility="invisible"
    android:focusableInTouchMode="true">
    android:focusableInTouchMode="true"
    app:layout_ignoreInsets="true">

    <HorizontalScrollView
        android:id="@+id/scroll_view"
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
    android:layout_marginBottom="16dp"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:fitsSystemWindows="true"
    android:focusable="true"
    android:importantForAccessibility="yes"
    android:gravity="center"
+0 −7
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.launcher3.taskbar.allapps;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.WindowInsets;

import com.android.launcher3.R;
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
@@ -36,12 +35,6 @@ public class TaskbarAllAppsContainerView extends
        super(context, attrs, defStyleAttr);
    }

    @Override
    public WindowInsets onApplyWindowInsets(WindowInsets insets) {
        setInsets(insets.getInsets(WindowInsets.Type.systemBars()).toRect());
        return super.onApplyWindowInsets(insets);
    }

    @Override
    protected View inflateSearchBox() {
        // Remove top padding of header, since we do not have any search
+3 −1
Original line number Diff line number Diff line
@@ -120,7 +120,9 @@ public class TaskbarOverlayDragLayer extends

    @Override
    public WindowInsets onApplyWindowInsets(WindowInsets insets) {
        return updateInsetsDueToStashing(insets);
        insets = updateInsetsDueToStashing(insets);
        setInsets(insets.getInsets(WindowInsets.Type.systemBars()).toRect());
        return insets;
    }

    @Override