summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2016-10-12 23:33:11 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-10-12 23:33:11 +0000
commitd92272138df5a844b766415ce2d91a6806ebc130 (patch)
treebf9bde91389d2087b84785ad3b52b26505d4661f /core/java
parenta6abb1031f190bb0ac6ffaa87318d82df704e4bd (diff)
parent7bc84b803dd4a0a26418662e9802a67a2d8f35ca (diff)
Fix Notification.Action.Builder copy constructor am: 7af5362571 am: 342bc437bf
am: 7bc84b803d Change-Id: Ice60b61b4868d775b04423e7166182db382d28b2
Diffstat (limited to 'core/java')
-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 7be77c5548b7..bdb26855c241 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1053,6 +1053,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;
@@ -1119,7 +1120,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);
}
/**
@@ -1129,7 +1130,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);
}
/**
@@ -1138,12 +1139,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;
@@ -1152,6 +1154,7 @@ public class Notification implements Parcelable
mRemoteInputs = new ArrayList<RemoteInput>(remoteInputs.length);
Collections.addAll(mRemoteInputs, remoteInputs);
}
+ mAllowGeneratedReplies = allowGeneratedReplies;
}
/**