Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +4 −0 Original line number Diff line number Diff line Loading @@ -271,6 +271,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } } public boolean isActive() { return mActivated; } private void startActivateAnimation(final boolean reverse) { if (!isAttachedToWindow()) { return; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class ActivatableNotificationViewController { if (mNeedsDimming && ev.getActionMasked() == MotionEvent.ACTION_DOWN && mView.disallowSingleClick(ev) && !mAccessibilityManager.isTouchExplorationEnabled()) { if (!mView.isActivated()) { if (!mView.isActive()) { return true; } else if (!mDoubleTapHelper.isWithinDoubleTapSlop(ev)) { mBlockNextTouch = true; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationConversationTemplateViewWrapper.kt +11 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class NotificationConversationTemplateViewWrapper constructor( private var conversationIcon: View? = null private var conversationBadge: View? = null private var expandButton: View? = null private lateinit var expandButtonContainer: View private var messagingLinearLayout: MessagingLinearLayout? = null init { Loading @@ -56,6 +57,8 @@ class NotificationConversationTemplateViewWrapper constructor( com.android.internal.R.id.conversation_icon_badge) expandButton = conversationLayout.requireViewById( com.android.internal.R.id.expand_button) expandButtonContainer = conversationLayout.requireViewById( com.android.internal.R.id.expand_button_container) } override fun onContentUpdated(row: ExpandableNotificationRow) { Loading Loading @@ -90,6 +93,14 @@ class NotificationConversationTemplateViewWrapper constructor( conversationLayout.updateExpandability(expandable, onClickListener) } override fun disallowSingleClick(x: Float, y: Float): Boolean { if (expandButtonContainer.visibility == View.VISIBLE && isOnView(expandButtonContainer, x, y)) { return true } return super.disallowSingleClick(x, y) } override fun getMinLayoutHeight(): Int { if (mActionsContainer != null && mActionsContainer.visibility != View.GONE) { return minHeightWithActions Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationTemplateViewWrapper.java +0 −13 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp private TextView mText; protected View mActionsContainer; private ImageView mReplyAction; private Rect mTmpRect = new Rect(); private int mContentHeight; private int mMinHeightHint; Loading Loading @@ -271,18 +270,6 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp return super.disallowSingleClick(x, y); } private boolean isOnView(View view, float x, float y) { View searchView = (View) view.getParent(); while (searchView != null && !(searchView instanceof ExpandableNotificationRow)) { searchView.getHitRect(mTmpRect); x -= mTmpRect.left; y -= mTmpRect.top; searchView = (View) searchView.getParent(); } view.getHitRect(mTmpRect); return mTmpRect.contains((int) x,(int) y); } @Override public void onContentUpdated(ExpandableNotificationRow row) { // Reinspect the notification. Before the super call, because the super call also updates Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationViewWrapper.java +22 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.graphics.Color; import android.graphics.ColorMatrix; import android.graphics.ColorMatrixColorFilter; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; Loading @@ -49,6 +50,7 @@ public abstract class NotificationViewWrapper implements TransformableView { protected final View mView; protected final ExpandableNotificationRow mRow; private final Rect mTmpRect = new Rect(); protected int mBackgroundColor = 0; Loading Loading @@ -305,6 +307,26 @@ public abstract class NotificationViewWrapper implements TransformableView { return false; } /** * Is a given x and y coordinate on a view. * * @param view the view to be checked * @param x the x coordinate, relative to the ExpandableNotificationRow * @param y the y coordinate, relative to the ExpandableNotificationRow * @return {@code true} if it is on the view */ protected boolean isOnView(View view, float x, float y) { View searchView = (View) view.getParent(); while (searchView != null && !(searchView instanceof ExpandableNotificationRow)) { searchView.getHitRect(mTmpRect); x -= mTmpRect.left; y -= mTmpRect.top; searchView = (View) searchView.getParent(); } view.getHitRect(mTmpRect); return mTmpRect.contains((int) x,(int) y); } public int getMinLayoutHeight() { return 0; } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +4 −0 Original line number Diff line number Diff line Loading @@ -271,6 +271,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } } public boolean isActive() { return mActivated; } private void startActivateAnimation(final boolean reverse) { if (!isAttachedToWindow()) { return; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class ActivatableNotificationViewController { if (mNeedsDimming && ev.getActionMasked() == MotionEvent.ACTION_DOWN && mView.disallowSingleClick(ev) && !mAccessibilityManager.isTouchExplorationEnabled()) { if (!mView.isActivated()) { if (!mView.isActive()) { return true; } else if (!mDoubleTapHelper.isWithinDoubleTapSlop(ev)) { mBlockNextTouch = true; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationConversationTemplateViewWrapper.kt +11 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class NotificationConversationTemplateViewWrapper constructor( private var conversationIcon: View? = null private var conversationBadge: View? = null private var expandButton: View? = null private lateinit var expandButtonContainer: View private var messagingLinearLayout: MessagingLinearLayout? = null init { Loading @@ -56,6 +57,8 @@ class NotificationConversationTemplateViewWrapper constructor( com.android.internal.R.id.conversation_icon_badge) expandButton = conversationLayout.requireViewById( com.android.internal.R.id.expand_button) expandButtonContainer = conversationLayout.requireViewById( com.android.internal.R.id.expand_button_container) } override fun onContentUpdated(row: ExpandableNotificationRow) { Loading Loading @@ -90,6 +93,14 @@ class NotificationConversationTemplateViewWrapper constructor( conversationLayout.updateExpandability(expandable, onClickListener) } override fun disallowSingleClick(x: Float, y: Float): Boolean { if (expandButtonContainer.visibility == View.VISIBLE && isOnView(expandButtonContainer, x, y)) { return true } return super.disallowSingleClick(x, y) } override fun getMinLayoutHeight(): Int { if (mActionsContainer != null && mActionsContainer.visibility != View.GONE) { return minHeightWithActions Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationTemplateViewWrapper.java +0 −13 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp private TextView mText; protected View mActionsContainer; private ImageView mReplyAction; private Rect mTmpRect = new Rect(); private int mContentHeight; private int mMinHeightHint; Loading Loading @@ -271,18 +270,6 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp return super.disallowSingleClick(x, y); } private boolean isOnView(View view, float x, float y) { View searchView = (View) view.getParent(); while (searchView != null && !(searchView instanceof ExpandableNotificationRow)) { searchView.getHitRect(mTmpRect); x -= mTmpRect.left; y -= mTmpRect.top; searchView = (View) searchView.getParent(); } view.getHitRect(mTmpRect); return mTmpRect.contains((int) x,(int) y); } @Override public void onContentUpdated(ExpandableNotificationRow row) { // Reinspect the notification. Before the super call, because the super call also updates Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationViewWrapper.java +22 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.graphics.Color; import android.graphics.ColorMatrix; import android.graphics.ColorMatrixColorFilter; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; Loading @@ -49,6 +50,7 @@ public abstract class NotificationViewWrapper implements TransformableView { protected final View mView; protected final ExpandableNotificationRow mRow; private final Rect mTmpRect = new Rect(); protected int mBackgroundColor = 0; Loading Loading @@ -305,6 +307,26 @@ public abstract class NotificationViewWrapper implements TransformableView { return false; } /** * Is a given x and y coordinate on a view. * * @param view the view to be checked * @param x the x coordinate, relative to the ExpandableNotificationRow * @param y the y coordinate, relative to the ExpandableNotificationRow * @return {@code true} if it is on the view */ protected boolean isOnView(View view, float x, float y) { View searchView = (View) view.getParent(); while (searchView != null && !(searchView instanceof ExpandableNotificationRow)) { searchView.getHitRect(mTmpRect); x -= mTmpRect.left; y -= mTmpRect.top; searchView = (View) searchView.getParent(); } view.getHitRect(mTmpRect); return mTmpRect.contains((int) x,(int) y); } public int getMinLayoutHeight() { return 0; } Loading