Send max displayed position in search dialog click event
This is part of the fix for http://b/issue?id=2000655
This commit is contained in:
@@ -1227,6 +1227,8 @@ public class SearchManager
|
|||||||
public final static int CLICK = 2;
|
public final static int CLICK = 2;
|
||||||
public final static String CLICK_SEND_POSITION
|
public final static String CLICK_SEND_POSITION
|
||||||
= "DialogCursorProtocol.CLICK.sendPosition";
|
= "DialogCursorProtocol.CLICK.sendPosition";
|
||||||
|
public final static String CLICK_SEND_MAX_DISPLAY_POS
|
||||||
|
= "DialogCursorProtocol.CLICK.sendDisplayPosition";
|
||||||
public final static String CLICK_RECEIVE_SELECTED_POS
|
public final static String CLICK_RECEIVE_SELECTED_POS
|
||||||
= "DialogCursorProtocol.CLICK.receiveSelectedPosition";
|
= "DialogCursorProtocol.CLICK.receiveSelectedPosition";
|
||||||
|
|
||||||
|
|||||||
@@ -274,7 +274,9 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
|
|||||||
final Bundle request = new Bundle(1);
|
final Bundle request = new Bundle(1);
|
||||||
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.CLICK);
|
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.CLICK);
|
||||||
request.putInt(DialogCursorProtocol.CLICK_SEND_POSITION, position);
|
request.putInt(DialogCursorProtocol.CLICK_SEND_POSITION, position);
|
||||||
|
request.putInt(DialogCursorProtocol.CLICK_SEND_MAX_DISPLAY_POS, mMaxDisplayed);
|
||||||
final Bundle response = cursor.respond(request);
|
final Bundle response = cursor.respond(request);
|
||||||
|
mMaxDisplayed = -1;
|
||||||
mListItemToSelect = response.getInt(
|
mListItemToSelect = response.getInt(
|
||||||
DialogCursorProtocol.CLICK_RECEIVE_SELECTED_POS, SuggestionsAdapter.NONE);
|
DialogCursorProtocol.CLICK_RECEIVE_SELECTED_POS, SuggestionsAdapter.NONE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user