Loading packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +1 −1 Original line number Diff line number Diff line Loading @@ -268,7 +268,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } @Override public void setExpansion(float expansion) { public void setExpansion(float expansion, float proposedTranslation) { mLastExpansion = expansion; updateSelected(); } Loading packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +7 −5 Original line number Diff line number Diff line Loading @@ -498,11 +498,13 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca : headerTranslation); } int currentHeight = getView().getHeight(); mLastHeaderTranslation = headerTranslation; if (expansion == mLastQSExpansion && mLastKeyguardAndExpanded == onKeyguardAndExpanded && mLastViewHeight == currentHeight) { if (expansion == mLastQSExpansion && mLastKeyguardAndExpanded == onKeyguardAndExpanded && mLastViewHeight == currentHeight && mLastHeaderTranslation == headerTranslation) { return; } mLastHeaderTranslation = headerTranslation; mLastQSExpansion = expansion; mLastKeyguardAndExpanded = onKeyguardAndExpanded; mLastViewHeight = currentHeight; Loading @@ -522,8 +524,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca } mFooter.setExpansion(onKeyguardAndExpanded ? 1 : expansion); mQSPanelController.setRevealExpansion(expansion); mQSPanelController.getTileLayout().setExpansion(expansion); mQuickQSPanelController.getTileLayout().setExpansion(expansion); mQSPanelController.getTileLayout().setExpansion(expansion, proposedTranslation); mQuickQSPanelController.getTileLayout().setExpansion(expansion, proposedTranslation); mQSPanelScrollView.setTranslationY(translationScaleY * heightDiff); if (fullyCollapsed) { mQSPanelScrollView.setScrollY(0); Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +6 −3 Original line number Diff line number Diff line Loading @@ -742,7 +742,7 @@ public class QSPanel extends LinearLayout implements Tunable { void setListening(boolean listening, UiEventLogger uiEventLogger); /** * Set the minimum number of rows to show * Sets the minimum number of rows to show * * @param minRows the minimum. */ Loading @@ -751,7 +751,7 @@ public class QSPanel extends LinearLayout implements Tunable { } /** * Set the max number of columns to show * Sets the max number of columns to show * * @param maxColumns the maximum * Loading @@ -761,7 +761,10 @@ public class QSPanel extends LinearLayout implements Tunable { return false; } default void setExpansion(float expansion) {} /** * Sets the expansion value and proposedTranslation to panel. */ default void setExpansion(float expansion, float proposedTranslation) {} int getNumVisibleTiles(); } Loading packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +26 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,8 @@ public class QuickQSPanel extends QSPanel { static class QQSSideLabelTileLayout extends SideLabelTileLayout { private boolean mLastSelected; QQSSideLabelTileLayout(Context context) { super(context, null); setClipChildren(false); Loading Loading @@ -222,5 +224,29 @@ public class QuickQSPanel extends QSPanel { } } } @Override public void setExpansion(float expansion, float proposedTranslation) { if (expansion > 0f && expansion < 1f) { return; } // The cases we must set select for marquee when QQS/QS collapsed, and QS full expanded. // Expansion == 0f is when QQS is fully showing (as opposed to 1f, which is QS). At this // point we want them to be selected so the tiles will marquee (but not at other points // of expansion. boolean selected = (expansion == 1f || proposedTranslation < 0f); if (mLastSelected == selected) { return; } // We set it as not important while we change this, so setting each tile as selected // will not cause them to announce themselves until the user has actually selected the // item. setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); for (int i = 0; i < getChildCount(); i++) { getChildAt(i).setSelected(selected); } setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); mLastSelected = selected; } } } packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +0 −3 Original line number Diff line number Diff line Loading @@ -195,9 +195,6 @@ open class QSTileViewImpl @JvmOverloads constructor( // sibling methods to have special behavior for labelContainer. labelContainer.forceUnspecifiedMeasure = true secondaryLabel.alpha = 0f // Do not marque in QQS label.ellipsize = TextUtils.TruncateAt.END secondaryLabel.ellipsize = TextUtils.TruncateAt.END } setLabelColor(getLabelColorForState(QSTile.State.DEFAULT_STATE)) setSecondaryLabelColor(getSecondaryLabelColorForState(QSTile.State.DEFAULT_STATE)) Loading Loading
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +1 −1 Original line number Diff line number Diff line Loading @@ -268,7 +268,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } @Override public void setExpansion(float expansion) { public void setExpansion(float expansion, float proposedTranslation) { mLastExpansion = expansion; updateSelected(); } Loading
packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +7 −5 Original line number Diff line number Diff line Loading @@ -498,11 +498,13 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca : headerTranslation); } int currentHeight = getView().getHeight(); mLastHeaderTranslation = headerTranslation; if (expansion == mLastQSExpansion && mLastKeyguardAndExpanded == onKeyguardAndExpanded && mLastViewHeight == currentHeight) { if (expansion == mLastQSExpansion && mLastKeyguardAndExpanded == onKeyguardAndExpanded && mLastViewHeight == currentHeight && mLastHeaderTranslation == headerTranslation) { return; } mLastHeaderTranslation = headerTranslation; mLastQSExpansion = expansion; mLastKeyguardAndExpanded = onKeyguardAndExpanded; mLastViewHeight = currentHeight; Loading @@ -522,8 +524,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca } mFooter.setExpansion(onKeyguardAndExpanded ? 1 : expansion); mQSPanelController.setRevealExpansion(expansion); mQSPanelController.getTileLayout().setExpansion(expansion); mQuickQSPanelController.getTileLayout().setExpansion(expansion); mQSPanelController.getTileLayout().setExpansion(expansion, proposedTranslation); mQuickQSPanelController.getTileLayout().setExpansion(expansion, proposedTranslation); mQSPanelScrollView.setTranslationY(translationScaleY * heightDiff); if (fullyCollapsed) { mQSPanelScrollView.setScrollY(0); Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +6 −3 Original line number Diff line number Diff line Loading @@ -742,7 +742,7 @@ public class QSPanel extends LinearLayout implements Tunable { void setListening(boolean listening, UiEventLogger uiEventLogger); /** * Set the minimum number of rows to show * Sets the minimum number of rows to show * * @param minRows the minimum. */ Loading @@ -751,7 +751,7 @@ public class QSPanel extends LinearLayout implements Tunable { } /** * Set the max number of columns to show * Sets the max number of columns to show * * @param maxColumns the maximum * Loading @@ -761,7 +761,10 @@ public class QSPanel extends LinearLayout implements Tunable { return false; } default void setExpansion(float expansion) {} /** * Sets the expansion value and proposedTranslation to panel. */ default void setExpansion(float expansion, float proposedTranslation) {} int getNumVisibleTiles(); } Loading
packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +26 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,8 @@ public class QuickQSPanel extends QSPanel { static class QQSSideLabelTileLayout extends SideLabelTileLayout { private boolean mLastSelected; QQSSideLabelTileLayout(Context context) { super(context, null); setClipChildren(false); Loading Loading @@ -222,5 +224,29 @@ public class QuickQSPanel extends QSPanel { } } } @Override public void setExpansion(float expansion, float proposedTranslation) { if (expansion > 0f && expansion < 1f) { return; } // The cases we must set select for marquee when QQS/QS collapsed, and QS full expanded. // Expansion == 0f is when QQS is fully showing (as opposed to 1f, which is QS). At this // point we want them to be selected so the tiles will marquee (but not at other points // of expansion. boolean selected = (expansion == 1f || proposedTranslation < 0f); if (mLastSelected == selected) { return; } // We set it as not important while we change this, so setting each tile as selected // will not cause them to announce themselves until the user has actually selected the // item. setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); for (int i = 0; i < getChildCount(); i++) { getChildAt(i).setSelected(selected); } setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); mLastSelected = selected; } } }
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +0 −3 Original line number Diff line number Diff line Loading @@ -195,9 +195,6 @@ open class QSTileViewImpl @JvmOverloads constructor( // sibling methods to have special behavior for labelContainer. labelContainer.forceUnspecifiedMeasure = true secondaryLabel.alpha = 0f // Do not marque in QQS label.ellipsize = TextUtils.TruncateAt.END secondaryLabel.ellipsize = TextUtils.TruncateAt.END } setLabelColor(getLabelColorForState(QSTile.State.DEFAULT_STATE)) setSecondaryLabelColor(getSecondaryLabelColorForState(QSTile.State.DEFAULT_STATE)) Loading