Hiding subtext of children notifications now

If the parent header already displays the email
we don’t want to display it again in the child.

Bug: 24866646
Change-Id: I3aee62e895fef68b059a61a825eef37f0f8ad875
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 026c5f7..b8df139 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -33,9 +33,9 @@
 
 import com.android.systemui.R;
 import com.android.systemui.classifier.FalsingManager;
+import com.android.systemui.statusbar.notification.NotificationHeaderView;
 import com.android.systemui.statusbar.phone.NotificationGroupManager;
 import com.android.systemui.statusbar.stack.NotificationChildrenContainer;
-import com.android.systemui.statusbar.notification.NotificationHeaderView;
 import com.android.systemui.statusbar.stack.StackScrollState;
 import com.android.systemui.statusbar.stack.StackStateAnimator;
 import com.android.systemui.statusbar.stack.StackViewState;
@@ -378,6 +378,19 @@
         setStatusBarNotification(entry.notification);
     }
 
+    public CharSequence getSubText() {
+        Notification notification = mStatusBarNotification.getNotification();
+        CharSequence subText = notification.extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT);
+        if (subText == null) {
+            subText = notification.extras.getCharSequence(Notification.EXTRA_SUB_TEXT);
+        }
+        return subText;
+    }
+
+    public void setContentSubTextVisible(boolean visible) {
+        mPrivateLayout.setSubTextVisible(visible);
+    }
+
     public interface ExpansionLogger {
         public void logNotificationExpansion(String key, boolean userAction, boolean expanded);
     }