summaryrefslogtreecommitdiff
path: root/packages/PackageInstaller/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-09-19 17:15:25 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-09-19 17:17:17 -0700
commit70d5dd439d4dfd46cdefcfb0a5d3b4ad34f635d8 (patch)
tree47103ddda471b336af7d77d46935ab59bbdc9be0 /packages/PackageInstaller/src
parentc95add6ddc8902e6b5b30afccae1b16aa0f06a18 (diff)
Adding install reason when installing an apk
Since the installation involves a user visible UI, set the appropriate reason. This ensures that the app icon is added on the homescreen. Test: Installed an apk using the files app Bug: 65473379 Change-Id: I5032e31fc7615a63c2630687bc81e663f2286d59
Diffstat (limited to 'packages/PackageInstaller/src')
-rwxr-xr-xpackages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
index deb6163cbf9d..9f38d48da4ed 100755
--- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
@@ -137,6 +137,7 @@ public class InstallInstalling extends AlertActivity {
UID_UNKNOWN);
params.installerPackageName =
getIntent().getStringExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME);
+ params.installReason = PackageManager.INSTALL_REASON_USER;
File file = new File(mPackageURI.getPath());
try {