summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-03-31 08:36:11 (GMT)
committerLinux Build Service Account <lnxbuild@localhost>2014-11-04 15:44:54 (GMT)
commit0fd24cf18d069ab837896e047710c4aeadefeeab (patch)
tree9f44304915b094764fd378f5daf918b40be207c4
parentef64fe49fda9fe6b0daa99beeb2debcafabe6590 (diff)
downloadandroid_packages_apps_PackageInstaller-staging/cm-12.0-caf.zip
android_packages_apps_PackageInstaller-staging/cm-12.0-caf.tar.gz
android_packages_apps_PackageInstaller-staging/cm-12.0-caf.tar.bz2
PackageInstaller: add judgement to check the Intent is validstaging/cm-12.0-caf
the package installer does not re-check the intent is valid when onClick. get launch intent by package name when called onClick method. CRs-Fixed: 637131 Change-Id: Ifc29df92fd84f53131dfcf8d915a7a642622067e
-rwxr-xr-xsrc/com/android/packageinstaller/InstallAppProgress.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/packageinstaller/InstallAppProgress.java b/src/com/android/packageinstaller/InstallAppProgress.java
index c8e4133..2f297e0 100755
--- a/src/com/android/packageinstaller/InstallAppProgress.java
+++ b/src/com/android/packageinstaller/InstallAppProgress.java
@@ -298,7 +298,11 @@ public class InstallAppProgress extends Activity implements View.OnClickListener
}
finish();
} else if(v == mLaunchButton) {
- startActivity(mLaunchIntent);
+ mLaunchIntent = getPackageManager().getLaunchIntentForPackage(
+ mAppInfo.packageName);
+ if (mLaunchIntent != null) {
+ startActivity(mLaunchIntent);
+ }
finish();
}
}