Loading res/layout/notification_sbn_log_row.xml +114 −101 Original line number Diff line number Diff line Loading @@ -18,10 +18,15 @@ android:layout_height="wrap_content" android:paddingTop="6dp" android:minHeight="48dp" android:orientation="vertical" android:background="?android:attr/selectableItemBackground" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:orientation="vertical" android:background="?android:attr/selectableItemBackground" > <LinearLayout Loading Loading @@ -129,4 +134,12 @@ /> </LinearLayout> </LinearLayout> <View android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="0.5dp" android:layout_marginTop="17dp" android:background="@color/material_grey_300" /> </LinearLayout> No newline at end of file src/com/android/settings/notification/history/NotificationHistoryActivity.java +0 −6 Original line number Diff line number Diff line Loading @@ -266,9 +266,6 @@ public class NotificationHistoryActivity extends Activity { mSnoozedRv.setLayoutManager(lm); mSnoozedRv.setAdapter( new NotificationSbnAdapter(NotificationHistoryActivity.this, mPm)); DividerItemDecoration dividerItemDecoration = new DividerItemDecoration( mSnoozedRv.getContext(), lm.getOrientation()); mSnoozedRv.addItemDecoration(dividerItemDecoration); mSnoozedRv.setNestedScrollingEnabled(false); if (snoozed == null || snoozed.length == 0) { Loading @@ -284,9 +281,6 @@ public class NotificationHistoryActivity extends Activity { mDismissedRv.setLayoutManager(dismissLm); mDismissedRv.setAdapter( new NotificationSbnAdapter(NotificationHistoryActivity.this, mPm)); DividerItemDecoration dismissDivider = new DividerItemDecoration( mDismissedRv.getContext(), dismissLm.getOrientation()); mDismissedRv.addItemDecoration(dismissDivider); mDismissedRv.setNestedScrollingEnabled(false); if (dismissed == null || dismissed.length == 0) { Loading src/com/android/settings/notification/history/NotificationSbnAdapter.java +1 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ public class NotificationSbnAdapter extends holder.setTitle(getTitleString(sbn.getNotification())); holder.setSummary(getTextString(mContext, sbn.getNotification())); holder.setPostedTime(sbn.getPostTime()); holder.setDividerVisible(position < (mValues.size() -1)); int userId = normalizeUserId(sbn); if (!mUserBadgeCache.containsKey(userId)) { Drawable profile = mContext.getPackageManager().getUserBadgeForDensity( Loading src/com/android/settings/notification/history/NotificationSbnViewHolder.java +6 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public class NotificationSbnViewHolder extends RecyclerView.ViewHolder { private final TextView mTitle; private final TextView mSummary; private final ImageView mProfileBadge; private final View mDivider; NotificationSbnViewHolder(View itemView) { super(itemView); Loading @@ -54,6 +55,7 @@ public class NotificationSbnViewHolder extends RecyclerView.ViewHolder { mTitle = itemView.findViewById(R.id.title); mSummary = itemView.findViewById(R.id.text); mProfileBadge = itemView.findViewById(R.id.profile_badge); mDivider = itemView.findViewById(R.id.divider); } void setSummary(CharSequence summary) { Loading Loading @@ -85,6 +87,10 @@ public class NotificationSbnViewHolder extends RecyclerView.ViewHolder { mProfileBadge.setVisibility(badge != null ? View.VISIBLE : View.GONE); } void setDividerVisible(boolean visible) { mDivider.setVisibility(visible ? View.VISIBLE : View.GONE); } void addOnClick(String pkg, int userId, PendingIntent pi) { Intent appIntent = itemView.getContext().getPackageManager() .getLaunchIntentForPackage(pkg); Loading Loading
res/layout/notification_sbn_log_row.xml +114 −101 Original line number Diff line number Diff line Loading @@ -18,10 +18,15 @@ android:layout_height="wrap_content" android:paddingTop="6dp" android:minHeight="48dp" android:orientation="vertical" android:background="?android:attr/selectableItemBackground" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:orientation="vertical" android:background="?android:attr/selectableItemBackground" > <LinearLayout Loading Loading @@ -129,4 +134,12 @@ /> </LinearLayout> </LinearLayout> <View android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="0.5dp" android:layout_marginTop="17dp" android:background="@color/material_grey_300" /> </LinearLayout> No newline at end of file
src/com/android/settings/notification/history/NotificationHistoryActivity.java +0 −6 Original line number Diff line number Diff line Loading @@ -266,9 +266,6 @@ public class NotificationHistoryActivity extends Activity { mSnoozedRv.setLayoutManager(lm); mSnoozedRv.setAdapter( new NotificationSbnAdapter(NotificationHistoryActivity.this, mPm)); DividerItemDecoration dividerItemDecoration = new DividerItemDecoration( mSnoozedRv.getContext(), lm.getOrientation()); mSnoozedRv.addItemDecoration(dividerItemDecoration); mSnoozedRv.setNestedScrollingEnabled(false); if (snoozed == null || snoozed.length == 0) { Loading @@ -284,9 +281,6 @@ public class NotificationHistoryActivity extends Activity { mDismissedRv.setLayoutManager(dismissLm); mDismissedRv.setAdapter( new NotificationSbnAdapter(NotificationHistoryActivity.this, mPm)); DividerItemDecoration dismissDivider = new DividerItemDecoration( mDismissedRv.getContext(), dismissLm.getOrientation()); mDismissedRv.addItemDecoration(dismissDivider); mDismissedRv.setNestedScrollingEnabled(false); if (dismissed == null || dismissed.length == 0) { Loading
src/com/android/settings/notification/history/NotificationSbnAdapter.java +1 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ public class NotificationSbnAdapter extends holder.setTitle(getTitleString(sbn.getNotification())); holder.setSummary(getTextString(mContext, sbn.getNotification())); holder.setPostedTime(sbn.getPostTime()); holder.setDividerVisible(position < (mValues.size() -1)); int userId = normalizeUserId(sbn); if (!mUserBadgeCache.containsKey(userId)) { Drawable profile = mContext.getPackageManager().getUserBadgeForDensity( Loading
src/com/android/settings/notification/history/NotificationSbnViewHolder.java +6 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public class NotificationSbnViewHolder extends RecyclerView.ViewHolder { private final TextView mTitle; private final TextView mSummary; private final ImageView mProfileBadge; private final View mDivider; NotificationSbnViewHolder(View itemView) { super(itemView); Loading @@ -54,6 +55,7 @@ public class NotificationSbnViewHolder extends RecyclerView.ViewHolder { mTitle = itemView.findViewById(R.id.title); mSummary = itemView.findViewById(R.id.text); mProfileBadge = itemView.findViewById(R.id.profile_badge); mDivider = itemView.findViewById(R.id.divider); } void setSummary(CharSequence summary) { Loading Loading @@ -85,6 +87,10 @@ public class NotificationSbnViewHolder extends RecyclerView.ViewHolder { mProfileBadge.setVisibility(badge != null ? View.VISIBLE : View.GONE); } void setDividerVisible(boolean visible) { mDivider.setVisibility(visible ? View.VISIBLE : View.GONE); } void addOnClick(String pkg, int userId, PendingIntent pi) { Intent appIntent = itemView.getContext().getPackageManager() .getLaunchIntentForPackage(pkg); Loading