summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2016-10-12 23:19:19 +0000
committer android-build-merger <android-build-merger@google.com> 2016-10-12 23:19:19 +0000
commit342bc437bf60969a45d3fc28d58ce8d0f7cc6112 (patch)
tree047342326cef29ca549bc5a819ef0ff07fcb7e4c
parentcde80e68c6cc071d9afff5d1c2f1d98810a4d032 (diff)
parent7af536257107b9caaecee481095558db9eed320e (diff)
Fix Notification.Action.Builder copy constructor
am: 7af5362571 Change-Id: I0853e663b1895e2c45fad17cfee79202f3b14ef7
-rw-r--r--core/java/android/app/Notification.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 1103d9e900c1..0dd9c63c40c5 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1049,6 +1049,7 @@ public class Notification implements Parcelable
this(Icon.createWithResource("", icon), title, intent, new Bundle(), null, false);
}
+ /** Keep in sync with {@link Notification.Action.Builder#Builder(Action)}! */
private Action(Icon icon, CharSequence title, PendingIntent intent, Bundle extras,
RemoteInput[] remoteInputs, boolean allowGeneratedReplies) {
this.mIcon = icon;
@@ -1115,7 +1116,7 @@ public class Notification implements Parcelable
*/
@Deprecated
public Builder(int icon, CharSequence title, PendingIntent intent) {
- this(Icon.createWithResource("", icon), title, intent, new Bundle(), null);
+ this(Icon.createWithResource("", icon), title, intent);
}
/**
@@ -1125,7 +1126,7 @@ public class Notification implements Parcelable
* @param intent the {@link PendingIntent} to fire when users trigger this action
*/
public Builder(Icon icon, CharSequence title, PendingIntent intent) {
- this(icon, title, intent, new Bundle(), null);
+ this(icon, title, intent, new Bundle(), null, false);
}
/**
@@ -1134,12 +1135,13 @@ public class Notification implements Parcelable
* @param action the action to read fields from.
*/
public Builder(Action action) {
- this(action.getIcon(), action.title, action.actionIntent, new Bundle(action.mExtras),
- action.getRemoteInputs());
+ this(action.getIcon(), action.title, action.actionIntent,
+ new Bundle(action.mExtras), action.getRemoteInputs(),
+ action.getAllowGeneratedReplies());
}
private Builder(Icon icon, CharSequence title, PendingIntent intent, Bundle extras,
- RemoteInput[] remoteInputs) {
+ RemoteInput[] remoteInputs, boolean allowGeneratedReplies) {
mIcon = icon;
mTitle = title;
mIntent = intent;
@@ -1148,6 +1150,7 @@ public class Notification implements Parcelable
mRemoteInputs = new ArrayList<RemoteInput>(remoteInputs.length);
Collections.addAll(mRemoteInputs, remoteInputs);
}
+ mAllowGeneratedReplies = allowGeneratedReplies;
}
/**