Fixes cloned notification actions missing icon.

This change modifies the Notification.Action constructor
to populate the deprecated "icon" field based on the provided icon.
This field is still used by NotificationCompatApi20
to create a NotificationCompatBase.Action from a Notification.Action.

Bug: 23348968
Bug: 22591778
Change-Id: I3576038384d2baa12c4c75bc4124e3859aacbd13
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 9381327..55aec59 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -953,6 +953,9 @@
         private Action(Icon icon, CharSequence title, PendingIntent intent, Bundle extras,
                 RemoteInput[] remoteInputs) {
             this.mIcon = icon;
+            if (icon != null && icon.getType() == Icon.TYPE_RESOURCE) {
+                this.icon = icon.getResId();
+            }
             this.title = title;
             this.actionIntent = intent;
             this.mExtras = extras != null ? extras : new Bundle();