summaryrefslogtreecommitdiffstats
path: root/test-runner/android
diff options
context:
space:
mode:
authorSatish Sampath <satish@android.com>2009-06-02 23:35:54 +0100
committerSatish Sampath <satish@android.com>2009-06-03 07:54:42 +0100
commit8dbe612dc60526d635e57257b58627b33a099678 (patch)
tree2f02924de3a2e890aab2d4a75a1b52d2e2aa1328 /test-runner/android
parent5f784df5680e07f6cbc5d929560dfadc0e22db3b (diff)
downloadframeworks_base-8dbe612dc60526d635e57257b58627b33a099678.zip
frameworks_base-8dbe612dc60526d635e57257b58627b33a099678.tar.gz
frameworks_base-8dbe612dc60526d635e57257b58627b33a099678.tar.bz2
Adding internal method replacePreferredActivity.
This was required because we need a way to set the preferred activity for a particular intent filter based on user selection (in our case the ACTION_WEB_SEARCH intent filter for selecting the preferred search engine from the list of available search engines providers). The current addPreferredActivity call was not sufficient since it leaves the existing preferred activities in the list and does not remove them, which this call does.
Diffstat (limited to 'test-runner/android')
-rw-r--r--test-runner/android/test/mock/MockPackageManager.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/test-runner/android/test/mock/MockPackageManager.java b/test-runner/android/test/mock/MockPackageManager.java
index 73ae3b9..6ef5539 100644
--- a/test-runner/android/test/mock/MockPackageManager.java
+++ b/test-runner/android/test/mock/MockPackageManager.java
@@ -392,6 +392,16 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
+ /**
+ * @hide - to match hiding in superclass
+ */
+ @Override
+ public void replacePreferredActivity(IntentFilter filter,
+ int match, ComponentName[] set, ComponentName activity) {
+ throw new UnsupportedOperationException();
+ }
+
+
@Override
public void clearPackagePreferredActivities(String packageName) {
throw new UnsupportedOperationException();