If the user's wallpaper isn't direct-boot aware, wait around for
the user to be unlocked, instead of clearing the wallpaper.
Also switch a few classes to using SystemService lifecycle, since
events are dispatched faster than through broadcasts. Fix bug where
ContentService.systemReady() was never called, and make sure
EntropyMixer doesn't risk being GC'ed.
Bug: 26280055
Change-Id: I9fff468a439b868baa68cf11bb6ee9f7d52b7b5a
If the current active scorer provides a service that can handle the
android.net.scoring.SCORE_NETWORKS action then the NetworkScoreService
will bind to that service to keep the scorer alive. If no service is
discovered then no attempt to bind will be made.
BUG: 27612145
Change-Id: I3f6ed0cbd83e658f1533c3e37b0cac2692c01761
When loading roots for the first time, we're okay using any cached
data from the system, but if the locale changes we need to
force-refresh everything.
Now that we're always using the system cache, we have a nice strong
signal for "empty" versus "not cached" results, so we don't need to
wait around for the first loading pass to finish.
Add logic to invalidate system cache when locale changes, and fix
locking bug.
Bug: 27977906
Change-Id: Ic50083eff360bea887799583f6c9f02c129eec91
This patch moves the updating of packages before performing fstrim,
which runs asynchronously anyway, and stops showing the UI dialog.
Bug: 27350503
Change-Id: I6fceda10d7696f9badb97978fb9dc7927d698a4b
It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException. If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.
This change mitigates this trouble by "defusing" any Bundles parsed by
the system server. That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.
Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable." For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination. Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.
Merges several Parcel boolean fields into a flags int. Add better
docs to several classes.
Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93
Adding the Context hub service. This is the service that exposes
the context hub HAL to the system. The API exposed is a System API.
Change-Id: I854141714ecd21f6386e6b15b7bc9a997483ccf6
- Icons are now persisted. (under /data/system_ce, as PNGs)
- the "load icon" APIs in LauncherApps are supported.
- Implement updateShortcuts()
- Addressed all the comments on the previous CL
- @hide the newly added constructor for PersistableBundle
- Enhance incoming shortcut validation
- A lot of internal clean-up.
Bug 27548047
Change-Id: I8e3c1ccd3e0a997a6d271c84d81170f0c022b60e
Like we did this for InputMethodManagerService [1],
TextServicesManagerService (TSMS) needs to be recognized by
SystemServiceManager with SystemService lifecycle mechanism so that we
can receive SystemService#onUnlockUser() event, which is necessary to
make TSMS encryption-aware.
As a preparation, with this CL we only does mechcanical migration to
SystemService lifecycle mechanism in TSMS. Hence no user-visible
behavior change should occur.
[1]: Ic17667df60b30e5355b61a3601ad27a000cab3a3
1e33dc8fdf3f722ecd32cc586b2a9515de24a242
Bug: 27456430
Change-Id: Ib3cc799d384f259b4fa3f5295f2da198df015eb8
What's supported:
- Most APIs are implemented, except for SM.updateShortcuts(),
the icon APIs in LA, and LA.startShortcut().
- Persisting information, except for icons
- Throttling
In addition, now PersistableBundle has a public copy
constructor from a Bundle. (Do we want to @hide it?)
TODOs:
- Add icon support
- Implement missing APIs
- Listen to PACKAGE_* broadcasts and do clean-up
- Support multi-launcher apps (pinned shortcuts per launcher)
- Dev option to reset throttling
- Load throttling config from Settings
- Backup & restore
- Figure out LauncherApps permissions (BIND_APPWIDGETS??)
- Other minor TODOs in the code
- Better javadoc
Note: This requires Idf2f9ae816e1f3d822a6286a4cf738c14e29a45e
Bug 27325877
Change-Id: Ia5aa555a4759df5f79a859338f1dc5e624cd0e35
Make OtaDexoptService a bootstrap service. It needs to start
immediately after the PackageManagerService so that it can move
A/B artifacts into their new place.
Add a method to Installer for the move.
Bug: 25612095
Change-Id: Idcf759b3c947088b416d54d2fa269ef27daf93ab
When a device is booting up in an encrypted state WebView won't find the
packages needed for loading WebView and might thus try to use incorrect
webview packages. This in itself might cause us to incorrectly change
the webview provider setting but also causes us to crash the system
server if we try to enabled/disable a package that cannot be seen by the
package manager.
Bug: 27353062
Change-Id: I9349778506e8bec1c56b9b786fe4ed15c7c3260d
Also add the appropriate changes to api/test-current.txt, which
is not present on mm-wireless-dev from which this change came.
Change-Id: Ic4df6d0f89add73b7e5252ef662de07a4e8fce31
Add a separate system service RecoverySystemService to handle recovery
related requests (calling uncrypt to de-encrypt the OTA package on the
/data partition, setting up bootloader control block (aka BCB) and etc).
We used to trigger uncrypt in ShutdownThread before rebooting into
recovery. Now we expose new SystemApi (RecoverySystem.processPackage())
to allow the caller (e.g. GmsCore) to call that upfront before
initiating a reboot. This will reduce the reboot time and get rid of the
progress bar ("processing update package"). However, we need to reserve
the functionality in ShutdownThread to optionally call uncrypt if
finding that's still needed.
In order to support the update-on-boot feature, we also add new
SystemApis scheduleUpdateOnBoot() and cancelScheduledUpdate() into
android.os.RecoverySystem. They allow the caller (e.g. GmsCore) to
schedule / cancel an update by setting up the BCB, which will be read by
the bootloader and the recovery image. With the new SystemApis, an
update package can be processed (uncrypt'd) in the background and
scheduled to be installed at the next boot.
Bug: 26830925
Change-Id: Ic606fcf5b31c54ce54f0ab12c1768fef0fa64560
Add HardwarePropertiesManagerService which call native methods to
get CPU, GPU, battery temperatures, CPU usage info, fan speeds.
Restrict hardware properties retrieval only for device and profile
owners.
Bug: 26945055
Change-Id: I4d6b30b78e575532d5e9cfa59ef6cd81355439d4
NetworkStatsService will register data usage requests
and keep data usage stats scoped to the request.
There are different types of data usage requests
- scoped to a set of NetworkTemplate; these are restrictred to
device owners and carrier apps and allow the caller to monitor
all activity on the specified interfaces.
- scoped to all uids visible to the user, if the user has
android.Manifest.permission#PACKAGE_USAGE_STATS permission.
The set of uids may change over time, so we keep track of that.
- scoped to a set of uids given by the caller, granted that
the caller has access to those uids.
- scoped to the caller's own data usage. This doesn't require
PACKAGE_USAGE_STATS.
Bug: 25812785
Change-Id: Ie11f35fc1f29d0dbe82f7fc924b169bb55c76708
We can set config.disable_rtt in the init script to disable the
RttService.
b/26877020
Change-Id: Ifb7fedc4764329dc09cae41f06bf6d5fc7426e5f
(cherry picked from commit c47749f9908b5d98397379fb3bf80d330f9c8283)
Add an OTA Dexopt service. Refactor package manager service and
package dex optimizer to reuse some code. Add knowledge about
OTA flag to installer.
Bug: 25612095
Change-Id: I7dd6bb468fea44b9d3acf0ac7d7404fb02d0f30a
Defined the dynamic sensor meta data type and UUID of sensor, as well
as the broadcast intent that is related to dynamic sensor status
change.
Modify SensorManager, SystemSensorManager and the JNI layer to support
dynamic sensor discovery.
Added SensorNotificationService to notify apps that sensor connected
or disconnected via broadcast.
Change-Id: I28adfb005357d7e3983d65117d6865830c75027d
This CL implements the SoundTrigger API improvements as given in b/22860713. Only the java-level
parts are implemented in this CL.
Key changes include:
* Addition of a SoundTriggerManager/SoundTriggerDetector system API to manage
the sound-trigger based sound models.
* Addition of a SoundTriggerService service that manages all sound models
including voice (keyphrase) and sound-trigger based models.
* Includes logic to write sound-trigger based models to the database.
* VoiceInteractionManager service now uses SoundTriggerService instead of
SoundTriggerHelper.
Bug: 22860713
Change-Id: I7b5c0ed80702527c4460372efeb5e542d3693a69
ART will unzip APKs in memory during launch if an OAT file is not
present. To save the time and memory, this patch will invoke dex2oat
with '--compiler-filter=verify-at-runtime' to unzip the APK during
install or after an OTA.
Change-Id: I16583f9450ad60356123a29f7a6a649b2ab9999f
uncrypt needs to be called when an OTA package sits on /data. If uncrypt
fails or gets skipped (likely due to unexpected runtime restart during
the reboot), we should abort the rebooting. Because otherwise a) it
would fail for sure when reboots into recovery; b) useful logs would be
gone once it reboots.
Bug: 26444951
Change-Id: Ic3bc682b03f003f197e277ed6b6886e85f364754
The background compilation service will trigger a profile based
compilation instead of a full one. If no profile information is
available the compilation is skipped (see installd).
Note that the end decision whether or not to compile a package is taken
by dext2oat. We can't make the decision here because this service runs
under system server which cannot read app's profile data.
Bug: 26080105
Change-Id: I457ea8dea0557839c1f7cdc241770055732b0a4a