summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2012-04-16 14:18:09 -0700
committerDaisuke Miyakawa <dmiyakawa@google.com>2012-04-16 16:03:32 -0700
commit265974803a01b6a461a94f984bb6b1e5f1f48496 (patch)
tree2598ccd9fdd731d6fd4683cb49c1c5acc09e12db /telephony
parent32f038deabc516cb9e1420eee300a581c5692460 (diff)
downloadframeworks_base-265974803a01b6a461a94f984bb6b1e5f1f48496.zip
frameworks_base-265974803a01b6a461a94f984bb6b1e5f1f48496.tar.gz
frameworks_base-265974803a01b6a461a94f984bb6b1e5f1f48496.tar.bz2
Introduce cachedPhotoIcon for notification's large icon
Bug: 6336293 Change-Id: I492384fdb819dfd6574b0dbc84a0324c917c392c
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/CallerInfo.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index 5d1f758..b1a5872 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -18,6 +18,7 @@ package com.android.internal.telephony;
import android.content.Context;
import android.database.Cursor;
+import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.location.CountryDetector;
import android.net.Uri;
@@ -107,10 +108,33 @@ public class CallerInfo {
/**
* Drawable representing the caller image. This is essentially
* a cache for the image data tied into the connection /
- * callerinfo object. The isCachedPhotoCurrent flag indicates
- * if the image data needs to be reloaded.
+ * callerinfo object.
+ *
+ * This might be a high resolution picture which is more suitable
+ * for full-screen image view than for smaller icons used in some
+ * kinds of notifications.
+ *
+ * The {@link #isCachedPhotoCurrent} flag indicates if the image
+ * data needs to be reloaded.
*/
public Drawable cachedPhoto;
+ /**
+ * Bitmap representing the caller image which has possibly lower
+ * resolution than {@link #cachedPhoto} and thus more suitable for
+ * icons (like notification icons).
+ *
+ * In usual cases this is just down-scaled image of {@link #cachedPhoto}.
+ * If the down-scaling fails, this will just become null.
+ *
+ * The {@link #isCachedPhotoCurrent} flag indicates if the image
+ * data needs to be reloaded.
+ */
+ public Bitmap cachedPhotoIcon;
+ /**
+ * Boolean which indicates if {@link #cachedPhoto} and
+ * {@link #cachedPhotoIcon} is fresh enough. If it is false,
+ * those images aren't pointing to valid objects.
+ */
public boolean isCachedPhotoCurrent;
private boolean mIsEmergency;