summaryrefslogtreecommitdiffstats
path: root/src/com/android/packageinstaller/PackageInstallerActivity.java
Commit message (Collapse)AuthorAgeFilesLines
* Support install once feature.Philip P. Moltmann2016-10-131-8/+18
| | | | | | | Test: Simulated OK result from settings and triggered run-once workflow Fixes: 32105068 Change-Id: I9f6c3b56b09d520d2bc9c6eeb6c75f151e3f1aff
* Parse package before enabling unknown sourcesPhilip P. Moltmann2016-09-271-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | So that when we return from the settings app we do not have distinguish between file and content-uri based install anymore Test: Manually went through the following workflows: - Install from file - Unknown sources is already enabled - Unknown sources is not enabled yet - Return 0 from settings - unknown sources was enabled - unknown sources was not enabled - Return -1 from settings - unknown sources was enabled - unknown sources was not enabled - Install from content URI - Unknown sources is already enabled - Unknown sources is not enabled yet - Return 0 from settings - unknown sources was enabled - unknown sources was not enabled - Return -1 from settings - unknown sources was enabled - unknown sources was not enabled Fixes: 31328285 Change-Id: I1d23f2ba9a835f7bffc59108565b286aeb675411
* Trigger transparency dialog only if restriction is set by admin.Sudheer Shanka2016-07-121-5/+11
| | | | | Bug: 30104199 Change-Id: I97a16938c36b4dadc9167652f6297acf829366e9
* Fix a crash in package installerSvet Ganov2016-06-081-1/+1
| | | | | | | | | | | | The first bug was that we were starting the install before having the package info for the installed app. The second was that we were calling the permission review UI despite we were there before the user selected to install. i.e. the user already reviewed the permissions. bug:29197887 Change-Id: I2fac4d014dde7f7744a6b831c2b0ff510e29e8e8
* Show installer UI for user to confirm side-loadingSvetoslav Ganov2016-06-011-7/+1
| | | | | | | | | This change fixes a regression where we stopped showing a confirmation UI for an app side-loading. bug:28551937 Change-Id: Ia2114d273473d6e00696f9de8c523190a1b444ad
* Finish package installer activity on a cancel resultSvetoslav Ganov2016-05-181-0/+3
| | | | | | | | | | | | | We made a change to the PackageInstaller to start settings for a result to allow partners to return OK to continue the install flow, otherwise requiring the user to start install again (the desired behavior on Nexus). This change finishes the package installer activity if settings does not return success to continue the install flow. bug:28838075 Change-Id: I4ff1b1a713d46a8584baf66f379ab070226c125f
* Merge "Add missing else statement" into nyc-devSvetoslav Ganov2016-05-181-2/+2
|\
| * Add missing else statementSvet Ganov2016-05-181-2/+2
| | | | | | | | | | | | | | | | | | This change fixes a regression where we endup installing apps even if unknown sources is disabled - missing else statement. bug:28551937 Change-Id: I05dd28a28eb9ffd9eda8a6ee2fdccd501d2e08d1
* | Merge "Finish whole installation on cancel dialog." into nyc-devPhilip P. Moltmann2016-05-131-1/+1
|\ \
| * | Finish whole installation on cancel dialog.Philip P. Moltmann2016-05-111-1/+1
| |/ | | | | | | | | | | | | | | If the user does not want to enable "unknown sources" and clicks "cancel" the whole installation should finish. Fixes: 28683865 Change-Id: I2582141ea777e5b2e14dd690b3c3fb8039cff2d4
* | Merge "Fine tune UI of package installer." into nyc-devPhilip P. Moltmann2016-05-121-1/+3
|\ \
| * | Fine tune UI of package installer.Philip P. Moltmann2016-05-121-1/+3
| |/ | | | | | | | | | | | | | | | | | | This fixes two screens in the case no permissions are required. - Do not remove tabs, just make them invisible. This is required to push the "OK" and "CANCEL" button to the bottom - Show spacer under text as this looks prettier. Fixes: 28746145 Change-Id: Ia312b476c7e3944709ed3f8fd71d12268559257f
* / Fix app install flowSvetoslav Ganov2016-05-101-3/+2
|/ | | | | | | | | | | | | | | | | A regression was introduced when we added support for installing apps from content URIs. Since we stage the APK in the cache folder we changed the flow to wipe the cached version when the PackageInstallerActivity finishes or gets an installation result, so we started the InstallAppProgress activity for result but the latter may be called with the forward result flag which is incompatible with start activity for result. This change delegates clearing the staging file in the cache folder to the InstallAppProgress activity. bug:28551937 Change-Id: I0d9978aff60b7fab6b64fe7bf889ef30f9b2fd7c
* Cleanup of the PackageInstaller API - PackageInstallerSvet Ganov2016-04-211-2/+1
| | | | | | | | | The PackageInstaller app manages side-loading apps as well as permission management. It should be updatable, hence should rely on system APIs to talk to the platform. This is the first step of defining an API boundary. Change-Id: I37aea1e5cc3195b8b636af6790af45fe5a9765cd
* Show spacer when staging appPhilip P. Moltmann2016-04-111-0/+1
| | | | Change-Id: Iba35b172c03e971d2ef9864ddb86534f163b5993
* Merge "Make side-load install path material design-y" into nyc-devPhilip P. Moltmann2016-04-081-3/+1
|\
| * Make side-load install path material design-yPhilip P. Moltmann2016-04-071-3/+1
| | | | | | | | | | Bug: 26932948 Change-Id: Ic8bcec523fc6cd0db847a4575724fbe465e65c5d
* | Remove dialog titles from simple package installer dialogs.Philip P. Moltmann2016-04-081-29/+0
|/ | | | | | | | | | | | - Checked the wording of the content of the dialogs and I think the title does not add any information. Design guidelines discourage dialog titles. - Removed unused dialog type - Removed now unused strings - Spell corrected a string Bug: 5526317 Change-Id: I7d125d92ef3a2fb3fd6fd402af8d2422c0d8b869
* Pick up the right package install URIBenjamin Franz2016-03-151-1/+1
| | | | | Bug: 27645571 Change-Id: I824198b0eefea08ee3f0fa4f4f9267a557d21166
* Don't crash installerTodd Kennedy2016-03-101-0/+8
| | | | | | | | When starting the installer without a URI, it would crash. Don't do that. Bug: 26450627 Change-Id: I2b0d452c12c0fc695326200617c5284f60a9e45b
* Support app install from a content URISvet Ganov2016-03-051-67/+203
| | | | | | bug:24079113 Change-Id: Ide1aa1667370f6b8d00ff269ef28992589656e9a
* Show support dialog when admin disallows installs from unknown sources.Sudheer Shanka2016-02-081-2/+4
| | | | | Bug: 26737249 Change-Id: I2a58b2eae34319ecc51ffc42078ed0cfe2460c60
* Merge "Improve untrusted sources UX for app side-loading" am: c23d802958Svetoslav Ganov2016-01-151-6/+17
|\ | | | | | | | | | | | | am: e3ebb33a49 * commit 'e3ebb33a49099621c08edf07f40a06a4d0429cf3': Improve untrusted sources UX for app side-loading
| * Merge "Improve untrusted sources UX for app side-loading"Svetoslav Ganov2016-01-151-6/+17
| |\
| | * Improve untrusted sources UX for app side-loadingSvetoslav Ganov2016-01-141-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an app is side-loaded we request the user to enable installs from untrusted sources by sending them to setting. After the user enables untrusted sources they have to start the install again instead of continuing from where they were interrupted by the settings UI. With this change the settings activity is started for a result by the package installer, so if the settings app wants to support non-interruptive side- loading flow it can check whether the calling package is the instaler and if true finish itself returning RESULT_OK. bug:26510156 Change-Id: I32d63b7535a84fa2b5b8837cff7d09f6de4a3475
* | | Merge "Revert "Improve untrusted sources UX for app side-loading"" am: ↵Svetoslav Ganov2016-01-141-15/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | b02596cdfc am: 4f63fa7baf * commit '4f63fa7baf2115253ffcc06decefff4fec545865': Revert "Improve untrusted sources UX for app side-loading"
| * | Merge "Revert "Improve untrusted sources UX for app side-loading""Svetoslav Ganov2016-01-141-15/+6
| |\ \
| | * | Revert "Improve untrusted sources UX for app side-loading"Svetoslav Ganov2016-01-141-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3ce5984c09403c0ef09f0826f5fe18520192bec2. Change-Id: Ib2192354ef8851f3d9e14d27f767c799f93d133e
* | | | Merge "Improve untrusted sources UX for app side-loading" am: 5bf65a7c43Svetoslav Ganov2016-01-131-6/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | am: a42415ed53 * commit 'a42415ed530461cd5a7ce7bfb44ff4f2caf42782': Improve untrusted sources UX for app side-loading
| * | | Merge "Improve untrusted sources UX for app side-loading"Svetoslav Ganov2016-01-131-6/+15
| |\| |
| | * | Improve untrusted sources UX for app side-loadingSvetoslav Ganov2016-01-121-6/+15
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an app is side-loaded we request the user to enable installs from untrusted sources by sending them to setting. After the user enables untrusted sources they have to start the install again instead of continuing from where they were interrupted by the settings UI. With this change the settings activity is started for a result by the package installer, so if the settings app wants to support non-interruptive side- loading flow it can check whether the calling package is the instaler and if true finish itself returning RESULT_OK. Change-Id: I893f48ecfa0ccece8623e0393a59da307ed4aa5b
| * / Use PackageInstaller.SessionTodd Kennedy2016-01-071-2/+8
| |/ | | | | | | | | | | | | | | | | We've been using the deprecated package manager installation methods. Replace those with the PackageInstaller.Session installation mechanism. Bug: 22282121 Change-Id: I34aefcbae2703c400a7ed35780f61713992b7181
* | No need to pass digest of AndroidManifest.xml around.Alex Klyubin2016-01-041-4/+0
| | | | | | | | | | | | | | | | | | PackageInstaller app is using the new Package Installer API (android.content.pm.PackageInstaller) which removes the need to pass the digest of AndroidManifest.xml around. Bug: 24542768 Change-Id: I477b8f955b3af11bdd3cb88a9d8187ccb6449000
* | Remove InstallFlowAnalyticsTodd Kennedy2015-10-231-82/+1
| | | | | | | | | | | | | | | | These were no longer being used and they were broken with a recent change adjusting the flow of the PackageInstaller. Bug: 24542039 Change-Id: I14b98dd0f8cdb69d31eab54a3f1b96048263c222
* | am 5fe06be5: am 50728943: am 12c698b4: Merge "Block Install Intent for Wear ↵Vinod Krishnan2015-10-011-1/+21
|\| | | | | | | | | | | | | devices" into cw-e-dev * commit '5fe06be584a0f5039a973f3370cf0875bb6ec002': Block Install Intent for Wear devices
| * Block Install Intent for Wear devicesVinod Krishnan2015-09-281-1/+21
| | | | | | | | | | | | | | | | | | | | - We did not support this feature on Android Wear before - The impact is unknown. For example, the Setting for UNKNOWN_SOURCES is not implemented in Android Wear Settings App. Bug: 24336381 Change-Id: I0fb4006d4769291c872e8f21407383a7c4a77b93
* | Use PackageInstaller.SessionTodd Kennedy2015-09-301-2/+8
|/ | | | | | | | | We've been using the deprecated package manager installation methods. Replace those with the PackageInstaller.Session installation mechanism. Bug: 22282121 Change-Id: I34aefcbae2703c400a7ed35780f61713992b7181
* Change MNC codename to just M.Dianne Hackborn2015-07-291-1/+1
| | | | Change-Id: If86ce89143414405acb8ebbbf2139b07c4eb26bd
* Add APIs for verifier to grant at install and revoke permissionsSvet Ganov2015-07-151-38/+38
| | | | | | bug:22231699 Change-Id: I679bb4a1f99eaa7d3984a4e6db6a04dca4574a18
* Remove personal/device group & skip perm screen for M+ apps.Julia Reynolds2015-07-131-46/+47
| | | | | Bug: 22229417 Change-Id: I30d7e7a2e7abf4dcf70adb055d3252ee4941cd42
* am 10763f1c: Merge "Hidden ApplicationInfo flags are now in privateFlags."Alex Klyubin2015-02-111-3/+5
|\ | | | | | | | | * commit '10763f1caaf75389302a175a18f7b302848e3b36': Hidden ApplicationInfo flags are now in privateFlags.
| * Hidden ApplicationInfo flags are now in privateFlags.Alex Klyubin2015-02-111-3/+5
| | | | | | | | | | | | See b9f8a5204a1b0b3919fa921e858d04124c582828. Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
* | Fix a regression in installing from unknown sourcesAmith Yamasani2014-10-291-0/+2
| | | | | | | | | | | | | | | | If unknown source and the setting is enabled, proceed with UI initialization. Bug: 18165796 Change-Id: Ifee833cc7225d30b4e4fb874dc255cd42d7472d0
* | Display correct message based on reasonAmith Yamasani2014-10-281-29/+60
|/ | | | | | | | | | | | | There can be two reasons for not allowing installation of apps from unknown sources. 1. The user setting is off, in which case allow the user to go to Settings and change it. 2. The device administrator (or corp profile) has prohibited. In this case, user can't really change it, so show a different message and have just an OK button. Bug: 17656403 Change-Id: I0d90ba95d7a9250021366b76d570c0ef7b55c143
* PackageInstaller API refactoring.Jeff Sharkey2014-08-151-2/+1
| | | | | Bug: 17008440 Change-Id: Ice56b712a96abecc3d908424d4595449927c2d3e
* Extend to support install sessions.Jeff Sharkey2014-08-071-34/+71
| | | | | | | | | Light changes to existing code to support pre-staged install sessions. Only inspects a base APK from session, which defines all permissions. Bug: 16515814 Change-Id: Ia1cb43ff9fdfe1f2468ad0d1374cff2b8eb50f54
* Apply restriction ENSURE_VERIFY_APPS to PackageInstaller.Julia Reynolds2014-06-301-0/+4
| | | | | Bug: 15986973 Change-Id: I154fdf06d6e37c55bd4b179cdac00112455ca777
* Prevent sideloading if UserManager flag is set for current user.Sander Alewijnse2014-05-201-4/+11
| | | | | | | Using the flag UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES. If true, this overrides the secure INSTALL_NON_MARKET_APPS flag. Change-Id: I4d9628f0ce35d585d4416adfb421e74cbf01fd86
* Log APK hash for package install attempts in the Event Log.Alex Klyubin2013-10-151-2/+2
| | | | | | | | | | This CL adds a package_digest field to the install_package_attempt event. The field is populated with the SHA-256 digest of the contents of the APK iff the user has consented to app verification and app verification is enabled. Bug: 10605940 Change-Id: I0d191398ed8d28950c7b5ee0ce02ec077d2c888b
* Record analytics about package install attempts to Event Log.Alex Klyubin2013-09-091-36/+106
| | | | | | | | | | | | | | | | | | | | | The purpose of this change is to provide analytics about the various stages of the install flow. Recorded information does not contain user-, device-, or package/app-identifying information. Examples of recorded information are: * duration of the flow (start to finish) * duration of the flow until the moment the user clicks Install * whether the attempt is an update or a new install. * whether app verification is enabled. * whether Unknown Sources is enabled. * whether the attempt was blocked by Unknown Sources. * whether permissions were displayed. * error code (if any) returned by PackageManager when installing the package. Bug: 10605940 Change-Id: I9bc009223a365a558cdf02bd91cf4315b82564c2