Fixed an issue when pulling down from heads up

When pulling down from above the notification, the heads
up wouldn't become unpinned and the shade expanded instead.

Test: pull down from HUN above HUN
Fixes: 	78458244

Change-Id: I3bf724f100a3cba1fa09e1de35041e4552ed81ff
This commit is contained in:
Selim Cinek
2018-05-04 13:42:46 -07:00
parent 150bafd217
commit 8032708409

View File

@@ -23,6 +23,7 @@ import android.view.ViewConfiguration;
import com.android.systemui.Gefingerpoken;
import com.android.systemui.statusbar.ExpandableNotificationRow;
import com.android.systemui.statusbar.ExpandableView;
import com.android.systemui.statusbar.NotificationData;
import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
/**
@@ -80,6 +81,14 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
mPickedChild = (ExpandableNotificationRow) child;
mTouchingHeadsUpView = !mStackScroller.isExpanded()
&& mPickedChild.isHeadsUp() && mPickedChild.isPinned();
} else if (child == null && !mStackScroller.isExpanded()) {
// We might touch above the visible heads up child, but then we still would
// like to capture it.
NotificationData.Entry topEntry = mHeadsUpManager.getTopEntry();
if (topEntry != null && topEntry.row.isPinned()) {
mPickedChild = topEntry.row;
mTouchingHeadsUpView = true;
}
}
break;
case MotionEvent.ACTION_POINTER_UP: