History log of /packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
080045f3adcf1e45f91a2755627f402de40fc394 08-Feb-2018 Philip P. Moltmann <moltmann@google.com> Catch ISE when opting contet input stream

If the "archive is not acquired" we get a ISE when opening the input
stream. We should treat this similar as any other error.

Test: Installed app
Change-Id: Ifaa75c59e12c22df752edf0b9e43ce3659e19b60
Fixes: 73078989
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
0912097f9b1df64dd9bdf6666209b8a3f9b53c46 09-Nov-2017 Philip P. Moltmann <moltmann@google.com> Delete staged file using separate activity

The InstallStaging activity was

1. copying the original file into the staged file
2. start the further install flow
3. wait for install to be over and then delete the staged file
onActivityResult

It was hard to distinguish between the cases where the activity went
through a lifecycle and when the install was over as it was not
guaranteed that we receive onActivityResult before onResume (the
javadoc is confusing).

Hence finish the InstallStaging activity once staging is done and delete
file in a separate activity that has only this single purpose.

Now we rely on savedInstanceState == null to be only true for the very
first time this activity instance was started.

Change-Id: Icc093470151ed683224ddc0ee2665a9d32ab5687
Fixes: 67759288
Test: Installed app
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
692a0997eaa246a4f2f1839a460a465b4867add3 01-Nov-2017 Philip P. Moltmann <moltmann@google.com> Do not start staging task if activity is finishing

If an app is resumed after the process was killed onResume is called
even if onActivityResult sets finish() before. This does not happen if
the activity is resumed without the process having been killed.

Obvisouly we do not want to start an installation if the activity is
finishing, hence just don't do anything in this case.

Fixes: 67759288
Test: - Went through installation until final screen
- Put installer into background
- Killed package installer manually
- Recents -> back to installer
- Saw onResume called but installer finished anyway

Change-Id: Ib1347692de9deb20459b71410b0ab21cc9e11e06
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
e4f0522753c2ebc78e9319c97094081faf41b996 16-Sep-2017 Philip P. Moltmann <moltmann@google.com> Use bigger buffers when installing app

... progress bar is still smooth and install time is 4 times lower.

Change-Id: I80d13b349865acb8b223b0f94eeb451564491f08
Fixes: 65607474
Test: Installed apps and measured speed
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
cd5a5a60ca028b30969c0dc16c5f0f3c205b494b 03-Mar-2017 Philip P. Moltmann <moltmann@google.com> Clear files (including stale staged apks) on boot

Before the staged apks were never deleted if the installer was killed
during install.

Test: Booted, installed packages, uninstalled packages. Checked that
files were cleaned correctly.
Change-Id: Ie3fad7e448269eef3b4e85748e67a4c4e318c01b
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
74fa089b8c39d84b737607a3e3d2cde4d3b42d24 08-Nov-2016 Philip P. Moltmann <moltmann@google.com> Use non-internal annotations.

Eventually we want to make the PackageInstaller to use only system-api,
not internal apis anymore. This changes some trivial annotations to
their external equivalent.

Test: Built
Change-Id: I73bf5a937e45d8b3ebe780e909dc91603fcff8c7
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
f48b92a58f99e7e6f34c7aec586ab0cc83edec3d 20-Oct-2016 Philip P. Moltmann <moltmann@google.com> Split start triaging from confirm activity.

Before the PackageInstallerActivity had two duties:
- Select if we needed to stage and then launch the stage activity
- Let the user confirm the installation

This change splits the first one out into the InstallStart activity.

Also: - Only show window animation in first activity, suppress otherwise
- Corectly read and persist source/caller information in start and
later just read it from the intent.

Test: Installed an app
Change-Id: Iea94ddca1162d8f90a8d0bf7d21974fee883b199
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
20c052885a756ffe4f8febc88e938fb43c5d5516 13-Oct-2016 Philip P. Moltmann <moltmann@google.com> Factor our staging step to own activity.

To make the Package Installer safe against acivity lifecyle I need to
make each installation step a separate activity. Also the activity's
with progress (staging, installation-progress) have to be carefully
crafted to work correctly with the activity lifecycle.

There will be further changed dealing with the other steps.

Test: Installed from content-URI
Forced staging to fail and checked that dialog works
Canceled staging via cancel button
Change-Id: I914fad6898f9ed9c71f18370811dca1986040561
/packages/apps/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java