Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4625e72 authored by Flavio Lerda's avatar Flavio Lerda
Browse files

Fix opening of grouped items.

Correctly broadcast the list of ids when opening a group item in the
call log.

Bug: 5152648
Change-Id: If4e487fa5a3c1d80651ff20c24cdd13b59b97ec0
parent 47cf7b66
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -84,7 +84,15 @@ public abstract class IntentProvider {
                    return null;
                }
                Intent intent = new Intent(context, CallDetailActivity.class);
                if (adapter.isGroupHeader(position)) {
                // Check if the first item is a voicemail.
                String voicemailUri = cursor.getString(CallLogQuery.VOICEMAIL_URI);
                if (voicemailUri != null) {
                    intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_URI,
                            Uri.parse(voicemailUri));
                }
                intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_START_PLAYBACK, false);

                if (groupSize > 1) {
                    // We want to restore the position in the cursor at the end.
                    long[] ids = new long[groupSize];
                    // Copy the ids of the rows in the group.
@@ -97,12 +105,6 @@ public abstract class IntentProvider {
                    // If there is a single item, use the direct URI for it.
                    intent.setData(ContentUris.withAppendedId(
                            Calls.CONTENT_URI_WITH_VOICEMAIL, id));
                    String voicemailUri = cursor.getString(CallLogQuery.VOICEMAIL_URI);
                    if (voicemailUri != null) {
                        intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_URI,
                                Uri.parse(voicemailUri));
                    }
                    intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_START_PLAYBACK, false);
                }
                return intent;
            }