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

Commit 1e3c4a9e authored by Kyrylo Mikos's avatar Kyrylo Mikos
Browse files

SystemUI: unbreak RecentsPanel with translucent decors.

Change-Id: Ibcc4f5fc11109c0f2c149e66b7531e8c9ea79ae1
parent cc2b05b6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -33,8 +33,7 @@
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:clipToPadding="false"
        android:clipChildren="false"
        android:fitsSystemWindows="true">
        android:clipChildren="false">

        <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
            android:layout_width="wrap_content"
+1 −2
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@
        android:background="@drawable/status_bar_recents_background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:fitsSystemWindows="true">
        android:layout_alignParentBottom="true">

        <com.android.systemui.recent.RecentsVerticalScrollView
            android:id="@+id/recents_container"
+13 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
@@ -882,6 +883,18 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
        mRecentsContainer.drawFadedEdges(canvas, left, right, top, bottom);
    }

    @Override
    protected boolean fitSystemWindows(Rect insets) {
        if (mClearRecents != null) {
            MarginLayoutParams lp = (MarginLayoutParams) mClearRecents.getLayoutParams();
            lp.topMargin = insets.top;
            lp.rightMargin = insets.right;
            mClearRecents.setLayoutParams(lp);
        }

        return super.fitSystemWindows(insets);
    }

    class FakeClearUserDataObserver extends IPackageDataObserver.Stub {
        public void onRemoveCompleted(final String packageName, final boolean succeeded) {
        }