Merge \"Fixed a bug with a legacy notification API\" into nyc-dev

am: 05e19bba37

Change-Id: I419b48b3a4e73b5cc1c7597d885541f4b163a00f
This commit is contained in:
Selim Cinek
2016-06-14 17:02:39 +00:00
committed by android-build-merger

View File

@@ -1986,6 +1986,10 @@ public class Notification implements Parcelable
new Throwable());
}
if (context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.N) {
extras.putBoolean(EXTRA_SHOW_WHEN, true);
}
// ensure that any information already set directly is preserved
final Notification.Builder builder = new Notification.Builder(context, this);
@@ -2269,6 +2273,14 @@ public class Notification implements Parcelable
Collections.addAll(mPersonList, mN.extras.getStringArray(EXTRA_PEOPLE));
}
if (mN.getSmallIcon() == null && mN.icon != 0) {
setSmallIcon(mN.icon);
}
if (mN.getLargeIcon() == null && mN.largeIcon != null) {
setLargeIcon(mN.largeIcon);
}
String templateClass = mN.extras.getString(EXTRA_TEMPLATE);
if (!TextUtils.isEmpty(templateClass)) {
final Class<? extends Style> styleClass