Remove search dialog PRE_CLOSE event
This is part of the fix for http://b/issue?id=2000655
This commit is contained in:
@@ -1214,13 +1214,6 @@ public class SearchManager
|
||||
public final static String POST_REFRESH_RECEIVE_DISPLAY_NOTIFY
|
||||
= "DialogCursorProtocol.POST_REFRESH.displayNotify";
|
||||
|
||||
/**
|
||||
* Just before closing the cursor.
|
||||
*/
|
||||
public final static int PRE_CLOSE = 1;
|
||||
public final static String PRE_CLOSE_SEND_MAX_DISPLAY_POS
|
||||
= "DialogCursorProtocol.PRE_CLOSE.sendDisplayPosition";
|
||||
|
||||
/**
|
||||
* When a position has been clicked.
|
||||
*/
|
||||
|
||||
@@ -194,10 +194,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
|
||||
public void changeCursor(Cursor c) {
|
||||
if (DBG) Log.d(LOG_TAG, "changeCursor(" + c + ")");
|
||||
|
||||
if (mCursor != null) {
|
||||
callCursorPreClose(mCursor);
|
||||
}
|
||||
|
||||
try {
|
||||
super.changeCursor(c);
|
||||
if (c != null) {
|
||||
@@ -213,22 +209,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle sending and receiving information associated with
|
||||
* {@link DialogCursorProtocol#PRE_CLOSE}.
|
||||
*
|
||||
* @param cursor The cursor to call.
|
||||
*/
|
||||
private void callCursorPreClose(Cursor cursor) {
|
||||
if (!mGlobalSearchMode) return;
|
||||
final Bundle request = new Bundle();
|
||||
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.PRE_CLOSE);
|
||||
request.putInt(DialogCursorProtocol.PRE_CLOSE_SEND_MAX_DISPLAY_POS, mMaxDisplayed);
|
||||
final Bundle response = cursor.respond(request);
|
||||
|
||||
mMaxDisplayed = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyDataSetChanged() {
|
||||
if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged");
|
||||
|
||||
Reference in New Issue
Block a user