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

Commit 0b084188 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ambient Indication: Add supporting infrastructure"

parents 523b8eb0 75fa9648
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2017 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!-- empty stub -->
<merge />
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@
            android:layout_gravity="@integer/notification_panel_layout_gravity"
            android:layout_marginBottom="@dimen/close_handle_underlap" />

        <include layout="@layout/ambient_indication" />

        <ViewStub
            android:id="@+id/keyguard_user_switcher"
            android:layout="@layout/keyguard_user_switcher"
+9 −1
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ public class NotificationPanelView extends PanelView implements
    private NotificationGroupManager mGroupManager;
    private boolean mShowIconsWhenExpanded;
    private int mIndicationBottomPadding;
    private int mAmbientIndicationBottomPadding;
    private boolean mIsFullWidth;
    private boolean mDark;
    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
@@ -425,7 +426,7 @@ public class NotificationPanelView extends PanelView implements
        float shelfSize = shelf.getVisibility() == GONE ? 0
                : shelf.getIntrinsicHeight() + notificationPadding;
        float availableSpace = mNotificationStackScroller.getHeight() - minPadding - shelfSize
                - mIndicationBottomPadding;
                - Math.max(mIndicationBottomPadding, mAmbientIndicationBottomPadding);
        int count = 0;
        for (int i = 0; i < mNotificationStackScroller.getChildCount(); i++) {
            ExpandableView child = (ExpandableView) mNotificationStackScroller.getChildAt(i);
@@ -2476,4 +2477,11 @@ public class NotificationPanelView extends PanelView implements
    public void setPulsing(boolean pulsing) {
        mKeyguardStatusView.setPulsing(pulsing);
    }

    public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) {
        if (mAmbientIndicationBottomPadding != ambientIndicationBottomPadding) {
            mAmbientIndicationBottomPadding = ambientIndicationBottomPadding;
            mStatusBar.updateKeyguardMaxNotifications();
        }
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -6138,6 +6138,10 @@ public class StatusBar extends SystemUI implements DemoMode,
     * Called when the notification panel layouts
     */
    public void onPanelLaidOut() {
        updateKeyguardMaxNotifications();
    }

    public void updateKeyguardMaxNotifications() {
        if (mState == StatusBarState.KEYGUARD) {
            // Since the number of notifications is determined based on the height of the view, we
            // need to update them.
@@ -6893,6 +6897,10 @@ public class StatusBar extends SystemUI implements DemoMode,
        }
    }

    public NotificationPanelView getPanel() {
        return mNotificationPanel;
    }

    @Override
    public void startAssist(Bundle args) {
        if (mAssistManager != null) {