Loading packages/SystemUI/src/com/android/systemui/qs/QSDetail.java +5 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); } Loading Loading @@ -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); } Loading Loading @@ -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(); Loading packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class QSFragment extends Fragment implements QS { mFooter = view.findViewById(R.id.qs_footer); mContainer = view.findViewById(id.quick_settings_container); 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. Loading packages/SystemUI/tests/src/com/android/systemui/qs/QSDetailTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -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.support.test.filters.FlakyTest; import android.testing.AndroidTestingRunner; Loading @@ -38,8 +40,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; Loading Loading @@ -67,7 +67,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())) Loading Loading
packages/SystemUI/src/com/android/systemui/qs/QSDetail.java +5 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); } Loading Loading @@ -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); } Loading Loading @@ -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(); Loading
packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class QSFragment extends Fragment implements QS { mFooter = view.findViewById(R.id.qs_footer); mContainer = view.findViewById(id.quick_settings_container); 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. Loading
packages/SystemUI/tests/src/com/android/systemui/qs/QSDetailTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -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.support.test.filters.FlakyTest; import android.testing.AndroidTestingRunner; Loading @@ -38,8 +40,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; Loading Loading @@ -67,7 +67,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())) Loading