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

Commit 2a0b423c authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Fix footer not being hidden in detail panels" into oc-dev

parents d27d5d9e b4ec0b90
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public class QSDetail extends LinearLayout {
    private int mOpenY;
    private boolean mAnimatingOpen;
    private boolean mSwitchState;
    private View mFooter;

    public QSDetail(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
@@ -116,9 +117,10 @@ public class QSDetail extends LinearLayout {
        mDetailDoneButton.setOnClickListener(doneListener);
    }

    public void setQsPanel(QSPanel panel, QuickStatusBarHeader header) {
    public void setQsPanel(QSPanel panel, QuickStatusBarHeader header, View footer) {
        mQsPanel = panel;
        mHeader = header;
        mFooter = footer;
        mHeader.setCallback(mQsPanelCallback);
        mQsPanel.setCallback(mQsPanelCallback);
    }
@@ -214,6 +216,7 @@ public class QSDetail extends LinearLayout {
            mDetailAdapter = null;
            listener = mTeardownDetailWhenDone;
            mHeader.setVisibility(View.VISIBLE);
            mFooter.setVisibility(View.VISIBLE);
            mQsPanel.setGridContentVisibility(true);
            mQsPanelCallback.onScanStateChanged(false);
        }
@@ -345,6 +348,7 @@ public class QSDetail extends LinearLayout {
            if (mDetailAdapter != null) {
                mQsPanel.setGridContentVisibility(false);
                mHeader.setVisibility(View.INVISIBLE);
                mFooter.setVisibility(View.INVISIBLE);
            }
            mAnimatingOpen = false;
            checkPendingAnimations();
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class QSFragment extends Fragment implements QS {
        mContainer = view.findViewById(id.quick_settings_container);
        mGutterHeight = getContext().getResources().getDimensionPixelSize(R.dimen.qs_gutter_height);

        mQSDetail.setQsPanel(mQSPanel, mHeader);
        mQSDetail.setQsPanel(mQSPanel, mHeader, mFooter);

        // If the quick settings row is not shown, then there is no need for the animation from
        // the row to the full QS panel.
+3 −3
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import org.junit.After;
import org.junit.Ignore;
import android.support.test.filters.SmallTest;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
@@ -37,8 +39,6 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.qs.DetailAdapter;

import org.junit.After;
import org.junit.Ignore;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -65,7 +65,7 @@ public class QSDetailTest extends SysuiTestCase {
            mQsDetail = (QSDetail) LayoutInflater.from(mContext).inflate(R.layout.qs_detail, null);
            mQsPanel = mock(QSPanel.class);
            mQuickHeader = mock(QuickStatusBarHeader.class);
            mQsDetail.setQsPanel(mQsPanel, mQuickHeader);
            mQsDetail.setQsPanel(mQsPanel, mQuickHeader, mock(View.class));

            mMockDetailAdapter = mock(DetailAdapter.class);
            when(mMockDetailAdapter.createDetailView(any(), any(), any()))