Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 847fd751 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Make large_icon in notification catch touches.

If it doesn't catch touches, the stream is dropped on floor, leaving
no event stream for swiping to intercept.  Also connect up
NotificationClicker to large_icon.

Bug: 5068171
Change-Id: I51e74dd1cdc2749554c591432a48fad35de993ff
parent 52f159c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:scaleType="center"
        android:clickable="true"
        />

    <com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
+15 −6
Original line number Diff line number Diff line
@@ -662,9 +662,12 @@ public class PhoneStatusBar extends StatusBar {
                // update the contentIntent
                final PendingIntent contentIntent = notification.notification.contentIntent;
                if (contentIntent != null) {
                    oldEntry.content.setOnClickListener(new NotificationClicker(contentIntent,
                                notification.pkg, notification.tag, notification.id));
                    final View.OnClickListener listener = new NotificationClicker(contentIntent,
                            notification.pkg, notification.tag, notification.id);
                    oldEntry.largeIcon.setOnClickListener(listener);
                    oldEntry.content.setOnClickListener(listener);
                } else {
                    oldEntry.largeIcon.setOnClickListener(null);
                    oldEntry.content.setOnClickListener(null);
                }
                // Update the icon.
@@ -779,9 +782,12 @@ public class PhoneStatusBar extends StatusBar {
        content.setOnFocusChangeListener(mFocusChangeListener);
        PendingIntent contentIntent = n.contentIntent;
        if (contentIntent != null) {
            content.setOnClickListener(new NotificationClicker(contentIntent, notification.pkg,
                        notification.tag, notification.id));
            final View.OnClickListener listener = new NotificationClicker(contentIntent,
                    notification.pkg, notification.tag, notification.id);
            largeIcon.setOnClickListener(listener);
            content.setOnClickListener(listener);
        } else {
            largeIcon.setOnClickListener(null);
            content.setOnClickListener(null);
        }

@@ -979,9 +985,12 @@ public class PhoneStatusBar extends StatusBar {
//        content.setOnFocusChangeListener(mFocusChangeListener);
        PendingIntent contentIntent = sbn.notification.contentIntent;
        if (contentIntent != null) {
            content.setOnClickListener(new NotificationClicker(contentIntent,
                        sbn.pkg, sbn.tag, sbn.id));
            final View.OnClickListener listener = new NotificationClicker(contentIntent,
                    sbn.pkg, sbn.tag, sbn.id);
            largeIcon.setOnClickListener(listener);
            content.setOnClickListener(listener);
        } else {
            largeIcon.setOnClickListener(null);
            content.setOnClickListener(null);
        }

+10 −4
Original line number Diff line number Diff line
@@ -838,9 +838,12 @@ public class TabletStatusBar extends StatusBar implements
                // update the contentIntent
                final PendingIntent contentIntent = notification.notification.contentIntent;
                if (contentIntent != null) {
                    oldEntry.content.setOnClickListener(new NotificationClicker(contentIntent,
                                notification.pkg, notification.tag, notification.id));
                    final View.OnClickListener listener = new NotificationClicker(contentIntent,
                            notification.pkg, notification.tag, notification.id);
                    oldEntry.largeIcon.setOnClickListener(listener);
                    oldEntry.content.setOnClickListener(listener);
                } else {
                    oldEntry.largeIcon.setOnClickListener(null);
                    oldEntry.content.setOnClickListener(null);
                }
                // Update the icon.
@@ -1766,9 +1769,12 @@ public class TabletStatusBar extends StatusBar implements
//        content.setOnFocusChangeListener(mFocusChangeListener);
        PendingIntent contentIntent = sbn.notification.contentIntent;
        if (contentIntent != null) {
            content.setOnClickListener(new NotificationClicker(contentIntent,
                        sbn.pkg, sbn.tag, sbn.id));
            final View.OnClickListener listener = new NotificationClicker(
                    contentIntent, sbn.pkg, sbn.tag, sbn.id);
            largeIcon.setOnClickListener(listener);
            content.setOnClickListener(listener);
        } else {
            largeIcon.setOnClickListener(null);
            content.setOnClickListener(null);
        }