Loading packages/SystemUI/res/values/ids.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,6 @@ <item type="id" name="expandable_tag" /> <item type="id" name="user_expanded_tag" /> <item type="id" name="user_lock_tag" /> <item type="id" name="user_cleared_tag" /> <item type="id" name="user_dismissed_tag" /> <item type="id" name="status_bar_cling_stub" /> </resources> packages/SystemUI/src/com/android/systemui/SwipeHelper.java +3 −7 Original line number Diff line number Diff line Loading @@ -270,10 +270,6 @@ public class SwipeHelper implements Gefingerpoken { * @param velocity The desired pixels/second speed at which the view should move */ public void dismissChild(final View view, float velocity) { dismissChild(view, velocity, false); } private void dismissChild(final View view, float velocity, final boolean fromUser) { final View animView = mCallback.getChildContentView(view); final boolean canAnimViewBeDismissed = mCallback.canChildBeDismissed(view); float newPos; Loading Loading @@ -301,7 +297,7 @@ public class SwipeHelper implements Gefingerpoken { anim.setDuration(duration); anim.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator animation) { mCallback.onChildDismissed(view, fromUser); mCallback.onChildDismissed(view); animView.setLayerType(View.LAYER_TYPE_NONE, null); } }); Loading Loading @@ -388,7 +384,7 @@ public class SwipeHelper implements Gefingerpoken { if (dismissChild) { // flingadingy dismissChild(mCurrView, childSwipedFastEnough ? velocity : 0f, true); dismissChild(mCurrView, childSwipedFastEnough ? velocity : 0f); } else { // snappity mCallback.onDragCancelled(mCurrView); Loading @@ -409,7 +405,7 @@ public class SwipeHelper implements Gefingerpoken { void onBeginDrag(View v); void onChildDismissed(View v, boolean fromUser); void onChildDismissed(View v); void onDragCancelled(View v); } Loading packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java +1 −1 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView mSwipeHelper.dismissChild(v, 0); } public void onChildDismissed(View v, boolean fromUser) { public void onChildDismissed(View v) { addToRecycledViews(v); mLinearLayout.removeView(v); mCallback.handleSwipe(v); Loading packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ public class RecentsVerticalScrollView extends ScrollView mSwipeHelper.dismissChild(v, 0); } public void onChildDismissed(View v, boolean fromUser) { public void onChildDismissed(View v) { addToRecycledViews(v); mLinearLayout.removeView(v); mCallback.handleSwipe(v); Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +21 −8 Original line number Diff line number Diff line Loading @@ -109,6 +109,10 @@ public abstract class BaseStatusBar extends SystemUI implements public static final int EXPANDED_LEAVE_ALONE = -10000; public static final int EXPANDED_FULL_OPEN = -10001; private static final boolean CLOSE_PANEL_WHEN_EMPTIED = true; private static final int COLLAPSE_AFTER_DISMISS_DELAY = 200; private static final int COLLAPSE_AFTER_REMOVE_DELAY = 400; protected CommandQueue mCommandQueue; protected IStatusBarService mBarService; protected H mHandler = createHandler(); Loading @@ -131,6 +135,13 @@ public abstract class BaseStatusBar extends SystemUI implements protected FrameLayout mStatusBarContainer; private Runnable mPanelCollapseRunnable = new Runnable() { @Override public void run() { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); } }; /** * An interface for navigation key bars to allow status bars to signal which keys are * currently of interest to the user.<br> Loading Loading @@ -965,14 +976,14 @@ public abstract class BaseStatusBar extends SystemUI implements updateExpansionStates(); updateNotificationIcons(); if (entry.userCleared() && !mNotificationData.hasClearableItems()) { // wait a bit to make the user aware of what's happening mHandler.postDelayed(new Runnable() { @Override public void run() { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); if (CLOSE_PANEL_WHEN_EMPTIED && isNotificationPanelFullyVisible()) { if (entry.userDismissed() && !mNotificationData.hasClearableItems()) { mHandler.removeCallbacks(mPanelCollapseRunnable); mHandler.postDelayed(mPanelCollapseRunnable, COLLAPSE_AFTER_DISMISS_DELAY); } else if (mNotificationData.size() == 0) { mHandler.removeCallbacks(mPanelCollapseRunnable); mHandler.postDelayed(mPanelCollapseRunnable, COLLAPSE_AFTER_REMOVE_DELAY); } }, 225); } return entry.notification; Loading Loading @@ -1014,6 +1025,7 @@ public abstract class BaseStatusBar extends SystemUI implements } updateExpansionStates(); updateNotificationIcons(); mHandler.removeCallbacks(mPanelCollapseRunnable); return iconView; } Loading Loading @@ -1061,6 +1073,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected abstract void tick(IBinder key, StatusBarNotification n, boolean firstTime); protected abstract void updateExpandedViewPos(int expandedPosition); protected abstract int getExpandedViewMaxHeight(); protected abstract boolean isNotificationPanelFullyVisible(); protected abstract boolean shouldDisableNavbarGestures(); protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) { Loading Loading
packages/SystemUI/res/values/ids.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,6 @@ <item type="id" name="expandable_tag" /> <item type="id" name="user_expanded_tag" /> <item type="id" name="user_lock_tag" /> <item type="id" name="user_cleared_tag" /> <item type="id" name="user_dismissed_tag" /> <item type="id" name="status_bar_cling_stub" /> </resources>
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +3 −7 Original line number Diff line number Diff line Loading @@ -270,10 +270,6 @@ public class SwipeHelper implements Gefingerpoken { * @param velocity The desired pixels/second speed at which the view should move */ public void dismissChild(final View view, float velocity) { dismissChild(view, velocity, false); } private void dismissChild(final View view, float velocity, final boolean fromUser) { final View animView = mCallback.getChildContentView(view); final boolean canAnimViewBeDismissed = mCallback.canChildBeDismissed(view); float newPos; Loading Loading @@ -301,7 +297,7 @@ public class SwipeHelper implements Gefingerpoken { anim.setDuration(duration); anim.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator animation) { mCallback.onChildDismissed(view, fromUser); mCallback.onChildDismissed(view); animView.setLayerType(View.LAYER_TYPE_NONE, null); } }); Loading Loading @@ -388,7 +384,7 @@ public class SwipeHelper implements Gefingerpoken { if (dismissChild) { // flingadingy dismissChild(mCurrView, childSwipedFastEnough ? velocity : 0f, true); dismissChild(mCurrView, childSwipedFastEnough ? velocity : 0f); } else { // snappity mCallback.onDragCancelled(mCurrView); Loading @@ -409,7 +405,7 @@ public class SwipeHelper implements Gefingerpoken { void onBeginDrag(View v); void onChildDismissed(View v, boolean fromUser); void onChildDismissed(View v); void onDragCancelled(View v); } Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java +1 −1 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView mSwipeHelper.dismissChild(v, 0); } public void onChildDismissed(View v, boolean fromUser) { public void onChildDismissed(View v) { addToRecycledViews(v); mLinearLayout.removeView(v); mCallback.handleSwipe(v); Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ public class RecentsVerticalScrollView extends ScrollView mSwipeHelper.dismissChild(v, 0); } public void onChildDismissed(View v, boolean fromUser) { public void onChildDismissed(View v) { addToRecycledViews(v); mLinearLayout.removeView(v); mCallback.handleSwipe(v); Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +21 −8 Original line number Diff line number Diff line Loading @@ -109,6 +109,10 @@ public abstract class BaseStatusBar extends SystemUI implements public static final int EXPANDED_LEAVE_ALONE = -10000; public static final int EXPANDED_FULL_OPEN = -10001; private static final boolean CLOSE_PANEL_WHEN_EMPTIED = true; private static final int COLLAPSE_AFTER_DISMISS_DELAY = 200; private static final int COLLAPSE_AFTER_REMOVE_DELAY = 400; protected CommandQueue mCommandQueue; protected IStatusBarService mBarService; protected H mHandler = createHandler(); Loading @@ -131,6 +135,13 @@ public abstract class BaseStatusBar extends SystemUI implements protected FrameLayout mStatusBarContainer; private Runnable mPanelCollapseRunnable = new Runnable() { @Override public void run() { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); } }; /** * An interface for navigation key bars to allow status bars to signal which keys are * currently of interest to the user.<br> Loading Loading @@ -965,14 +976,14 @@ public abstract class BaseStatusBar extends SystemUI implements updateExpansionStates(); updateNotificationIcons(); if (entry.userCleared() && !mNotificationData.hasClearableItems()) { // wait a bit to make the user aware of what's happening mHandler.postDelayed(new Runnable() { @Override public void run() { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); if (CLOSE_PANEL_WHEN_EMPTIED && isNotificationPanelFullyVisible()) { if (entry.userDismissed() && !mNotificationData.hasClearableItems()) { mHandler.removeCallbacks(mPanelCollapseRunnable); mHandler.postDelayed(mPanelCollapseRunnable, COLLAPSE_AFTER_DISMISS_DELAY); } else if (mNotificationData.size() == 0) { mHandler.removeCallbacks(mPanelCollapseRunnable); mHandler.postDelayed(mPanelCollapseRunnable, COLLAPSE_AFTER_REMOVE_DELAY); } }, 225); } return entry.notification; Loading Loading @@ -1014,6 +1025,7 @@ public abstract class BaseStatusBar extends SystemUI implements } updateExpansionStates(); updateNotificationIcons(); mHandler.removeCallbacks(mPanelCollapseRunnable); return iconView; } Loading Loading @@ -1061,6 +1073,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected abstract void tick(IBinder key, StatusBarNotification n, boolean firstTime); protected abstract void updateExpandedViewPos(int expandedPosition); protected abstract int getExpandedViewMaxHeight(); protected abstract boolean isNotificationPanelFullyVisible(); protected abstract boolean shouldDisableNavbarGestures(); protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) { Loading