403 Commits

Author SHA1 Message Date
Jeff Brown
5d6443bf7c Set initial screen brightness earlier in the boot process.
Previously we had to wait for systemReady before setting the brightness
due to the order in which the display power controller was initialized.
Unfortunately it could take us a rather long time to reach that stage,
particularly after an OTA where the screen would remain at maximum
brightness for minutes while "Optimizing Apps".

This change moves the brightness backlight setting code deeper
into the display manager which has a couple of nice side-benefits
in that it now becomes much easier to coordinate display power mode
changes with display backlight changes.  So this change also resolves
some issued with changing the backlight while in DOZE_SUSPEND and
ensuring that backlight changes generally end up being performed
before executing a power mode change except in the case where the
display needs to come out of suspend first.  (So now the backlight
will be set before entering DOZE from the ON state.)

Deleted some dead code in LightService which was in the way.

Bug: 19029490
Change-Id: I494b5223e676248daf2ff8be3ec338845977f73c
2015-04-13 01:51:22 -07:00
Ruben Brunk
9d21ee5d77 Add CameraService to system server.
- Adds a camera service to system server that forwards events to the
  mediaserver camera service.
- Notify the camera service when the device user changes.

Bug: 19186859
Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
2015-03-31 12:01:22 -07:00
John Reck
c74e289a65 Merge "Add GraphicsStatsService" 2015-03-30 19:39:27 +00:00
Mike Lockwood
5781cd5b21 Make the MIDI Manager optional, enabled by "android.software.midi" feature
Change-Id: I76d442ea28beea4b9e2876bfef501d8f61403702
2015-03-27 13:23:41 -07:00
John Reck
edc524c905 Add GraphicsStatsService
More S's for More Speed

Split JankTracker's backing data from the
class to allow for data relocation to/from ashmem regions

Pack the jank tracking data to fit in 256 bytes

Change-Id: Ife86a64b71a328fbd0c8075fe6a0404e081f725b
2015-03-27 11:50:56 -07:00
John Spurlock
221d2cbf2f Merge "Remove the ability to disable audio service." 2015-03-24 22:30:14 +00:00
John Spurlock
b4f01b966b Remove the ability to disable audio service.
Running in a configuration without audio service is not fully tested.
Remove the configuration option for now. Also remove unused delegation
layer in SoundPool.

Bug: 19891112
Change-Id: I47be0e32d54b8ef8fa25cf47b85eacf8a4969500
2015-03-24 17:22:13 -04:00
Dianne Hackborn
88e98dfa59 More work on device idle mode.
- There is now an API for people to find out about
  its state.
- Moved DeviceIdleController to be closer to the
  power manager implementation, since they are
  closely related.
- Job scheduler now knows about idle state and doesn't
  run jobs while the device is idle.
- Battery stats now keeps track of "idling" vs "idle mode".
  Idling is when we consider the device to be idle,
  independent of whether we are actually in deep idle mode.
  This allows us to keep track of longer-term changes
  independently of cycling in and out of idle mode.
- Battery stats also now keeps track of package changes in
  its daily stats.
- Small optimization to network policy manager service to
  not touch uids that do not have the NETWORK permission.

Change-Id: I0b3304fb3722c78cdfdd0c1eada7369ece7cbcf9
2015-03-24 11:03:49 -07:00
Adam Lesinski
3561761776 Merge "Set the appliance (tv/watch) in the configuration earlier" 2015-03-23 18:33:10 +00:00
Jeff Sharkey
bf2673384c Merge "Bring MountService into the SystemService world." 2015-03-22 20:03:55 +00:00
Jeff Sharkey
56e629322f Bring MountService into the SystemService world.
Change-Id: I7f7db49ff373b199f7b81f184a7c62bee682af67
2015-03-21 20:41:00 -07:00
Adam Lesinski
05199e83a4 Set the appliance (tv/watch) in the configuration earlier
Some UI is displayed (boot/optimizing) before the configuration
has been completely set. This noteably happens for watches and
TVs because UIModeManagerService hasn't started yet.

UIModeManagerService is started earlier, and its dependency
TwilightService is loaded during the "all system services ready"
boot phase.

b/18388692

Change-Id: Iabdf8ac3eb04ebcb44779d752e19042769cc65c6
2015-03-19 14:40:25 -07:00
Dianne Hackborn
8ad2af7e5b First stab at device idle mode.
Introduce a new device idle controller service that
monitor's the device state and determines when to go
in to idle mode.  When in idle mode, all we do right
now is turn off network access the same as we do for
power save mode.  Many more things should come in the
future -- stopping the alarm manager from scheduling
(most) alarms, telling GmsCore for it to stop doing
stuff, etc.

Battery stats now has state tracking for devie idle
mode, as well as events for the reasons we can come
out of idle mode (significant motion or the device
becoming active).  Also added new events noting when
packages are installed.

Renamed the "low power" event in battery stats to
"power save" because the former was just way too
confusing.

Finally, fix buffer size reading kernel wake locks.
(Stupidly, just increasing the buffer size.  Ideally
we should try to be smarter and grow our buffer to
fit the data available, but I'll leave that for
another time.)

Change-Id: I0be2062466c83ee9d890c6cf5a228d9cc4090eca
2015-03-19 11:10:55 -07:00
Lorenzo Colitti
0ea7b1b094 Enable Ethernet if the device has FEATURE_USB_HOST.
Any device that supports USB OTG is capable of running Ethernet
via a USB OTG cable and Ethernet to USB adapter.

Currently, we only start the Ethernet system service if the
device has FEATURE_ETHERNET, but this requires that every device
explicitly declare FEATURE_ETHERNET, which causes bugs like
http://b/18515146 , where the L OTA broke Ethernet on nakasi.

Therefore, start the Ethernet service on all devices that have
FEATURE_USB_HOST.

Bug: 18515146
Change-Id: I3b4e85d1ad8e1aea9baa046a27f5b4dd68c42028
2015-03-05 16:06:43 +09:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
John Spurlock
6156017c22 Move AudioService to services.
...and a few dependencies. Move remaining shared items to AudioSystem.

Change-Id: Ib9623ff867678d34977337856bb0156e8cdaeeb5
2015-02-09 17:13:38 -05:00
Mike Lockwood
10024b3dc1 MidiManager updates:
MIDI ports are now implemented as file descriptors directly between the sender
and receiver, so the MidiService is no longer in the message path.

To facilitate the above, each port has its own file descriptor, rather than multiplexing
all ports on a device through a single socket.

Added a new class MidiDeviceServer, which is used by implementors of MIDI devices.
This replaces the MidiVirtualDevice class (which only was included in changes that were reviewed but never submitted).

The USB MIDI implementation has moved from the MIDI service to the USB service.
The USB MIDI implementation uses MidiDeviceServer as its interface, so we now have a common
interface for all MIDI device implementations.

Change-Id: I8effd1583f344beb6c940c3a24dbf20b477a6436
2015-01-14 16:51:54 -08:00
Santos Cordon
8c07abe220 am 02775fca: am 8dd185b0: am 5d2c1e69: (Telecom-system part 3) Adding Telecom Loader Service
* commit '02775fca2b78af8089e9f50575ca639898f4f21c':
  (Telecom-system part 3) Adding Telecom Loader Service
2014-12-09 23:20:31 +00:00
Santos Cordon
02775fca2b am 8dd185b0: am 5d2c1e69: (Telecom-system part 3) Adding Telecom Loader Service
* commit '8dd185b08fae8d41bec558ab5a63012454cbb78e':
  (Telecom-system part 3) Adding Telecom Loader Service
2014-12-09 00:18:08 +00:00
Santos Cordon
5d2c1e69ec (Telecom-system part 3) Adding Telecom Loader Service
Bug: 18112269
Change-Id: I85ab03156bf906fdc72b459c4c68240ab3bf1894
2014-12-08 23:30:10 +00:00
Mike Lockwood
67f8e8bd89 MIDI Manager work in progress
Still to do:

Add MidiInputPort and MidiOutputPort classes
Schedule sending MIDI events in the future
Security/permissions
Reconsider interface for virtual devices
Look into performance optimizations

Change-Id: I9b7d63b196996a04be0a830efa913043da1328a8
2014-12-08 10:45:37 -08:00
dcashman
6ec2cbd8d2 am c25cfc57: am 24d02652: Merge "Prevent EntropyMixer from registering with service manager."
* commit 'c25cfc57e0d863b002620f5e7dd14822418c678f':
  Prevent EntropyMixer from registering with service manager.
2014-12-01 23:59:50 +00:00
dcashman
24d02652bf Merge "Prevent EntropyMixer from registering with service manager." 2014-12-01 23:49:26 +00:00
dcashman
fe8afa99a7 Prevent EntropyMixer from registering with service manager.
EntropyMixer is designed to be triggered in two ways, as either the
result of a self-set timer or of one of three system broadcasts.  It is not
meant to be triggered in any other way, so exposing it via servicemanager
is undesirable.

Bug: 18106000

Cherry-pick of commit: 9287e0dd272b85b475e33bcbd7d868517a0f98f9

Change-Id: I9aeb35e7ffde75090f4234ea193514fb883b1425
2014-11-26 13:50:30 -08:00
dcashman
9fd6d9d995 Merge "Remove if(true) line." 2014-11-26 17:23:01 +00:00
dcashman
0e0dbf9367 Merge "Prevent EntropyMixer from registering with service manager." 2014-11-26 17:17:00 +00:00
dcashman
4e3f5d3fe4 Remove if(true) line.
Commit: e4d9a01bfc7451afff1ed399a5801c7aa2af2831 introduced an
if (true) block with the intention of changing it.  Remove it.

Change-Id: Ida637cb69c57b7b676f37a3397d72e0bf010523a
2014-11-26 09:06:57 -08:00
Narayan Kamath
c9269da26c am edda97c9: am fdbef408: Merge "Start MountService before performBootDexOpt"
* commit 'edda97c9ffc4fae08744e42fdbf60040e8f97b99':
  Start MountService before performBootDexOpt
2014-11-26 11:10:48 +00:00
Narayan Kamath
fdbef4081d Merge "Start MountService before performBootDexOpt" 2014-11-26 10:59:29 +00:00
dcashman
9287e0dd27 Prevent EntropyMixer from registering with service manager.
EntropyMixer is designed to be triggered in two ways, as either the
result of a self-set timer or of one of three system broadcasts.  It is not
meant to be triggered in any other way, so exposing it via servicemanager
is undesirable.

Bug: 18106000
Change-Id: I9aeb35e7ffde75090f4234ea193514fb883b1425
2014-11-25 12:59:12 -08:00
padarshr
4a84116d11 Start MountService before performBootDexOpt
This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: I6dec474266faa5de67449c1bbe6ef30791e5ecaa
2014-11-25 10:42:15 -08:00
Narayan Kamath
343f478241 Tell installd when boot completes.
installd can then clear the ".booting" marker from the dalvik-cache
(owned by root). This marker is used to detect boot loops.

bug: 18280671

(cherry picked from commit 76a748e62f354c799342044f724e1f4b80121837)

Change-Id: I2364c05837ac04d428b5a34ab1802964a11d2df4
2014-11-19 14:41:08 +00:00
padarshr
ada454152e Start MountService before performBootDexOpt
This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: I6dec474266faa5de67449c1bbe6ef30791e5ecaa
2014-11-18 10:53:18 +00:00
Narayan Kamath
76a748e62f Tell installd when boot completes.
installd can then clear the ".booting" marker from the dalvik-cache
(owned by root). This marker is used to detect boot loops.

bug: 18280671

Change-Id: I878f1463c7f523892605c17b980a51ac3b6645e2
2014-11-11 10:50:46 +00:00
Jeff Hao
7eb599b267 Get UsageStats if no PackageUsage is available for boot dexopt filtering.
Bug: 17191977
Change-Id: I33e18459e49afa42b8e8218574a2434e5205a6da
2014-10-23 11:27:42 -07:00
Chenjie Luo
2cab8825b3 Add system property config.disable_networktime to configure NetworkTimeUpdateService
Bug: 17934875
Change-Id: Ie5acf7266a5766f407db8f23d2c3d26920fa4020
2014-10-16 13:33:25 -07:00
Chenjie Luo
d25e4efdc1 Revert "Add system property config.disable_timeupdate to configure NetworkTimeUpdateService"
This reverts commit c597c55ffeb9debcf2dba8a77a80caa9016ea4d1.

Change-Id: Idc83e582c10dda2c6245ec19921785f361a07a68
2014-10-16 20:22:24 +00:00
Chenjie Luo
c597c55ffe Add system property config.disable_timeupdate to configure NetworkTimeUpdateService
Bug: 17934875
Change-Id: Ic1acff13190f38cedb1ecf22783d4dfd3373511d
2014-10-16 11:36:31 -07:00
Dianne Hackborn
8d05172112 More work on issue #17656716: Unhandled exception in Window Manager
Fix Slog.wtf to not acquire the activity manager lock in its code
path, so that it can never deadlock.  This was the original intention
of it, but part was missed.

Now we can put back in the code to detect when strict mode data is
getting large (a little more targeted now to the actual problem),
and use Slog.wtf to report it.  And as a bonus, when this happens
we will now clear all of the collected violations, to avoid getting
in to the bad case where IPCs start failing.  So this should be
good enough for L to fix the problem, with wtf reports for us to
see if the underlying issue is still happening.

Finally, switch a butch of stuff in the system process from Log.wtf
to Slog.wtf, since many of those are deadlocks waiting to happen.

Oh and fix a crash in the settings provider I noticed in APR.

Change-Id: I307d51b7a4db238fd1e5fe2f3f9bf1b9c6f1c041
2014-10-01 16:58:56 -07:00
Jae Seo
996b5af40c Start TvInputManagerService when the device supports FEATURE_LIVE_TV
Bug: 17284986
Change-Id: I5efeffecfcb771cb2e6180ccfd665464611a24fc
2014-08-27 23:52:01 -07:00
vandwalle
0bbd2aaace remove call to passpoint service start
Change-Id: Ibc6e537544c2228e8b07f734158182d1e4817d17
2014-08-26 15:43:46 -07:00
Jeff Brown
6d2a9492e2 Eliminate power manager latency for boot completed.
The power manager disables the power button until boot completed
occurs.  If there are many pending broadcasts in the queue, it
may be possible for BOOT_COMPLETED to be delayed for several
seconds after boot.

To avoid the delay, introduced a new boot phase which is
sent to system services immediately when boot completed happens.

Bug: 13398280
Change-Id: I1833d2ffb20305009dd76363b43e534034f1d0a2
2014-08-11 17:13:03 -07:00
Dianne Hackborn
a351ab9698 Fix issues 16739817 and 16709247 in voice interaction service.
Issue #16739817 VIS doesn't start for non-primary user(s)
Issue #16709247 GSA is not the default voice interaction agent

These are both fixed by getting rid of the existing code for applying
the default voice recognizer, moving it in to the voice interaction
manager service, and extending it to also set up the default voice
interaction service.

Change-Id: If8d5936c28aebfa7eff77c8d99241c3a2ffdb0a4
2014-08-09 13:31:59 -07:00
Torne (Richard Coles)
4dbeb359b2 Cherry pick Make WebViewUpdateService a SystemService. DO NOT MERGE
Migrate WebViewUpdateService to the newer SystemService approach instead
of ServiceManager.addService.

Original Bug: 16403706
Original Change-Id: I21aa67a41c22c3c20ba9e82eb87e5d610fe130e8

Bug: 16723226
Change-Id: Id276b71ee547e683f0756bcee0f4978ce342c2af
2014-08-01 14:24:47 +01:00
Primiano Tucci
810c052d9b Cherry pick Introduce startIsolatedProcess private API in ActivityManager DO NOT MERGE
The new API spawns a isolated process, using a custom uid, entrypoint and
abi. Such API is used by the WebViewFactory to spawn its unpriviledged
but trusted process (hence the fixed uid) which rewrites the rerlo file
on boot / when an update occurs.
Since both the ActivityManager service and the WebViewUpdate service
live in the SystemServer their calls be dispatched locally and no
binder interface needs to be exposed for the new startIsolatedProcess API.

Original BUG:16403706
Original Change-Id: I327b59735c12698595e0dbcc4da5d759c9103b0a

Bug: 16723226
Change-Id: Iecb49888e11eec9d302d9712953fd498db5821af
2014-08-01 14:24:09 +01:00
Ye Wen
d97e1fdb29 Implement broker pattern for imms (1/3)
b/16324360

Change-Id: I41dc9823820eed60406973f5edb5a71deb4b0130
2014-07-29 16:32:07 -07:00
Vinit Deshpande
c4272f32ae Enable RTT End-to-end
This change includes various fixes to first RTT implementation and
enables RTT APIs end-to-end. Fixes include proper marshalling of
objects across API and service and JNI fixes.

Change-Id: Ie4ba1ffc6c5b42593e931438b3f03e201ff6be71
2014-07-28 09:00:10 -07:00
Adam Lesinski
3c153519ca Add Per-User logging of UsageStats
Change-Id: I4518c5d3c56b3821292accb886f9fb21f3a8b25f
2014-07-25 17:18:54 +00:00
Dongwon Kang
0fdcb74cc3 Disable TvInputManagerService on non-TV devices.
The block condition is based on FEATURE_LEANBACK instead of
FEATURE_TELEVISION which is deprecated in favor of FEATURE_LEANBACK.

Bug: 16497355
Change-Id: I433051362fe94ea453afe9344800fb4f8c7076a9
2014-07-24 16:28:35 +09:00
Adam Lesinski
0debc9aff4 First iteration of a public UsageStats API
UsageStats API that allows apps to get a list of packages that have been
recently used, along with basic stats like how long they have been in
the foreground and the most recent time they were running.

Bug: 15165667

Change-Id: I2a2d1ff69bd0b5703ac3d9de1780df42ad90d439
2014-07-18 15:24:20 -07:00