Loading packages/SystemUI/res/values/dimens.xml +0 −3 Original line number Diff line number Diff line Loading @@ -196,9 +196,6 @@ <dimen name="qs_dual_tile_height">109dp</dimen> <dimen name="qs_dual_tile_padding">12dp</dimen> <!-- How far the hidden header peeks from the top of the screen when QS is in detail mode. --> <dimen name="qs_header_peek_height">8dp</dimen> <!-- How far the expanded QS panel peeks from the header in collapsed state. --> <dimen name="qs_peek_height">8dp</dimen> Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +4 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public class QSPanel extends ViewGroup { mContext = context; mDetail = new FrameLayout(mContext); mDetail.setBackgroundColor(mContext.getResources().getColor(R.color.system_primary_color)); mDetail.setVisibility(GONE); mDetail.setClickable(true); addView(mDetail); Loading Loading @@ -204,7 +205,7 @@ public class QSPanel extends ViewGroup { mDetail.measure(exactly(width), unspecified()); if (mDetail.getVisibility() == VISIBLE && mDetail.getChildCount() > 0) { final int dmh = mDetail.getMeasuredHeight(); if (dmh > 0) h = dmh; if (dmh > 0) h = Math.max(h, dmh); } setMeasuredDimension(width, h); } Loading @@ -231,7 +232,8 @@ public class QSPanel extends ViewGroup { left + record.tileView.getMeasuredWidth(), top + record.tileView.getMeasuredHeight()); } mDetail.layout(0, 0, mDetail.getMeasuredWidth(), mDetail.getMeasuredHeight()); final int dh = Math.max(mDetail.getMeasuredHeight(), getMeasuredHeight()); mDetail.layout(0, 0, mDetail.getMeasuredWidth(), dh); } private int getRowTop(int row) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −56 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.view.animation.Interpolator; import android.widget.LinearLayout; import com.android.systemui.R; import com.android.systemui.qs.QSPanel; import com.android.systemui.statusbar.ExpandableView; import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.GestureRecorder; Loading @@ -54,7 +53,7 @@ public class NotificationPanelView extends PanelView implements PhoneStatusBar mStatusBar; private StatusBarHeaderView mHeader; private View mQsContainer; private QSPanel mQsPanel; private View mQsPanel; private View mKeyguardStatusView; private ObservableScrollView mScrollView; private View mStackScrollerContainer; Loading @@ -73,7 +72,6 @@ public class NotificationPanelView extends PanelView implements */ private boolean mIntercepting; private boolean mQsExpanded; private boolean mQsFullyExpanded; private boolean mKeyguardShowing; private float mInitialHeightOnTouch; private float mInitialTouchX; Loading @@ -85,14 +83,13 @@ public class NotificationPanelView extends PanelView implements private int mQsMaxExpansionHeight; private int mMinStackHeight; private int mQsPeekHeight; private int mQsHeaderPeekHeight; private boolean mQsShowingDetail; private float mNotificationTranslation; private int mStackScrollerIntrinsicPadding; private boolean mQsExpansionEnabled = true; private ValueAnimator mQsExpansionAnimator; private FlingAnimationUtils mFlingAnimationUtils; private int mStatusBarMinHeight; private Interpolator mFastOutSlowInInterpolator; private ObjectAnimator mClockAnimator; private int mClockAnimationTarget = -1; Loading Loading @@ -135,8 +132,7 @@ public class NotificationPanelView extends PanelView implements mKeyguardStatusView = findViewById(R.id.keyguard_status_view); mStackScrollerContainer = findViewById(R.id.notification_container_parent); mQsContainer = findViewById(R.id.quick_settings_container); mQsPanel = (QSPanel) findViewById(R.id.quick_settings_panel); mQsPanel.setCallback(mQsPanelCallback); mQsPanel = findViewById(R.id.quick_settings_panel); mScrollView = (ObservableScrollView) findViewById(R.id.scroll_view); mScrollView.setListener(this); mNotificationStackScroller = (NotificationStackScrollLayout) Loading @@ -160,7 +156,6 @@ public class NotificationPanelView extends PanelView implements mStatusBarMinHeight = getResources().getDimensionPixelSize( com.android.internal.R.dimen.status_bar_height); mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height); mQsHeaderPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_header_peek_height); mClockPositionAlgorithm.loadDimens(getResources()); } Loading @@ -172,9 +167,7 @@ public class NotificationPanelView extends PanelView implements mQsMinExpansionHeight = mHeader.getCollapsedHeight() + mQsPeekHeight; mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight(); if (mQsExpanded) { if (mQsFullyExpanded) { setQsStackScrollerPadding(mQsMaxExpansionHeight); } } else { setQsExpansion(mQsMinExpansionHeight); positionClockAndNotifications(); Loading Loading @@ -527,39 +520,10 @@ public class NotificationPanelView extends PanelView implements ? View.INVISIBLE : View.VISIBLE); mScrollView.setTouchEnabled(mQsExpanded); if (mQsShowingDetail) { if (mQsFullyExpanded) { setQsHeaderPeeking(true); } } else { setQsHeaderPeeking(false); } } private void setQsHeaderPeeking(boolean peeking) { final boolean stackIsPeeking = mStackScrollerContainer.getTranslationY() != 0; final boolean headerIsPeeking = mHeader.getTranslationY() != 0; final int ty = mQsHeaderPeekHeight - mHeader.getExpandedHeight(); if (peeking) { if (!headerIsPeeking) { mHeader.animate().translationY(ty); } if (!stackIsPeeking) { mStackScrollerContainer.animate().translationY(ty); } } else { if (headerIsPeeking) { mHeader.animate().translationY(0); } if (stackIsPeeking) { mStackScrollerContainer.animate().translationY(0); } } } private void setQsExpansion(float height) { height = Math.min(Math.max(height, mQsMinExpansionHeight), mQsMaxExpansionHeight); mQsFullyExpanded = height == mQsMaxExpansionHeight; if (height > mQsMinExpansionHeight && !mQsExpanded) { setQsExpanded(true); } else if (height <= mQsMinExpansionHeight && mQsExpanded) { Loading Loading @@ -652,16 +616,10 @@ public class NotificationPanelView extends PanelView implements if (!mQsExpansionEnabled) { return false; } final float ty = mHeader.getTranslationY(); boolean onHeader = x >= mHeader.getLeft() && x <= mHeader.getRight() && y >= mHeader.getTop() + ty && y <= mHeader.getBottom() + ty; && y >= mHeader.getTop() && y <= mHeader.getBottom(); if (mQsExpanded) { if (mQsShowingDetail && onHeader) { // bring back the header, crudely setQsHeaderPeeking(false); mQsPanel.setExpanded(false); } return !mQsShowingDetail && onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0); return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0); } else { return onHeader; } Loading Loading @@ -828,12 +786,4 @@ public class NotificationPanelView extends PanelView implements public View getRightIcon() { return mKeyguardBottomArea.getCameraImageView(); } private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() { @Override public void onShowingDetail(boolean showingDetail) { mQsShowingDetail = showingDetail; updateQsState(); } }; } packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java +10 −0 Original line number Diff line number Diff line Loading @@ -293,5 +293,15 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL public void setQSPanel(QSPanel qsp) { mQSPanel = qsp; if (mQSPanel != null) { mQSPanel.setCallback(mQsPanelCallback); } } private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() { @Override public void onShowingDetail(boolean showingDetail) { mBrightnessContainer.animate().alpha(showingDetail ? 0 : 1).withLayer().start(); } }; } Loading
packages/SystemUI/res/values/dimens.xml +0 −3 Original line number Diff line number Diff line Loading @@ -196,9 +196,6 @@ <dimen name="qs_dual_tile_height">109dp</dimen> <dimen name="qs_dual_tile_padding">12dp</dimen> <!-- How far the hidden header peeks from the top of the screen when QS is in detail mode. --> <dimen name="qs_header_peek_height">8dp</dimen> <!-- How far the expanded QS panel peeks from the header in collapsed state. --> <dimen name="qs_peek_height">8dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +4 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public class QSPanel extends ViewGroup { mContext = context; mDetail = new FrameLayout(mContext); mDetail.setBackgroundColor(mContext.getResources().getColor(R.color.system_primary_color)); mDetail.setVisibility(GONE); mDetail.setClickable(true); addView(mDetail); Loading Loading @@ -204,7 +205,7 @@ public class QSPanel extends ViewGroup { mDetail.measure(exactly(width), unspecified()); if (mDetail.getVisibility() == VISIBLE && mDetail.getChildCount() > 0) { final int dmh = mDetail.getMeasuredHeight(); if (dmh > 0) h = dmh; if (dmh > 0) h = Math.max(h, dmh); } setMeasuredDimension(width, h); } Loading @@ -231,7 +232,8 @@ public class QSPanel extends ViewGroup { left + record.tileView.getMeasuredWidth(), top + record.tileView.getMeasuredHeight()); } mDetail.layout(0, 0, mDetail.getMeasuredWidth(), mDetail.getMeasuredHeight()); final int dh = Math.max(mDetail.getMeasuredHeight(), getMeasuredHeight()); mDetail.layout(0, 0, mDetail.getMeasuredWidth(), dh); } private int getRowTop(int row) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −56 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.view.animation.Interpolator; import android.widget.LinearLayout; import com.android.systemui.R; import com.android.systemui.qs.QSPanel; import com.android.systemui.statusbar.ExpandableView; import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.GestureRecorder; Loading @@ -54,7 +53,7 @@ public class NotificationPanelView extends PanelView implements PhoneStatusBar mStatusBar; private StatusBarHeaderView mHeader; private View mQsContainer; private QSPanel mQsPanel; private View mQsPanel; private View mKeyguardStatusView; private ObservableScrollView mScrollView; private View mStackScrollerContainer; Loading @@ -73,7 +72,6 @@ public class NotificationPanelView extends PanelView implements */ private boolean mIntercepting; private boolean mQsExpanded; private boolean mQsFullyExpanded; private boolean mKeyguardShowing; private float mInitialHeightOnTouch; private float mInitialTouchX; Loading @@ -85,14 +83,13 @@ public class NotificationPanelView extends PanelView implements private int mQsMaxExpansionHeight; private int mMinStackHeight; private int mQsPeekHeight; private int mQsHeaderPeekHeight; private boolean mQsShowingDetail; private float mNotificationTranslation; private int mStackScrollerIntrinsicPadding; private boolean mQsExpansionEnabled = true; private ValueAnimator mQsExpansionAnimator; private FlingAnimationUtils mFlingAnimationUtils; private int mStatusBarMinHeight; private Interpolator mFastOutSlowInInterpolator; private ObjectAnimator mClockAnimator; private int mClockAnimationTarget = -1; Loading Loading @@ -135,8 +132,7 @@ public class NotificationPanelView extends PanelView implements mKeyguardStatusView = findViewById(R.id.keyguard_status_view); mStackScrollerContainer = findViewById(R.id.notification_container_parent); mQsContainer = findViewById(R.id.quick_settings_container); mQsPanel = (QSPanel) findViewById(R.id.quick_settings_panel); mQsPanel.setCallback(mQsPanelCallback); mQsPanel = findViewById(R.id.quick_settings_panel); mScrollView = (ObservableScrollView) findViewById(R.id.scroll_view); mScrollView.setListener(this); mNotificationStackScroller = (NotificationStackScrollLayout) Loading @@ -160,7 +156,6 @@ public class NotificationPanelView extends PanelView implements mStatusBarMinHeight = getResources().getDimensionPixelSize( com.android.internal.R.dimen.status_bar_height); mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height); mQsHeaderPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_header_peek_height); mClockPositionAlgorithm.loadDimens(getResources()); } Loading @@ -172,9 +167,7 @@ public class NotificationPanelView extends PanelView implements mQsMinExpansionHeight = mHeader.getCollapsedHeight() + mQsPeekHeight; mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight(); if (mQsExpanded) { if (mQsFullyExpanded) { setQsStackScrollerPadding(mQsMaxExpansionHeight); } } else { setQsExpansion(mQsMinExpansionHeight); positionClockAndNotifications(); Loading Loading @@ -527,39 +520,10 @@ public class NotificationPanelView extends PanelView implements ? View.INVISIBLE : View.VISIBLE); mScrollView.setTouchEnabled(mQsExpanded); if (mQsShowingDetail) { if (mQsFullyExpanded) { setQsHeaderPeeking(true); } } else { setQsHeaderPeeking(false); } } private void setQsHeaderPeeking(boolean peeking) { final boolean stackIsPeeking = mStackScrollerContainer.getTranslationY() != 0; final boolean headerIsPeeking = mHeader.getTranslationY() != 0; final int ty = mQsHeaderPeekHeight - mHeader.getExpandedHeight(); if (peeking) { if (!headerIsPeeking) { mHeader.animate().translationY(ty); } if (!stackIsPeeking) { mStackScrollerContainer.animate().translationY(ty); } } else { if (headerIsPeeking) { mHeader.animate().translationY(0); } if (stackIsPeeking) { mStackScrollerContainer.animate().translationY(0); } } } private void setQsExpansion(float height) { height = Math.min(Math.max(height, mQsMinExpansionHeight), mQsMaxExpansionHeight); mQsFullyExpanded = height == mQsMaxExpansionHeight; if (height > mQsMinExpansionHeight && !mQsExpanded) { setQsExpanded(true); } else if (height <= mQsMinExpansionHeight && mQsExpanded) { Loading Loading @@ -652,16 +616,10 @@ public class NotificationPanelView extends PanelView implements if (!mQsExpansionEnabled) { return false; } final float ty = mHeader.getTranslationY(); boolean onHeader = x >= mHeader.getLeft() && x <= mHeader.getRight() && y >= mHeader.getTop() + ty && y <= mHeader.getBottom() + ty; && y >= mHeader.getTop() && y <= mHeader.getBottom(); if (mQsExpanded) { if (mQsShowingDetail && onHeader) { // bring back the header, crudely setQsHeaderPeeking(false); mQsPanel.setExpanded(false); } return !mQsShowingDetail && onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0); return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0); } else { return onHeader; } Loading Loading @@ -828,12 +786,4 @@ public class NotificationPanelView extends PanelView implements public View getRightIcon() { return mKeyguardBottomArea.getCameraImageView(); } private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() { @Override public void onShowingDetail(boolean showingDetail) { mQsShowingDetail = showingDetail; updateQsState(); } }; }
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java +10 −0 Original line number Diff line number Diff line Loading @@ -293,5 +293,15 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL public void setQSPanel(QSPanel qsp) { mQSPanel = qsp; if (mQSPanel != null) { mQSPanel.setCallback(mQsPanelCallback); } } private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() { @Override public void onShowingDetail(boolean showingDetail) { mBrightnessContainer.animate().alpha(showingDetail ? 0 : 1).withLayer().start(); } }; }