13932 Commits

Author SHA1 Message Date
Tim Murray
eef4a3d53c Increase the max binder thread pool size for system_server.
bug 28201939

Change-Id: Iaade417a26247970b96f0aaacb3844d72de6399c
2016-04-19 14:14:20 -07:00
TreeHugger Robot
aceda5b93a Merge "Make wallpapers direct-boot aware." into nyc-dev 2016-04-13 04:40:18 +00:00
Jeff Sharkey
1cab76af85 Make wallpapers direct-boot aware.
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
2016-04-12 21:15:50 -06:00
Mitchell Wills
d0989c986e Update WifiScanningService class name to new location
Change-Id: I48515b872341ea482c9e6c37e87ebaafea571d61
2016-04-11 15:06:54 -07:00
Jeremy Joslin
b770ed1328 Merge "Have the NetworkScoreService bind to the scorer." into nyc-dev 2016-04-05 22:27:11 +00:00
Jeremy Joslin
dd251ef495 Have the NetworkScoreService bind to the scorer.
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
2016-04-04 18:13:29 -07:00
Jeff Sharkey
a3ebfec731 Invalidate caches when locale changes.
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
2016-04-04 16:46:01 -06:00
Alan Viverette
b4e7b545a2 Merge "Remove DayNight theme" into nyc-dev 2016-03-31 21:04:10 +00:00
Alan Viverette
ae4908f41c Remove DayNight theme
Bug: 21854466
Change-Id: I739872112d0ae457d0d4620f9222206072d54b4b
2016-03-31 16:18:27 -04:00
Wei Liu
2049029068 Merge "Start the Wear bluetooth service in SystemServer." into nyc-dev 2016-03-31 16:47:52 +00:00
Wei Liu
48d3b63b60 Start the Wear bluetooth service in SystemServer.
Change-Id: I4ca420d7adbb0edd6539fe4bf6ada05650164866
2016-03-31 09:44:41 -07:00
Dongwon Kang
840172ac1e Merge "Start MediaResourceMonitorService only when needed." into nyc-dev 2016-03-30 19:03:44 +00:00
David Brazdil
f5c444ffd4 Move OTA package update before fstrim, hide "Optimizing apps" dialog
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
2016-03-30 13:39:14 +01:00
Dmitri Plotnikov
a8213eebdd Merge "Allowing AppWidgetService to start without FEATURE_APP_WIDGETS" into nyc-dev 2016-03-29 21:46:28 +00:00
Dongwon Kang
d8b81b3444 Start MediaResourceMonitorService only when needed.
Bug:26564748
Change-Id: I5951008f403a11588dd84fb8dfc705c47bdca169
2016-03-28 11:18:57 -07:00
Wei Liu
d699cf80f9 Move ThermalObserver to frameworks/opt/wear
Change-Id: Ic681025a3210055b35d2af4af44418b7872fe743
2016-03-25 18:30:52 -07:00
Dmitri Plotnikov
0a3e17325c Allowing AppWidgetService to start without FEATURE_APP_WIDGETS
Bug: 26110877
Change-Id: Ide402274af4067c530793f0d674821f1294c4195
2016-03-25 17:24:57 -07:00
Jeff Sharkey
d136e51a99 Defuse Bundles parsed by the system process.
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
2016-03-16 14:45:26 -06:00
Ashutosh Joshi
ac329d3e34 Merge "Exposing Context Hub service." into nyc-dev 2016-03-16 17:21:33 +00:00
Peng Xu
9ff7d22354 Exposing Context Hub service.
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
2016-03-15 15:18:56 -07:00
Wei Liu
6aaabaef56 The startup of the system services should be conditional.
The system services not used by Wear is tracked in go/ncwss
b/26877020

Change-Id: I45f77aecbdf4d4a54fef592d543e928b6a8cd6b9
2016-03-15 13:24:12 -07:00
Makoto Onuki
5504622fb0 ShortcutManager: add remaining APIs.
- 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
2016-03-08 18:37:32 -08:00
Makoto Onuki
ed58f5f0aa Merge "Introducing ShortcutManager" into nyc-dev 2016-03-08 18:01:05 +00:00
Yohei Yukawa
a6a152e7de Switch to SystemService lifecycle in TSMS.
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
2016-03-07 13:41:15 -08:00
Makoto Onuki
6f7362d925 Introducing ShortcutManager
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
2016-03-04 15:24:49 -08:00
Andreas Gampe
abcbe2f62e Frameworks/base: OtaDexopt needs to move artifacts on boot
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
2016-03-03 13:15:59 -08:00
Fyodor Kupolov
e3f400de60 Merge "Added dump method to NetworkTimeUpdateService" into nyc-dev 2016-03-02 18:18:37 +00:00
Fyodor Kupolov
32af07acec Added dump method to NetworkTimeUpdateService
Bug: 23983739
Change-Id: I98f175f438793f6478d5995d88ae127a5a6c1bda
2016-02-26 16:54:25 -08:00
Gustav Sennton
c7db48b0ca Don't run WebView-preparation during an encryption boot phase.
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
2016-02-25 13:49:26 +00:00
Lorenzo Colitti
1142b2654a resolve merge conflicts of 51e4acb29d to nyc-dev
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
2016-02-24 15:19:15 +09:00
Pavel Zhamaitsiak
02b3e6bfc5 Add Connectivity Metrics Logger service
This service can be used to pass events to metrics collection service

Change-Id: I213874300693cd121f2c8676f70893315de4c4c0
2016-02-23 17:32:53 +09:00
Tao Bao
9de7952aa9 Merge "Add support for update-on-boot feature." into nyc-dev 2016-02-22 19:24:25 +00:00
Polina Bondarenko
280c5b2155 Merge "Added hardwareproperties SystemService" into nyc-dev 2016-02-22 09:27:21 +00:00
Tao Bao
e8a403d57c Add support for update-on-boot feature.
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
2016-02-19 11:31:45 -08:00
Polina Bondarenko
f8754ac212 Added hardwareproperties SystemService
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
2016-02-19 18:24:29 +01:00
Antonio Cansado
cd42acd951 Implementation of data usage callbacks.
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
2016-02-17 18:43:53 -08:00
Wei Liu
f0a9d699fe Merge "DO NOT MERGE ANYWHERE Start the FingnerprintService only if it has FEATURE_FINGERPRINT." 2016-02-04 23:42:49 +00:00
Wei Liu
9086b10d6b DO NOT MERGE ANYWHERE Put the start of RttService behind a flag.
We can set config.disable_rtt in the init script to disable the
RttService.

b/26877020

Change-Id: Ifb7fedc4764329dc09cae41f06bf6d5fc7426e5f
(cherry picked from commit c47749f9908b5d98397379fb3bf80d330f9c8283)
2016-02-04 18:24:34 +00:00
Wei Liu
eac5a80775 DO NOT MERGE ANYWHERE Start the FingnerprintService only if it has FEATURE_FINGERPRINT.
b/26877020

Change-Id: Idfef31edb7e67ae60c1b2205df326ed1c5657618
(cherry picked from commit aae35640cd4e08186c01875e8d14962258e3d365)
2016-02-04 18:06:38 +00:00
Andreas Gampe
a89087542f Frameworks/base: Add A/B OTA preopting
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
2016-02-01 15:38:21 -08:00
Jim Miller
4f93c58b39 Add account locked notification when users are encrypted
Fixes bug 26407543

Change-Id: Ic66669cd5f75b5fa41449e33133439752cef112b
2016-01-27 20:27:42 -08:00
Peng Xu
a35b5539a9 Dynamic Sensor Discovery Implementation
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
2016-01-27 16:37:22 -08:00
Arunesh Mishra
a772e5fc06 SoundTrigger API improvements.
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
2016-01-27 12:49:20 -08:00
Fyodor Kupolov
aae84105d1 Merge "Use SystemService lifecycle API in input method service" 2016-01-22 18:21:15 +00:00
Fyodor Kupolov
1e33dc8fdf Use SystemService lifecycle API in input method service
Change-Id: Ic17667df60b30e5355b61a3601ad27a000cab3a3
2016-01-21 12:06:11 -08:00
David Brazdil
a0e10434c4 Extract APKs on install or OTA
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
2016-01-21 09:36:12 +00:00
Tao Bao
370f0fedf5 Merge "Stop rebooting into recovery if uncrypt fails." 2016-01-21 00:27:39 +00:00
Tao Bao
4fd6c26410 Stop rebooting into recovery if uncrypt fails.
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
2016-01-19 14:33:40 -08:00
Calin Juravle
7bdf3cff92 Merge "Enable profile guided compilation on the framework side" 2016-01-19 19:51:51 +00:00
Calin Juravle
db4a79a5d7 Enable profile guided compilation on the framework side
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
2016-01-19 11:44:27 -08:00