Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ public class HeadsUpTouchHelper implements Gefingerpoken { mInitialTouchX = x; mInitialTouchY = y; int expandedHeight = mPickedChild.getActualHeight(); mPanel.setPanelScrimMinFraction((float) expandedHeight / mPanel.getMaxPanelHeight()); mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight + mNotificationsTopPadding); mHeadsUpManager.unpinAll(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −1 Original line number Diff line number Diff line Loading @@ -1767,6 +1767,7 @@ public class NotificationPanelView extends PanelView implements mIsExpansionFromHeadsUp = false; mNotificationStackScroller.setTrackingHeadsUp(false); mExpandingFromHeadsUp = false; setPanelScrimMinFraction(0.0f); } private void setListening(boolean listening) { Loading Loading @@ -2334,4 +2335,8 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.setStackHeight(stackHeight); updateKeyguardBottomAreaAlpha(); } public void setPanelScrimMinFraction(float minFraction) { mBar.panelScrimMinFractionChanged(minFraction); } } packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +3 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import android.widget.FrameLayout; import java.util.ArrayList; public class PanelBar extends FrameLayout { public abstract class PanelBar extends FrameLayout { public static final boolean DEBUG = false; public static final String TAG = PanelBar.class.getSimpleName(); public static final void LOG(String fmt, Object... args) { Loading Loading @@ -156,6 +156,8 @@ public class PanelBar extends FrameLayout { } } public abstract void panelScrimMinFractionChanged(float minFraction); /** * @param panel the panel which changed its expansion state * @param frac the fraction from the expansion in [0, 1] Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +17 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ public class PhoneStatusBarView extends PanelBar { PanelView mNotificationPanel; private final PhoneStatusBarTransitions mBarTransitions; private ScrimController mScrimController; private float mMinFraction; private float mPanelFraction; public PhoneStatusBarView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -179,9 +181,23 @@ public class PhoneStatusBarView extends PanelBar { return mBar.interceptTouchEvent(event) || super.onInterceptTouchEvent(event); } @Override public void panelScrimMinFractionChanged(float minFraction) { if (mMinFraction != minFraction) { mMinFraction = minFraction; updateScrimFraction(); } } @Override public void panelExpansionChanged(PanelView panel, float frac, boolean expanded) { super.panelExpansionChanged(panel, frac, expanded); mScrimController.setPanelExpansion(frac); mPanelFraction = frac; updateScrimFraction(); } private void updateScrimFraction() { float scrimFraction = Math.max(mPanelFraction - mMinFraction / (1.0f - mMinFraction), 0); mScrimController.setPanelExpansion(scrimFraction); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ public class HeadsUpTouchHelper implements Gefingerpoken { mInitialTouchX = x; mInitialTouchY = y; int expandedHeight = mPickedChild.getActualHeight(); mPanel.setPanelScrimMinFraction((float) expandedHeight / mPanel.getMaxPanelHeight()); mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight + mNotificationsTopPadding); mHeadsUpManager.unpinAll(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −1 Original line number Diff line number Diff line Loading @@ -1767,6 +1767,7 @@ public class NotificationPanelView extends PanelView implements mIsExpansionFromHeadsUp = false; mNotificationStackScroller.setTrackingHeadsUp(false); mExpandingFromHeadsUp = false; setPanelScrimMinFraction(0.0f); } private void setListening(boolean listening) { Loading Loading @@ -2334,4 +2335,8 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.setStackHeight(stackHeight); updateKeyguardBottomAreaAlpha(); } public void setPanelScrimMinFraction(float minFraction) { mBar.panelScrimMinFractionChanged(minFraction); } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +3 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import android.widget.FrameLayout; import java.util.ArrayList; public class PanelBar extends FrameLayout { public abstract class PanelBar extends FrameLayout { public static final boolean DEBUG = false; public static final String TAG = PanelBar.class.getSimpleName(); public static final void LOG(String fmt, Object... args) { Loading Loading @@ -156,6 +156,8 @@ public class PanelBar extends FrameLayout { } } public abstract void panelScrimMinFractionChanged(float minFraction); /** * @param panel the panel which changed its expansion state * @param frac the fraction from the expansion in [0, 1] Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +17 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ public class PhoneStatusBarView extends PanelBar { PanelView mNotificationPanel; private final PhoneStatusBarTransitions mBarTransitions; private ScrimController mScrimController; private float mMinFraction; private float mPanelFraction; public PhoneStatusBarView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -179,9 +181,23 @@ public class PhoneStatusBarView extends PanelBar { return mBar.interceptTouchEvent(event) || super.onInterceptTouchEvent(event); } @Override public void panelScrimMinFractionChanged(float minFraction) { if (mMinFraction != minFraction) { mMinFraction = minFraction; updateScrimFraction(); } } @Override public void panelExpansionChanged(PanelView panel, float frac, boolean expanded) { super.panelExpansionChanged(panel, frac, expanded); mScrimController.setPanelExpansion(frac); mPanelFraction = frac; updateScrimFraction(); } private void updateScrimFraction() { float scrimFraction = Math.max(mPanelFraction - mMinFraction / (1.0f - mMinFraction), 0); mScrimController.setPanelExpansion(scrimFraction); } }