Merge "Use generic contact icon for notifications & messages"
This commit is contained in:
commit
014e31a62c
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -57,7 +57,7 @@ public class NotificationController {
|
|||
private final Context mContext;
|
||||
private final NotificationManager mNotificationManager;
|
||||
private final AudioManager mAudioManager;
|
||||
private final Bitmap mAppIcon;
|
||||
private final Bitmap mGenericSenderIcon;
|
||||
private final Clock mClock;
|
||||
|
||||
/** Constructor */
|
||||
|
@ -66,7 +66,8 @@ public class NotificationController {
|
|||
mNotificationManager = (NotificationManager) context.getSystemService(
|
||||
Context.NOTIFICATION_SERVICE);
|
||||
mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
mAppIcon = BitmapFactory.decodeResource(mContext.getResources(), R.mipmap.icon);
|
||||
mGenericSenderIcon = BitmapFactory.decodeResource(mContext.getResources(),
|
||||
R.drawable.ic_contact_picture);
|
||||
mClock = clock;
|
||||
}
|
||||
|
||||
|
@ -221,7 +222,7 @@ public class NotificationController {
|
|||
Notification.Builder builder = new Notification.Builder(mContext)
|
||||
.setSmallIcon(R.drawable.stat_notify_email_generic)
|
||||
.setWhen(mClock.getTime())
|
||||
.setLargeIcon(senderPhoto != null ? senderPhoto : mAppIcon)
|
||||
.setLargeIcon(senderPhoto != null ? senderPhoto : mGenericSenderIcon)
|
||||
.setContentTitle(getNotificationTitle(senderName, account.mDisplayName))
|
||||
.setContentText(subject)
|
||||
.setContentIntent(contentIntent);
|
||||
|
|
|
@ -544,11 +544,8 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
|
|||
showDefaultQuickContactBadgeImage();
|
||||
}
|
||||
|
||||
private static final Drawable sEmptyBadgeDrawable = new ColorDrawable(0xFF808080);
|
||||
|
||||
private void showDefaultQuickContactBadgeImage() {
|
||||
// STOPSHIP Show the default 'Andy' icon.
|
||||
mFromBadge.setImageDrawable(sEmptyBadgeDrawable);
|
||||
mFromBadge.setImageResource(R.drawable.ic_contact_picture);
|
||||
}
|
||||
|
||||
protected final void addTabFlags(int tabFlags) {
|
||||
|
|
Loading…
Reference in New Issue