summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/SuggestionsAdapter.java
diff options
context:
space:
mode:
authorKarl Rosaen <krosaen@android.com>2009-06-04 17:59:44 +0100
committerKarl Rosaen <krosaen@android.com>2009-06-04 17:59:44 +0100
commit320b2eeeea426dc06f7bb7f37c3d795babeb6adb (patch)
treec205b15188db42eac9871fd4c25f2e7791dce5ae /core/java/android/app/SuggestionsAdapter.java
parent1c54cf0903cd81467ca41ec6733c459e10b22763 (diff)
downloadframeworks_base-320b2eeeea426dc06f7bb7f37c3d795babeb6adb.zip
frameworks_base-320b2eeeea426dc06f7bb7f37c3d795babeb6adb.tar.gz
frameworks_base-320b2eeeea426dc06f7bb7f37c3d795babeb6adb.tar.bz2
SearchDialog should only do DialogCursorProtocol stuff when in global search mode.
Diffstat (limited to 'core/java/android/app/SuggestionsAdapter.java')
-rw-r--r--core/java/android/app/SuggestionsAdapter.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/SuggestionsAdapter.java b/core/java/android/app/SuggestionsAdapter.java
index 48d8d12..e515594 100644
--- a/core/java/android/app/SuggestionsAdapter.java
+++ b/core/java/android/app/SuggestionsAdapter.java
@@ -149,6 +149,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
* @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);
@@ -178,6 +179,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
* @param cursor The cursor to call.
*/
private void callCursorPostRefresh(Cursor cursor) {
+ if (!mGlobalSearchMode) return;
final Bundle request = new Bundle();
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.POST_REFRESH);
final Bundle response = cursor.respond(request);
@@ -197,6 +199,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
* @param position The position that was clicked.
*/
void callCursorOnClick(Cursor cursor, int position) {
+ if (!mGlobalSearchMode) return;
final Bundle request = new Bundle(1);
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.CLICK);
request.putInt(DialogCursorProtocol.CLICK_SEND_POSITION, position);
@@ -244,7 +247,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
}
// if the cursor wishes to be notified about this position, send it
- if (mDisplayNotifyPos != NONE && pos == mDisplayNotifyPos) {
+ if (mGlobalSearchMode && mDisplayNotifyPos != NONE && pos == mDisplayNotifyPos) {
final Bundle request = new Bundle();
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.THRESH_HIT);
mCursor.respond(request);