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

Commit 30c305ce authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Implement nice motion for collapsing panel while QS open

Also remove the delay for actions which close the panel. Delaying is
no longer necessary as you still see the touch feedback when the
panel is closed.

Change-Id: I0dffae6998fc41b1590cb182667323f40be3a7d5
parent ea9bdd7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -90,8 +90,9 @@
                    android:layout_marginRight="@dimen/notification_side_padding"/>

                <!-- A view to reserve space for the collapsed stack -->
                <!-- Layout height: notification_min_height + bottom_stack_peek_amount -->
                <View
                    android:layout_height="@dimen/collapsed_stack_height"
                    android:layout_height="76dp"
                    android:layout_width="match_parent"/>
            </LinearLayout>
        </com.android.systemui.statusbar.phone.ObservableScrollView>
+0 −3
Original line number Diff line number Diff line
@@ -248,9 +248,6 @@
    <!-- The height of the speed bump view. -->
    <dimen name="speed_bump_height">16dp</dimen>

    <!-- The total height of the stack in its collapsed size (i.e. when quick settings is open) -->
    <dimen name="collapsed_stack_height">94dp</dimen>

    <!-- Width of the zen mode interstitial dialog. -->
    <dimen name="zen_mode_dialog_width">320dp</dimen>

+0 −7
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

import com.android.systemui.R;
import com.android.systemui.qs.QSTile.State;
import com.android.systemui.statusbar.policy.BluetoothController;
import com.android.systemui.statusbar.policy.CastController;
@@ -57,7 +56,6 @@ public abstract class QSTile<TState extends State> implements Listenable {
    protected final Context mContext;
    protected final H mHandler;
    protected final Handler mUiHandler = new Handler(Looper.getMainLooper());
    private final int mFeedbackStartDelay;

    private Callback mCallback;
    protected final TState mState = newTileState();
@@ -71,7 +69,6 @@ public abstract class QSTile<TState extends State> implements Listenable {
        mHost = host;
        mContext = host.getContext();
        mHandler = new H(host.getLooper());
        mFeedbackStartDelay = mContext.getResources().getInteger(R.integer.feedback_start_delay);
    }

    public boolean supportsDualTargets() {
@@ -120,10 +117,6 @@ public abstract class QSTile<TState extends State> implements Listenable {
        mHandler.obtainMessage(H.USER_SWITCH, newUserId).sendToTarget();
    }

    protected void postAfterFeedback(Runnable runnable) {
        mHandler.postDelayed(runnable, mFeedbackStartDelay);
    }

    // call only on tile worker looper

    private void handleSetCallback(Callback callback) {
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ public class BugreportTile extends QSTile<QSTile.State> {

    @Override
    protected void handleClick() {
        postAfterFeedback(new Runnable() {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mHost.collapsePanels();
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ public class CastTile extends QSTile<QSTile.BooleanState> {

    @Override
    protected void handleClick() {
        postAfterFeedback(new Runnable() {
        mHandler.post(new Runnable() {
            public void run() {
                mHost.collapsePanels();
                mUiHandler.post(mShowDialog);
Loading