OSDN Git Service

Use Search.SOURCE from android-common
authorBjorn Bringert <bringert@android.com>
Wed, 10 Feb 2010 14:22:12 +0000 (14:22 +0000)
committerBjorn Bringert <bringert@android.com>
Wed, 10 Feb 2010 14:22:12 +0000 (14:22 +0000)
The SOURCE (search source identifier) constant is moving
from hidden in android.app.SearchManager to com.android.common.Search.

Part of http://b/issue?id=2429556

Change-Id: I4eee5dbac6f0cee2947175915186a17d06dd9fec

Android.mk
src/com/android/browser/BrowserActivity.java

index b9a46f4..537ad60 100644 (file)
@@ -3,7 +3,9 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_STATIC_JAVA_LIBRARIES := gsf-client
+LOCAL_STATIC_JAVA_LIBRARIES := \
+        android-common \
+        gsf-client
 
 LOCAL_SRC_FILES := \
         $(call all-subdir-java-files) \
index 864d688..53e506a 100644 (file)
@@ -111,6 +111,7 @@ import android.accounts.OperationCanceledException;
 import android.accounts.AccountManagerCallback;
 
 import com.android.common.Patterns;
+import com.android.common.Search;
 import com.android.common.speech.LoggingEvents;
 
 import com.google.android.gsf.GoogleLoginServiceConstants;
@@ -718,7 +719,7 @@ public class BrowserActivity extends Activity
                         String source = null;
                         final Bundle appData = intent.getBundleExtra(SearchManager.APP_DATA);
                         if (appData != null) {
-                            source = appData.getString(SearchManager.SOURCE);
+                            source = appData.getString(Search.SOURCE);
                         }
                         if (TextUtils.isEmpty(source)) {
                             source = GOOGLE_SEARCH_SOURCE_UNKNOWN;
@@ -1332,7 +1333,7 @@ public class BrowserActivity extends Activity
 
     private Bundle createGoogleSearchSourceBundle(String source) {
         Bundle bundle = new Bundle();
-        bundle.putString(SearchManager.SOURCE, source);
+        bundle.putString(Search.SOURCE, source);
         return bundle;
     }