Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +16 −2 Original line number Original line Diff line number Diff line Loading @@ -1617,8 +1617,9 @@ public abstract class BaseStatusBar extends SystemUI implements protected void handleVisibleToUserChanged(boolean visibleToUser) { protected void handleVisibleToUserChanged(boolean visibleToUser) { try { try { if (visibleToUser) { if (visibleToUser) { boolean clearNotificationEffects = mShowLockscreenNotifications || boolean clearNotificationEffects = !isPanelFullyCollapsed() && (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED); (mShowLockscreenNotifications || (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED)); mBarService.onPanelRevealed(clearNotificationEffects); mBarService.onPanelRevealed(clearNotificationEffects); } else { } else { mBarService.onPanelHidden(); mBarService.onPanelHidden(); Loading @@ -1628,6 +1629,19 @@ public abstract class BaseStatusBar extends SystemUI implements } } } } /** * Clear Buzz/Beep/Blink. */ public void clearNotificationEffects() { try { mBarService.clearNotificationEffects(); } catch (RemoteException e) { // Won't fail unless the world has ended. } } protected abstract boolean isPanelFullyCollapsed(); /** /** * Cancel this notification and tell the StatusBarManagerService / NotificationManagerService * Cancel this notification and tell the StatusBarManagerService / NotificationManagerService * about the failure. * about the failure. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,7 @@ public class HeadsUpTouchHelper implements Gefingerpoken { / mPanel.getMaxPanelHeight()); / mPanel.getMaxPanelHeight()); mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight + mNotificationsTopPadding); + mNotificationsTopPadding); mPanel.clearNotificattonEffects(); mHeadsUpManager.unpinAll(); mHeadsUpManager.unpinAll(); return true; return true; } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -2340,4 +2340,8 @@ public class NotificationPanelView extends PanelView implements public void setPanelScrimMinFraction(float minFraction) { public void setPanelScrimMinFraction(float minFraction) { mBar.panelScrimMinFractionChanged(minFraction); mBar.panelScrimMinFractionChanged(minFraction); } } public void clearNotificattonEffects() { mStatusBar.clearNotificationEffects(); } } } packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ import java.util.ArrayList; public abstract class PanelBar extends FrameLayout { public abstract class PanelBar extends FrameLayout { public static final boolean DEBUG = false; public static final boolean DEBUG = false; public static final String TAG = PanelBar.class.getSimpleName(); public static final String TAG = PanelBar.class.getSimpleName(); private static final boolean SPEW = false; public static final void LOG(String fmt, Object... args) { public static final void LOG(String fmt, Object... args) { if (!DEBUG) return; if (!DEBUG) return; Log.v(TAG, String.format(fmt, args)); Log.v(TAG, String.format(fmt, args)); Loading Loading @@ -167,7 +169,7 @@ public abstract class PanelBar extends FrameLayout { public void panelExpansionChanged(PanelView panel, float frac, boolean expanded) { public void panelExpansionChanged(PanelView panel, float frac, boolean expanded) { boolean fullyClosed = true; boolean fullyClosed = true; PanelView fullyOpenedPanel = null; PanelView fullyOpenedPanel = null; if (DEBUG) LOG("panelExpansionChanged: start state=%d panel=%s", mState, panel.getName()); if (SPEW) LOG("panelExpansionChanged: start state=%d panel=%s", mState, panel.getName()); mPanelExpandedFractionSum = 0f; mPanelExpandedFractionSum = 0f; for (PanelView pv : mPanels) { for (PanelView pv : mPanels) { pv.setVisibility(expanded ? View.VISIBLE : View.INVISIBLE); pv.setVisibility(expanded ? View.VISIBLE : View.INVISIBLE); Loading @@ -180,7 +182,7 @@ public abstract class PanelBar extends FrameLayout { fullyClosed = false; fullyClosed = false; final float thisFrac = pv.getExpandedFraction(); final float thisFrac = pv.getExpandedFraction(); mPanelExpandedFractionSum += thisFrac; mPanelExpandedFractionSum += thisFrac; if (DEBUG) LOG("panelExpansionChanged: -> %s: f=%.1f", pv.getName(), thisFrac); if (SPEW) LOG("panelExpansionChanged: -> %s: f=%.1f", pv.getName(), thisFrac); if (panel == pv) { if (panel == pv) { if (thisFrac == 1f) fullyOpenedPanel = panel; if (thisFrac == 1f) fullyOpenedPanel = panel; } } Loading @@ -195,7 +197,7 @@ public abstract class PanelBar extends FrameLayout { onAllPanelsCollapsed(); onAllPanelsCollapsed(); } } if (DEBUG) LOG("panelExpansionChanged: end state=%d [%s%s ]", mState, if (SPEW) LOG("panelExpansionChanged: end state=%d [%s%s ]", mState, (fullyOpenedPanel!=null)?" fullyOpened":"", fullyClosed?" fullyClosed":""); (fullyOpenedPanel!=null)?" fullyOpened":"", fullyClosed?" fullyClosed":""); } } Loading Loading @@ -241,7 +243,7 @@ public abstract class PanelBar extends FrameLayout { } } public void onExpandingFinished() { public void onExpandingFinished() { if (DEBUG) LOG("onExpandingFinished"); } } public void onClosingFinished() { public void onClosingFinished() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -3290,6 +3290,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return mState; return mState; } } @Override protected boolean isPanelFullyCollapsed() { return mNotificationPanel.isFullyCollapsed(); } public void showKeyguard() { public void showKeyguard() { if (mLaunchTransitionFadingAway) { if (mLaunchTransitionFadingAway) { mNotificationPanel.animate().cancel(); mNotificationPanel.animate().cancel(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +16 −2 Original line number Original line Diff line number Diff line Loading @@ -1617,8 +1617,9 @@ public abstract class BaseStatusBar extends SystemUI implements protected void handleVisibleToUserChanged(boolean visibleToUser) { protected void handleVisibleToUserChanged(boolean visibleToUser) { try { try { if (visibleToUser) { if (visibleToUser) { boolean clearNotificationEffects = mShowLockscreenNotifications || boolean clearNotificationEffects = !isPanelFullyCollapsed() && (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED); (mShowLockscreenNotifications || (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED)); mBarService.onPanelRevealed(clearNotificationEffects); mBarService.onPanelRevealed(clearNotificationEffects); } else { } else { mBarService.onPanelHidden(); mBarService.onPanelHidden(); Loading @@ -1628,6 +1629,19 @@ public abstract class BaseStatusBar extends SystemUI implements } } } } /** * Clear Buzz/Beep/Blink. */ public void clearNotificationEffects() { try { mBarService.clearNotificationEffects(); } catch (RemoteException e) { // Won't fail unless the world has ended. } } protected abstract boolean isPanelFullyCollapsed(); /** /** * Cancel this notification and tell the StatusBarManagerService / NotificationManagerService * Cancel this notification and tell the StatusBarManagerService / NotificationManagerService * about the failure. * about the failure. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,7 @@ public class HeadsUpTouchHelper implements Gefingerpoken { / mPanel.getMaxPanelHeight()); / mPanel.getMaxPanelHeight()); mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight + mNotificationsTopPadding); + mNotificationsTopPadding); mPanel.clearNotificattonEffects(); mHeadsUpManager.unpinAll(); mHeadsUpManager.unpinAll(); return true; return true; } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -2340,4 +2340,8 @@ public class NotificationPanelView extends PanelView implements public void setPanelScrimMinFraction(float minFraction) { public void setPanelScrimMinFraction(float minFraction) { mBar.panelScrimMinFractionChanged(minFraction); mBar.panelScrimMinFractionChanged(minFraction); } } public void clearNotificattonEffects() { mStatusBar.clearNotificationEffects(); } } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ import java.util.ArrayList; public abstract class PanelBar extends FrameLayout { public abstract class PanelBar extends FrameLayout { public static final boolean DEBUG = false; public static final boolean DEBUG = false; public static final String TAG = PanelBar.class.getSimpleName(); public static final String TAG = PanelBar.class.getSimpleName(); private static final boolean SPEW = false; public static final void LOG(String fmt, Object... args) { public static final void LOG(String fmt, Object... args) { if (!DEBUG) return; if (!DEBUG) return; Log.v(TAG, String.format(fmt, args)); Log.v(TAG, String.format(fmt, args)); Loading Loading @@ -167,7 +169,7 @@ public abstract class PanelBar extends FrameLayout { public void panelExpansionChanged(PanelView panel, float frac, boolean expanded) { public void panelExpansionChanged(PanelView panel, float frac, boolean expanded) { boolean fullyClosed = true; boolean fullyClosed = true; PanelView fullyOpenedPanel = null; PanelView fullyOpenedPanel = null; if (DEBUG) LOG("panelExpansionChanged: start state=%d panel=%s", mState, panel.getName()); if (SPEW) LOG("panelExpansionChanged: start state=%d panel=%s", mState, panel.getName()); mPanelExpandedFractionSum = 0f; mPanelExpandedFractionSum = 0f; for (PanelView pv : mPanels) { for (PanelView pv : mPanels) { pv.setVisibility(expanded ? View.VISIBLE : View.INVISIBLE); pv.setVisibility(expanded ? View.VISIBLE : View.INVISIBLE); Loading @@ -180,7 +182,7 @@ public abstract class PanelBar extends FrameLayout { fullyClosed = false; fullyClosed = false; final float thisFrac = pv.getExpandedFraction(); final float thisFrac = pv.getExpandedFraction(); mPanelExpandedFractionSum += thisFrac; mPanelExpandedFractionSum += thisFrac; if (DEBUG) LOG("panelExpansionChanged: -> %s: f=%.1f", pv.getName(), thisFrac); if (SPEW) LOG("panelExpansionChanged: -> %s: f=%.1f", pv.getName(), thisFrac); if (panel == pv) { if (panel == pv) { if (thisFrac == 1f) fullyOpenedPanel = panel; if (thisFrac == 1f) fullyOpenedPanel = panel; } } Loading @@ -195,7 +197,7 @@ public abstract class PanelBar extends FrameLayout { onAllPanelsCollapsed(); onAllPanelsCollapsed(); } } if (DEBUG) LOG("panelExpansionChanged: end state=%d [%s%s ]", mState, if (SPEW) LOG("panelExpansionChanged: end state=%d [%s%s ]", mState, (fullyOpenedPanel!=null)?" fullyOpened":"", fullyClosed?" fullyClosed":""); (fullyOpenedPanel!=null)?" fullyOpened":"", fullyClosed?" fullyClosed":""); } } Loading Loading @@ -241,7 +243,7 @@ public abstract class PanelBar extends FrameLayout { } } public void onExpandingFinished() { public void onExpandingFinished() { if (DEBUG) LOG("onExpandingFinished"); } } public void onClosingFinished() { public void onClosingFinished() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -3290,6 +3290,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return mState; return mState; } } @Override protected boolean isPanelFullyCollapsed() { return mNotificationPanel.isFullyCollapsed(); } public void showKeyguard() { public void showKeyguard() { if (mLaunchTransitionFadingAway) { if (mLaunchTransitionFadingAway) { mNotificationPanel.animate().cancel(); mNotificationPanel.animate().cancel(); Loading