* Verifiers can be specified in the AndroidManifest.xml
* Those verifiers can respond to the new Intent action
* PackageManager API for those verifiers: verifyPendingInstall
Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5
The message when something is not an APK that is submitted for dexopt is
not extremely helpful. Make it more precise and remove the useless
traceback.
Change-Id: Ibb34b2b2c10ee28ea98662c3f6fd070529cf8c4f
If the app had activities still finishing, when we checked whether it was
now stopped we would get told no. Also some other improvements:
- Schedule an idle as part of the force stop, to get any finishing
activities out of the stack soon rather than waiting for some activity
to idle.
- Don't filter out stopped system apps. This is dangerous because
system apps may have no way for the user to explicitly launch them,
so they could get put into a stopped state for which there is no way
to get them out. Also if the user really wants a system app to not
run, the new disabling mechanism is more appropriate.
Change-Id: I34003f21dac29e2ca0f66a23b88c710de41bab99
This adds a special device identifier that is usable only for device
validation. The user will be presented with this number encoded in
easily-transcribable Base32 in the Developer options of Settings.
Change-Id: I4843f55ee90d689a51d0269b22454ca04c1be7ec
A core app is one that has coreApp="true" in its manifest tag.
The system can successfully boot (though a little painfully) with
only framework-res.apk, SettingsProvider.apk, SystemUI.apk,
DefaultContainerService.apk, and Launcher2.apk set as core apps.
Currently this boot mode is always turned off.
Change-Id: Ieaa4a8031c2c391a12996aa8d8b1d65fc2b09d6b
...opening after selecting option "Youtube" as a luncher.
Also:
* Tweak window animations so that the wallpaper exist animations do not
stop too early (causing the wallpaper to suddenly disappear).
* Make sure no input is being processed while booting, to avoid
accidentally doing things especially in the upgrade dialog.
* Some other small cleanup.
Change-Id: I40a6b53731991d4e31ac4502e3d85f0e47507481
This introduces a new facility for code during the boot process
to display messages to the user through a progress dialog. This
is only for use when performing longer-than-usual post-upgrade
operations such as running dexopt on applications or upgrading
databases.
Change-Id: I0e78439ccec3850fb67872c22f235bf12a158dae
Copy resource would fail without a good error code when the file
couldn't be found during copy.
Also destroy the target container ID during move operations since it
might exist. If the copy failed due to it existing, it would get
destroyed anyway. This way the user has a chance to have a good outcome
the first time.
Bug: 3375299
Bug: 5113898
Change-Id: I00559833f0801bc50e7cc031b462495e37a6b4ab
The activity manager now take care of plugging the correct settings
into the OOM killer in the kernel. This is a lot cleaner because
it is really central to how the activity manager works, and nobody
else cares about them.
Taking advantage of this, the activity manager computes what it
thinks are appropriate OOM levels based on the RAM and display
size of the device.
Also a small optization to the package manager to keep a binding
to the package install helper for a bit after done using it, to
avoid thrashing on it.
And some new APIs that are now needed by Settings.
Change-Id: I2b2d379194445d8305bde331c19bde91c8f24751
The old version of this code would silently truncate odd-length
Signatures. However, this masks some bugs. Add a throw of
IllegalArgumentException so users can easily see where they're getting
bad input for Signatures.
Also, go through the existing code and catch this exception or
pre-check the input strings so system_server doesn't crash later.
Bug: 5092338
Change-Id: I8c672c5eaeb738a92c4581ce0df09baf719980ef
Make sure that files that don't exist aren't returning bogus 'out of
space' error codes.
Add some Javadoc so I can remember what each thing does in an IDE.
Add copyright header to NativeLibraryHelper
Bug: 3375299
Change-Id: Iac46019160921daca65b21d38897e5165063316e
When moving from SD card to internal, the PackageManager should check if
the native library directory parent's canonical path matches the
canonical data directory.
However, it was checking the canonical native library directory's
parent matches the data directory which makes tests concerning moving
from SD card to internal storage fail.
Change-Id: I16420efbb6f52fd6877a8f62ad060f8a1b8b0033
The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.
Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.
Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
The PackageManagerTests aren't designed for multiple users yet, so they
fail. Since multiple users aren't supported yet, just change the default
data directory for user 0 back to how it was previously. This fixes the
existing tests and doesn't get anyone's hopes up since they won't see
/data/user/0/pacakge when we don't support multiple users yet.
Bug: 4380006
Change-Id: Iedcc3115b000759c0013ba6878e13cd2358897da
Fix for unexpected recursive symbolic link when unpacking
native libraries contained in apks. This happened due to the data
directory of primary user becoming a symlink to the legacy data directory.
Bug: 4396427
Change-Id: Iaed2f21ada4eda16ce729ead259a52203300dfa8
- Create /data/user directory and symlink /data/user/0 -> /data/data for
backward compatibility
- Create data directories for all packages for new user
- Remove data directories when removing a user
- Create data directories for all users when a package is created
- Clear / Remove data for multiple users
- Fixed a bug in verifying the location of a system app
- pm commands for createUser and removeUser (will be disabled later)
- symlink duplicate lib directories to the original lib directory
Change-Id: Id9fdfcf0e62406a8896aa811314dfc08d5f6ed95
Some API stubs for managing users and storing their details.
List of users is stored in an xml file.
Each user's properties are stored in a separate xml file.
Some unit tests for modifying the XML files.
Change-Id: If2ce2420723111bd426f6762def3c2afc19a0ae5
If a system package was updated that used permissions provided by a
package signed with a different signature, it wouldn't grant
those permissions to the updated system app.
This is because the sharedUser field was not set in the disabled system
package. Therefore it was checking the disabled system package's
individual user permission grants which were empty.
This change populates the sharedUser field for disabled system packages
after reading all the existing shared users from the saved settings
database.
Bug: 4245273
Change-Id: I57c58c4083bd59f45095c184d6ca5a302f79ff6e
Split the dump() command between PMS and Settings.
Try to annotate all users of the mPackages lock in preparation for
switch to reader/writer lock.
Also mark some locals final as I was reading through the usage of the
synchronization on mPackages.
Change-Id: Ia7add63e835e67156edf886f98acebe50cc41f70
Split PackageManagerService from one monolithic class with several inner
classes to several classes. This will help determining how its data
structures can be reshuffled to provide better separation of concerns.
Change-Id: Ic7571daebdcf13ce08e08f34204c5bbf4140139b