Loading core/java/android/view/NotificationHeaderView.java +15 −1 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.ImageView; import android.widget.RemoteViews; Loading Loading @@ -230,6 +230,7 @@ public class NotificationHeaderView extends ViewGroup { public void setOnClickListener(@Nullable OnClickListener l) { mExpandClickListener = l; setOnTouchListener(mExpandClickListener != null ? mTouchListener : null); setFocusable(l != null); updateTouchListener(); } Loading Loading @@ -379,6 +380,19 @@ public class NotificationHeaderView extends ViewGroup { return this; } @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); if (mExpandClickListener != null) { AccessibilityNodeInfo.AccessibilityAction expand = new AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.ACTION_CLICK, getContext().getString( com.android.internal.R.string.expand_action_accessibility)); info.addAction(expand); } } public ImageView getExpandButton() { return mExpandButton; } Loading core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4263,7 +4263,7 @@ <string name="expand_button_content_description">Expand button</string> <!-- Accessibility action description on the expand button. --> <string name="expand_action_accessibility">Click to expand</string> <string name="expand_action_accessibility">toggle expansion</string> <!-- User visible name for USB MIDI Peripheral port --> <string name="usb_midi_peripheral_name">Android USB Peripheral Port</string> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2566,6 +2566,7 @@ <!-- WallpaperManager config --> <java-symbol type="string" name="config_wallpaperCropperPackage" /> <java-symbol type="string" name="expand_action_accessibility" /> <java-symbol type="id" name="textSpacerNoTitle" /> <java-symbol type="id" name="titleDividerNoCustom" /> Loading packages/SystemUI/res/values/strings.xml +6 −0 Original line number Diff line number Diff line Loading @@ -594,6 +594,12 @@ <!-- The overflow indicator shown when a group has more notification inside the group than the visible ones. An example is "+ 3" [CHAR LIMIT=5] --> <string name="notification_group_overflow_indicator">+ <xliff:g id="number" example="3">%s</xliff:g></string> <!-- Content description describing how many more notifications are in a group [CHAR LIMIT=NONE] --> <plurals name="notification_group_overflow_description"> <item quantity="one"><xliff:g id="number" example="1">%s</xliff:g> more notification inside.</item> <item quantity="other"><xliff:g id="number" example="3">%s</xliff:g> more notifications inside.</item> </plurals> <!-- Content description of button in notification inspector for system settings relating to notifications from this application [CHAR LIMIT=NONE] --> <string name="status_bar_notification_inspect_item_title">Notification settings</string> Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +22 −2 Original line number Diff line number Diff line Loading @@ -18,10 +18,9 @@ package com.android.systemui.statusbar; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.Nullable; import android.content.Context; import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.AnimationDrawable; Loading Loading @@ -181,6 +180,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { return object.getTranslation(); } }; private OnClickListener mOnClickListener; public boolean isGroupExpansionChanging() { if (isChildInGroup()) { Loading Loading @@ -382,6 +382,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mNotificationParent = childInGroup ? parent : null; mPrivateLayout.setIsChildInGroup(childInGroup); updateBackgroundForGroupState(); updateClickAndFocus(); if (mNotificationParent != null) { mNotificationParent.updateBackgroundForGroupState(); } Loading Loading @@ -593,6 +594,24 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mOnExpandClickListener = onExpandClickListener; } @Override public void setOnClickListener(@Nullable OnClickListener l) { super.setOnClickListener(l); mOnClickListener = l; updateClickAndFocus(); } private void updateClickAndFocus() { boolean normalChild = !isChildInGroup() || isGroupExpanded(); boolean clickable = mOnClickListener != null && normalChild; if (isFocusable() != normalChild) { setFocusable(normalChild); } if (isClickable() != clickable) { setClickable(clickable); } } public void setHeadsUpManager(HeadsUpManager headsUpManager) { mHeadsUpManager = headsUpManager; } Loading Loading @@ -1315,6 +1334,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if (mChildrenContainer != null) { mChildrenContainer.setChildrenExpanded(expanded); } updateClickAndFocus(); } public static void applyTint(View v, int color) { Loading Loading
core/java/android/view/NotificationHeaderView.java +15 −1 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.ImageView; import android.widget.RemoteViews; Loading Loading @@ -230,6 +230,7 @@ public class NotificationHeaderView extends ViewGroup { public void setOnClickListener(@Nullable OnClickListener l) { mExpandClickListener = l; setOnTouchListener(mExpandClickListener != null ? mTouchListener : null); setFocusable(l != null); updateTouchListener(); } Loading Loading @@ -379,6 +380,19 @@ public class NotificationHeaderView extends ViewGroup { return this; } @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); if (mExpandClickListener != null) { AccessibilityNodeInfo.AccessibilityAction expand = new AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.ACTION_CLICK, getContext().getString( com.android.internal.R.string.expand_action_accessibility)); info.addAction(expand); } } public ImageView getExpandButton() { return mExpandButton; } Loading
core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4263,7 +4263,7 @@ <string name="expand_button_content_description">Expand button</string> <!-- Accessibility action description on the expand button. --> <string name="expand_action_accessibility">Click to expand</string> <string name="expand_action_accessibility">toggle expansion</string> <!-- User visible name for USB MIDI Peripheral port --> <string name="usb_midi_peripheral_name">Android USB Peripheral Port</string> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2566,6 +2566,7 @@ <!-- WallpaperManager config --> <java-symbol type="string" name="config_wallpaperCropperPackage" /> <java-symbol type="string" name="expand_action_accessibility" /> <java-symbol type="id" name="textSpacerNoTitle" /> <java-symbol type="id" name="titleDividerNoCustom" /> Loading
packages/SystemUI/res/values/strings.xml +6 −0 Original line number Diff line number Diff line Loading @@ -594,6 +594,12 @@ <!-- The overflow indicator shown when a group has more notification inside the group than the visible ones. An example is "+ 3" [CHAR LIMIT=5] --> <string name="notification_group_overflow_indicator">+ <xliff:g id="number" example="3">%s</xliff:g></string> <!-- Content description describing how many more notifications are in a group [CHAR LIMIT=NONE] --> <plurals name="notification_group_overflow_description"> <item quantity="one"><xliff:g id="number" example="1">%s</xliff:g> more notification inside.</item> <item quantity="other"><xliff:g id="number" example="3">%s</xliff:g> more notifications inside.</item> </plurals> <!-- Content description of button in notification inspector for system settings relating to notifications from this application [CHAR LIMIT=NONE] --> <string name="status_bar_notification_inspect_item_title">Notification settings</string> Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +22 −2 Original line number Diff line number Diff line Loading @@ -18,10 +18,9 @@ package com.android.systemui.statusbar; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.Nullable; import android.content.Context; import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.AnimationDrawable; Loading Loading @@ -181,6 +180,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { return object.getTranslation(); } }; private OnClickListener mOnClickListener; public boolean isGroupExpansionChanging() { if (isChildInGroup()) { Loading Loading @@ -382,6 +382,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mNotificationParent = childInGroup ? parent : null; mPrivateLayout.setIsChildInGroup(childInGroup); updateBackgroundForGroupState(); updateClickAndFocus(); if (mNotificationParent != null) { mNotificationParent.updateBackgroundForGroupState(); } Loading Loading @@ -593,6 +594,24 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mOnExpandClickListener = onExpandClickListener; } @Override public void setOnClickListener(@Nullable OnClickListener l) { super.setOnClickListener(l); mOnClickListener = l; updateClickAndFocus(); } private void updateClickAndFocus() { boolean normalChild = !isChildInGroup() || isGroupExpanded(); boolean clickable = mOnClickListener != null && normalChild; if (isFocusable() != normalChild) { setFocusable(normalChild); } if (isClickable() != clickable) { setClickable(clickable); } } public void setHeadsUpManager(HeadsUpManager headsUpManager) { mHeadsUpManager = headsUpManager; } Loading Loading @@ -1315,6 +1334,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if (mChildrenContainer != null) { mChildrenContainer.setChildrenExpanded(expanded); } updateClickAndFocus(); } public static void applyTint(View v, int color) { Loading