diff options
author | Chris Wren <cwren@android.com> | 2015-12-15 13:49:16 -0500 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2015-12-15 13:49:16 -0500 |
commit | 940e63d2495e244b14f3b707730aa76a45c5c8e7 (patch) | |
tree | 0afc869834174a2bca0aed38bb6745d25951d2db | |
parent | 205fde7e15f6c304f91a022bae51f8720530425f (diff) | |
download | experimental-940e63d2495e244b14f3b707730aa76a45c5c8e7.tar.gz |
fix the listener sample to use the rebuilder
Change-Id: I92fdb9c1bbc975b334882f85d49a160fd383cfb2
-rw-r--r-- | NotificationListenerSample/src/com/android/example/notificationlistener/NotificationListenerActivity.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/NotificationListenerSample/src/com/android/example/notificationlistener/NotificationListenerActivity.java b/NotificationListenerSample/src/com/android/example/notificationlistener/NotificationListenerActivity.java index 7699d33..61040a0 100644 --- a/NotificationListenerSample/src/com/android/example/notificationlistener/NotificationListenerActivity.java +++ b/NotificationListenerSample/src/com/android/example/notificationlistener/NotificationListenerActivity.java @@ -17,6 +17,7 @@ package com.android.example.notificationlistener; import android.app.AlertDialog; import android.app.ListActivity; +import android.app.Notification; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; @@ -217,7 +218,9 @@ public class NotificationListenerActivity extends ListActivity { } child = mRecycledViews.get(sbn.getKey()); if (child == null) { - child = sbn.getNotification().contentView.apply(mContext, null); + Notification.Builder builder = + Notification.Builder.recoverBuilder(mContext, sbn.getNotification()); + child = builder.makeContentView().apply(mContext, null); } container.setTag(sbn); container.removeAllViews(); |