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

Commit b0652816 authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

Merge "Increase communal view size."

parents ecd54e97 07d599e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,5 +22,9 @@
    android:id="@+id/communal_host"
    android:orientation="vertical"
    systemui:layout_constraintEnd_toEndOf="parent"
    systemui:layout_constraintStart_toStartOf="parent"
    systemui:layout_constraintTop_toTopOf="parent"
    systemui:layout_constraintBottom_toBottomOf="parent"
    systemui:layout_constraintHeight_percent="@dimen/communal_source_height_percentage"
    android:layout_width="0dp"
    android:layout_height="0dp"/>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -1622,4 +1622,7 @@
    <dimen name="settingslib_switch_track_height">24dp</dimen>
    <!-- Radius of switch track -->
    <dimen name="settingslib_switch_track_radius">31dp</dimen>

    <!-- Height percentage of the parent container occupied by the communal view -->
    <item name="communal_source_height_percentage" format="float" type="dimen">0.80</item>
</resources>
+0 −12
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@ import android.view.ViewGroup;

import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.PropertyAnimator;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -192,14 +190,4 @@ public class CommunalHostViewController extends ViewController<CommunalHostView>
        mLastSource = source;
        showSource();
    }

    /**
     * Sets the Y position of the {@link CommunalHostView}
     *
     * @param y       Offset from parent top.
     * @param animate Whether the change should be animated.
     */
    public void updatePositionY(int y, boolean animate) {
        PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, ANIMATION_PROPERTIES, animate);
    }
}
+0 −19
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.systemui.statusbar.phone;

import static android.view.View.GONE;

import static androidx.constraintlayout.widget.ConstraintSet.BOTTOM;
import static androidx.constraintlayout.widget.ConstraintSet.END;
import static androidx.constraintlayout.widget.ConstraintSet.PARENT_ID;
import static androidx.constraintlayout.widget.ConstraintSet.START;
@@ -1415,10 +1414,6 @@ public class NotificationPanelViewController extends PanelViewController {
        mKeyguardStatusViewController.updatePosition(
                mClockPositionResult.clockX, mClockPositionResult.clockY,
                mClockPositionResult.clockScale, animateClock);
        // CommunalView's height is constrained to KeyguardStatusView. Match Y offset as well.
        if (mCommunalViewController != null) {
            mCommunalViewController.updatePositionY(mClockPositionResult.clockY, animateClock);
        }
        if (mKeyguardQsUserSwitchController != null) {
            mKeyguardQsUserSwitchController.updatePosition(
                    mClockPositionResult.clockX,
@@ -1454,20 +1449,6 @@ public class NotificationPanelViewController extends PanelViewController {
                TransitionManager.beginDelayedTransition(mNotificationContainerParent, transition);
            }

            // By default, the CommunalView is not shown. We set parameters as if it is shown, which
            // are based on it being aligned with the start of the qs edge guide, like the
            // notification stack scroller. These constraints cannot be expressed in the layout as
            // they reference a peer rather than the parent.
            constraintSet.connect(
                    R.id.communal_host, START,
                    R.id.qs_edge_guideline, START);
            constraintSet.connect(
                    R.id.communal_host, TOP,
                    R.id.keyguard_status_view, TOP);
            constraintSet.connect(
                    R.id.communal_host, BOTTOM,
                    R.id.keyguard_status_view, BOTTOM);

            constraintSet.applyTo(mNotificationContainerParent);
        }
    }