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

Commit d6ed970c authored by Jason Monk's avatar Jason Monk
Browse files

resolve merge conflicts of 4481b51 to master

Change-Id: I97489764bfe30507120b65e5e996aa4409435488
parents 074aec74 4481b516
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ public class QSDetail extends LinearLayout {
    private boolean mTriggeredExpand;
    private int mOpenX;
    private int mOpenY;
    private boolean mAnimating;
    private boolean mSwitchState;

    public QSDetail(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
@@ -212,6 +214,7 @@ public class QSDetail extends LinearLayout {

    protected void animateDetailVisibleDiff(int x, int y, boolean visibleDiff, AnimatorListener listener) {
        if (visibleDiff) {
            mAnimating = true;
            if (mFullyExpanded || mDetailAdapter != null) {
                setAlpha(1);
                mClipper.animateCircularClip(x, y, mDetailAdapter != null, listener);
@@ -243,7 +246,7 @@ public class QSDetail extends LinearLayout {
            mQsDetailHeader.setClickable(false);
        } else {
            mQsDetailHeaderSwitch.setVisibility(VISIBLE);
            mQsDetailHeaderSwitch.setChecked(toggleState);
            handleToggleStateChanged(toggleState);
            mQsDetailHeader.setClickable(true);
            mQsDetailHeader.setOnClickListener(new OnClickListener() {
                @Override
@@ -257,6 +260,10 @@ public class QSDetail extends LinearLayout {
    }

    private void handleToggleStateChanged(boolean state) {
        mSwitchState = state;
        if (mAnimating) {
            return;
        }
        mQsDetailHeaderSwitch.setChecked(state);
    }

@@ -273,6 +280,10 @@ public class QSDetail extends LinearLayout {
        }
    }

    private void checkPendingAnimations() {
        handleToggleStateChanged(mSwitchState);
    }

    protected QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() {
        @Override
        public void onToggleStateChanged(final boolean state) {
@@ -310,6 +321,8 @@ public class QSDetail extends LinearLayout {
            // If we have been cancelled, remove the listener so that onAnimationEnd doesn't get
            // called, this will avoid accidentally turning off the grid when we don't want to.
            animation.removeListener(this);
            mAnimating = false;
            checkPendingAnimations();
        };

        @Override
@@ -319,6 +332,8 @@ public class QSDetail extends LinearLayout {
                mQsPanel.setGridContentVisibility(false);
                mHeader.setVisibility(View.INVISIBLE);
            }
            mAnimating = false;
            checkPendingAnimations();
        }
    };

+1 −1
Original line number Diff line number Diff line
@@ -90,11 +90,11 @@ public class BluetoothTile extends QSTile<QSTile.BooleanState> {
            mHost.startActivityDismissingKeyguard(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));
            return;
        }
        showDetail(true);
        if (!mState.value) {
            mState.value = true;
            mController.setBluetoothEnabled(true);
        }
        showDetail(true);
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -122,9 +122,9 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
        if (mState.value) {
            mController.setZen(Global.ZEN_MODE_OFF, null, TAG);
        } else {
            showDetail(true);
            int zen = Prefs.getInt(mContext, Prefs.Key.DND_FAVORITE_ZEN, Global.ZEN_MODE_ALARMS);
            mController.setZen(zen, null, TAG);
            showDetail(true);
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -116,11 +116,11 @@ public class WifiTile extends QSTile<QSTile.SignalState> {
            mHost.startActivityDismissingKeyguard(new Intent(Settings.ACTION_WIFI_SETTINGS));
            return;
        }
        showDetail(true);
        if (!mState.value) {
            mController.setWifiEnabled(true);
            mState.value = true;
        }
        showDetail(true);
    }

    @Override