summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/Notification.java
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2012-05-22 15:11:52 -0400
committerChris Wren <cwren@android.com>2012-05-22 17:47:33 -0400
commit3745a3da759a9510554c8d2c59f09185e52ed403 (patch)
treee015ee36529b145449df9373046e2af99d42b2aa /core/java/android/app/Notification.java
parent0eaeb69d1c4849da8ab1df70b84e90837193df67 (diff)
downloadframeworks_base-3745a3da759a9510554c8d2c59f09185e52ed403.zip
frameworks_base-3745a3da759a9510554c8d2c59f09185e52ed403.tar.gz
frameworks_base-3745a3da759a9510554c8d2c59f09185e52ed403.tar.bz2
BigPicture notifications for screenshots.
Needed a little extra help from the builder to make this happen (like the title, you might want a different largeIcon in the expanded view if---as in this case---it is redundant with the big picture). Needed to fix BigPicture template to reveal actions. Bug: 6289107 Change-Id: I19dc62e693ee2c87cbe82f7327fe9115768b4102
Diffstat (limited to 'core/java/android/app/Notification.java')
-rw-r--r--core/java/android/app/Notification.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 618f1f8..3ced82b 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1689,6 +1689,8 @@ public class Notification implements Parcelable
*/
public static class BigPictureStyle extends Style {
private Bitmap mPicture;
+ private Bitmap mBigLargeIcon;
+ private boolean mBigLargeIconSet = false;
public BigPictureStyle() {
}
@@ -1719,6 +1721,16 @@ public class Notification implements Parcelable
return this;
}
+ /**
+ * @hide
+ * Override the large icon when the big notification is shown.
+ */
+ public BigPictureStyle bigLargeIcon(Bitmap b) {
+ mBigLargeIconSet = true;
+ mBigLargeIcon = b;
+ return this;
+ }
+
private RemoteViews makeBigContentView() {
RemoteViews contentView = getStandardView(R.layout.notification_template_big_picture);
@@ -1731,6 +1743,9 @@ public class Notification implements Parcelable
public Notification build() {
checkBuilder();
Notification wip = mBuilder.buildUnstyled();
+ if (mBigLargeIconSet ) {
+ mBuilder.mLargeIcon = mBigLargeIcon;
+ }
wip.bigContentView = makeBigContentView();
return wip;
}