From b8b48733a994fbaf7346170d7fba01da2d31f5d4 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Wed, 26 Apr 2017 10:47:37 -0700 Subject: [PATCH] Remove background scrim when there are no top insets. ie. In portrait multiwindow mode, the launcher is always on the bottom so we can remove the background scrim that is meant to protect the status bar contents. Bug: 36397512 Change-Id: Ie9655b0604b5bebafdfb4153b370bb655129051c --- src/com/android/launcher3/dragndrop/DragLayer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java index 14f4e6cb63..7178c5e8d8 100644 --- a/src/com/android/launcher3/dragndrop/DragLayer.java +++ b/src/com/android/launcher3/dragndrop/DragLayer.java @@ -448,6 +448,12 @@ public class DragLayer extends InsettableFrameLayout { return isContainerOpen || mDragController.dispatchUnhandledMove(focused, direction); } + @Override + public void setInsets(Rect insets) { + super.setInsets(insets); + setBackgroundResource(insets.top == 0 ? 0 : R.drawable.workspace_bg); + } + @Override public LayoutParams generateLayoutParams(AttributeSet attrs) { return new LayoutParams(getContext(), attrs);