Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467 Merged-In: I9ac05f5da437030e1b5db082ddaf7959f82acccd Change-Id: Iaf8ebc4877a8276672354b45db0dd502c0f71bd3
This commit is contained in:
@@ -233,8 +233,13 @@ public class RecentConversationsPreferenceController extends AbstractPreferenceC
|
||||
private final Collator sCollator = Collator.getInstance();
|
||||
@Override
|
||||
public int compare(ConversationChannel o1, ConversationChannel o2) {
|
||||
int labelComparison = sCollator.compare(o1.getShortcutInfo().getLabel(),
|
||||
o2.getShortcutInfo().getLabel());
|
||||
int labelComparison = 0;
|
||||
if (o1.getShortcutInfo().getLabel() != null
|
||||
&& o2.getShortcutInfo().getLabel() != null) {
|
||||
labelComparison = sCollator.compare(
|
||||
o1.getShortcutInfo().getLabel().toString(),
|
||||
o2.getShortcutInfo().getLabel().toString());
|
||||
}
|
||||
|
||||
if (labelComparison == 0) {
|
||||
return o1.getNotificationChannel().getId().compareTo(
|
||||
|
@@ -163,7 +163,7 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity {
|
||||
View viewForPackage = LayoutInflater.from(this)
|
||||
.inflate(R.layout.notification_history_app_layout, null);
|
||||
|
||||
final View container = viewForPackage.findViewById(R.id.notification_list);
|
||||
final View container = viewForPackage.findViewById(R.id.notification_list_wrapper);
|
||||
container.setVisibility(View.GONE);
|
||||
View header = viewForPackage.findViewById(R.id.app_header);
|
||||
NotificationExpandButton expand = viewForPackage.findViewById(
|
||||
|
@@ -71,6 +71,11 @@ public class NotificationHistoryAdapter extends
|
||||
return new NotificationHistoryViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return mValues.get(position).hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final @NonNull NotificationHistoryViewHolder holder,
|
||||
int position) {
|
||||
@@ -85,7 +90,6 @@ public class NotificationHistoryAdapter extends
|
||||
.putExtra(EXTRA_APP_PACKAGE, hn.getPackage())
|
||||
.putExtra(EXTRA_CHANNEL_ID, hn.getChannelId())
|
||||
.putExtra(EXTRA_CONVERSATION_ID, hn.getConversationId());
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
holder.itemView.getContext().startActivityAsUser(intent, UserHandle.of(hn.getUserId()));
|
||||
};
|
||||
holder.itemView.setOnClickListener(onClick);
|
||||
|
@@ -40,7 +40,6 @@ public class NotificationHistoryRecyclerView extends RecyclerView {
|
||||
ItemTouchHelper touchHelper = new ItemTouchHelper(
|
||||
new DismissTouchHelper(0, ItemTouchHelper.START | ItemTouchHelper.END));
|
||||
touchHelper.attachToRecyclerView(this);
|
||||
setNestedScrollingEnabled(false);
|
||||
}
|
||||
|
||||
public void setOnItemSwipeDeleteListener(OnItemSwipeDeleteListener listener) {
|
||||
|
@@ -133,7 +133,6 @@ public class NotificationSbnAdapter extends
|
||||
.putExtra(EXTRA_APP_PACKAGE, sbn.getPackageName())
|
||||
.putExtra(EXTRA_CHANNEL_ID, sbn.getNotification().getChannelId())
|
||||
.putExtra(EXTRA_CONVERSATION_ID, sbn.getNotification().getShortcutId());
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
holder.itemView.getContext().startActivityAsUser(intent, UserHandle.of(userId));
|
||||
return true;
|
||||
});
|
||||
|
Reference in New Issue
Block a user