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

Commit 6ddaa349 authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Send max displayed position in search dialog click event

This is part of the fix for http://b/issue?id=2000655
parent 0fdedd00
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1227,6 +1227,8 @@ public class SearchManager
        public final static int CLICK = 2;
        public final static String CLICK_SEND_POSITION
                = "DialogCursorProtocol.CLICK.sendPosition";
        public final static String CLICK_SEND_MAX_DISPLAY_POS
                = "DialogCursorProtocol.CLICK.sendDisplayPosition";
        public final static String CLICK_RECEIVE_SELECTED_POS
                = "DialogCursorProtocol.CLICK.receiveSelectedPosition";

+2 −0
Original line number Diff line number Diff line
@@ -274,7 +274,9 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
        final Bundle request = new Bundle(1);
        request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.CLICK);
        request.putInt(DialogCursorProtocol.CLICK_SEND_POSITION, position);
        request.putInt(DialogCursorProtocol.CLICK_SEND_MAX_DISPLAY_POS, mMaxDisplayed);
        final Bundle response = cursor.respond(request);
        mMaxDisplayed = -1;
        mListItemToSelect = response.getInt(
                DialogCursorProtocol.CLICK_RECEIVE_SELECTED_POS, SuggestionsAdapter.NONE);
    }