am a50d4508: Merge change I75481cb8 into eclair-mr2

Merge commit 'a50d450863cb84805ac6809a4c1f7b83984da1ee' into eclair-mr2-plus-aosp

* commit 'a50d450863cb84805ac6809a4c1f7b83984da1ee':
  Check that the resolved activity is not in our package.
This commit is contained in:
Patrick Scott
2009-12-09 15:59:44 -08:00
committed by Android Git Automerger

View File

@@ -376,8 +376,9 @@ class LoadListener extends Handler implements EventHandler {
i.setDataAndType(Uri.parse(url()), mMimeType);
ResolveInfo info = mContext.getPackageManager().resolveActivity(i,
PackageManager.MATCH_DEFAULT_ONLY);
if (info != null) {
// someone (other than the current activity) knows how to
if (info != null && !mContext.getPackageName().equals(
info.activityInfo.packageName)) {
// someone (other than the current app) knows how to
// handle this mime type.
try {
mContext.startActivity(i);