|
The default directory for PackageInstaller moved from
/data/user/foo to /data/user_de/foo. Not sure on the exact reason
why, but it has something to do with the file based encryption
changes in N. This was causing the temp APK file that we were
passing to PackageManager for installs to be in an invalid location.
This resulted in failed installations.
This is OK though because we never really wanted to use a temporary
file. We were using it due to limitations in the PackageInstaller
APIs. Since implementation, new APIs have been added to allow us
to pass a stream through instead.
This CL updates the install logic to use the stream API instead.
Because this code path is being deprecated and replaced, I've opted
to do the bare minimum needed to keep this code operational. I've
also borrowed installation code from Wearsky/Finsky codebase to
make it easier and more reliable.
BUG: 28021618
Change-Id: Ia245abf56649e350e99cf48d2b503906d3cd855c
|