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

Commit 9377738c authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Remove search dialog PRE_CLOSE event

This is part of the fix for http://b/issue?id=2000655
parent 6ddaa349
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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.
         */
+0 −20
Original line number Diff line number Diff line
@@ -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");