diff options
author | John Reck <jreck@google.com> | 2011-09-22 14:59:33 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-09-22 15:04:50 -0700 |
commit | 1b7d2b95670a6c94cb29e0f4b965cebdf6f65bda (patch) | |
tree | c4e2ec9381ddea4adee9e292724ca46905a81551 /src/com/android/browser/search | |
parent | 03583db8ecd24aaafad290bd205fc44fe06d1061 (diff) | |
download | packages_apps_Browser-1b7d2b95670a6c94cb29e0f4b965cebdf6f65bda.zip packages_apps_Browser-1b7d2b95670a6c94cb29e0f4b965cebdf6f65bda.tar.gz packages_apps_Browser-1b7d2b95670a6c94cb29e0f4b965cebdf6f65bda.tar.bz2 |
Fix Resources.getIdentifier usage
Bug: 5352337
Change-Id: If639cf6dec892f2952f8eb3fedbb267e4cc7c0ae
Diffstat (limited to 'src/com/android/browser/search')
-rw-r--r-- | src/com/android/browser/search/SearchEngineInfo.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/browser/search/SearchEngineInfo.java b/src/com/android/browser/search/SearchEngineInfo.java index af6fa70..ec304f6 100644 --- a/src/com/android/browser/search/SearchEngineInfo.java +++ b/src/com/android/browser/search/SearchEngineInfo.java @@ -21,6 +21,8 @@ import android.content.res.Resources.NotFoundException; import android.text.TextUtils; import android.util.Log; +import com.android.browser.R; + import java.net.URLEncoder; import java.util.Arrays; import java.util.Locale; @@ -61,7 +63,8 @@ public class SearchEngineInfo { mName = name; Resources res = context.getResources(); - int id_data = res.getIdentifier(name, "array", context.getPackageName()); + String packageName = R.class.getPackage().getName(); + int id_data = res.getIdentifier(name, "array", packageName); if (id_data == 0) { throw new IllegalArgumentException("No resources found for " + name); } |