diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-02 22:54:43 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-02 22:54:43 -0800 |
commit | 2fa4ad8141ed0cb686c7acab27f01e8c2bc2877a (patch) | |
tree | 59fc988de9bdfbca4bcf0b946d29bceda657fa7c /src/com/android/packageinstaller/PackageUtil.java | |
parent | 9162d55f6dd35c1c4e76a27876435d17c0a5d14b (diff) | |
download | packages_apps_packageinstaller-2fa4ad8141ed0cb686c7acab27f01e8c2bc2877a.zip packages_apps_packageinstaller-2fa4ad8141ed0cb686c7acab27f01e8c2bc2877a.tar.gz packages_apps_packageinstaller-2fa4ad8141ed0cb686c7acab27f01e8c2bc2877a.tar.bz2 |
auto import from //depot/cupcake/@137055
Diffstat (limited to 'src/com/android/packageinstaller/PackageUtil.java')
-rw-r--r-- | src/com/android/packageinstaller/PackageUtil.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/com/android/packageinstaller/PackageUtil.java b/src/com/android/packageinstaller/PackageUtil.java index 6dc782d..b36bcf2 100644 --- a/src/com/android/packageinstaller/PackageUtil.java +++ b/src/com/android/packageinstaller/PackageUtil.java @@ -118,29 +118,4 @@ public class PackageUtil { } return false; } - - /** - * Returns an intent that can be used to launch the main activity in the given package. - * - * @param ctx - * @param packageName - * @return an intent launching the main activity in the given package - */ - public static Intent getLaunchIntentForPackage(Context ctx, String packageName) { - Intent intent = new Intent(Intent.ACTION_MAIN); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - PackageManager manager = ctx.getPackageManager(); - Intent intentToResolve = new Intent(Intent.ACTION_MAIN, null); - intentToResolve.addCategory(Intent.CATEGORY_LAUNCHER); - final List<ResolveInfo> apps = - manager.queryIntentActivities(intentToResolve, 0); - // TODO in future add a new tag to application for launchable main activity - for (ResolveInfo app : apps) { - if (app.activityInfo.packageName.equals(packageName)) { - intent.setClassName(packageName, app.activityInfo.name); - return intent; - } - } - return null; - } } |