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

Commit b0afb25e authored by kwaky's avatar kwaky Committed by android-build-merger
Browse files

DO NOT MERGE Adjust NotificationView bottom margin based on whether Keyboard is shown.

am: 6073f3c5

Change-Id: I2061e27b7aafd294f5cc5e8e14535bd1e3860c5c
parents 62dd5d67 6073f3c5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@
    android:id="@+id/notification_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/notification_shade_background_color">
    android:background="@color/notification_shade_background_color"
    android:visibility="invisible">

    <View
        android:id="@+id/glass_pane"
+8 −0
Original line number Diff line number Diff line
@@ -1092,6 +1092,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
        }

        mNavigationBarWindow.setVisibility(isKeyboardVisible ? View.GONE : View.VISIBLE);
        setNotificationViewBottomMargin(isKeyboardVisible ? 0 : mNavigationBarWindow.getHeight());
        mBottomNavBarVisible = !isKeyboardVisible;
    }

@@ -1155,6 +1156,13 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
        addTemperatureViewToController(mRightNavigationBarView);
    }

    private void setNotificationViewBottomMargin(int bottomMargin) {
        ViewGroup.MarginLayoutParams params =
                (ViewGroup.MarginLayoutParams) mNotificationView.getLayoutParams();
        params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
        mNotificationView.setLayoutParams(params);
    }

    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        //When executing dump() function simultaneously, we need to serialize them