13854 Commits

Author SHA1 Message Date
Alan Viverette
02e8c2d418 Merge "Rebase system theme on configuration change" 2015-08-13 20:06:18 +00:00
Narayan Kamath
ae61c26534 am 0d2e3d3e: am c42acbdb: am 088c4155: am 86b6d204: am bf88205b: Fall back to persist.sys.language/country if locale isn\'t set.
* commit '0d2e3d3ea3cd1bd0f77b3fdd8da6b17261cdd799':
  Fall back to persist.sys.language/country if locale isn't set.
2015-08-12 11:02:48 +00:00
Narayan Kamath
0d2e3d3ea3 am c42acbdb: am 088c4155: am 86b6d204: am bf88205b: Fall back to persist.sys.language/country if locale isn\'t set.
* commit 'c42acbdb65d89b1e5fc1cafde4cbe0996c104f7a':
  Fall back to persist.sys.language/country if locale isn't set.
2015-08-12 10:55:33 +00:00
Narayan Kamath
86b6d204a5 am bf88205b: Fall back to persist.sys.language/country if locale isn\'t set.
* commit 'bf88205bef88f78ade5c6830e6203aa343387820':
  Fall back to persist.sys.language/country if locale isn't set.
2015-08-12 10:39:13 +00:00
Narayan Kamath
bf88205bef Fall back to persist.sys.language/country if locale isn't set.
This will prevent users from losing their language setting when they
take an OTA to M.

bug: 23021286
Change-Id: Ifb66f6bf6a940ab745edac709321f3009ec6eab4
2015-08-12 11:03:46 +01:00
Alan Viverette
395cd017e6 Rebase system theme on configuration change
Also makes native theme accesses thread-safe to avoid a race condition
when modifying the theme off the UI thread. Since drawable loading can
occur off the UI thread, we need to ensure Theme access is thread-safe
anyway.

This reverts commit c12ec70def2a5682c6cd7fdb3adaa82cc34d5bf6.

Change-Id: If8fecde76d62738a8e55eddf898eafc468afdba2
2015-08-11 17:27:04 -04:00
Alan Viverette
7bea76cecf am 3e384531: am 1743988c: am 6c3a468c: am e720297f: am b4eb0640: Merge "Avoid use-after-free race condition when rebasing theme" into mnc-dev
* commit '3e384531bed8f80867ce1bab9c8de315865be824':
  Avoid use-after-free race condition when rebasing theme
2015-08-11 18:59:42 +00:00
Alan Viverette
3e384531be am 1743988c: am 6c3a468c: am e720297f: am b4eb0640: Merge "Avoid use-after-free race condition when rebasing theme" into mnc-dev
* commit '1743988cd7647af8c64c961d4ca5e9d4b4b7bc00':
  Avoid use-after-free race condition when rebasing theme
2015-08-11 18:53:13 +00:00
Alan Viverette
e720297fd8 am b4eb0640: Merge "Avoid use-after-free race condition when rebasing theme" into mnc-dev
* commit 'b4eb06402fba62f94bb16cbe433fe99a8df7cb18':
  Avoid use-after-free race condition when rebasing theme
2015-08-11 18:31:48 +00:00
Alan Viverette
c12ec70def Avoid use-after-free race condition when rebasing theme
... by never rebasing the theme. We don't need to do this unless the
system theme is configuration-dependent, which it is not currently.

Bug: 22943781
Change-Id: I96e695441543379e4d5fdf3cc6f18d9e6cf953b4
2015-08-11 10:26:08 -04:00
Zhentao Sun
ea6e001e31 am 6f52ee25: am e965289b: am f26a9a20: am c6cd1f9a: Added service that listens for gestures.
* commit '6f52ee259201c320fe69004623efd1748874f628':
  Added service that listens for gestures.
2015-07-23 22:08:05 +00:00
Zhentao Sun
6f52ee2592 am e965289b: am f26a9a20: am c6cd1f9a: Added service that listens for gestures.
* commit 'e965289b57eb1782580bc5a6bc153d508b7176be':
  Added service that listens for gestures.
2015-07-23 21:50:08 +00:00
Zhentao Sun
c6cd1f9a83 Added service that listens for gestures.
Added the GestureLauncherService that listens for camera launch gesture
and starts the camera app.
OEMs need to specify the sensor type of the camera launch gesture in
their overlays.
In the future, we can add more gesture support in this service.

Change-Id: I0769e7ca71e08bd9159aacf29bdcefd316efd2f0
2015-07-22 17:42:41 -07:00
Elliott Hughes
85235aae1c am e72d0d47: am 66c8a2f9: am 0254af6f: Merge "Fix "Bluetooh" logging typo."
* commit 'e72d0d47b8d495f565cfcfb22dc0de2d35103c2e':
  Fix "Bluetooh" logging typo.
2015-07-07 15:53:33 +00:00
Elliott Hughes
e72d0d47b8 am 66c8a2f9: am 0254af6f: Merge "Fix "Bluetooh" logging typo."
* commit '66c8a2f92acedaa05639ceb0737b95be2fd56281':
  Fix "Bluetooh" logging typo.
2015-07-07 06:31:40 +00:00
Elliott Hughes
7271613ed6 Fix "Bluetooh" logging typo.
Change-Id: I2b9aea64f1b53e100ead6e71835bf5935b410eb9
2015-07-06 22:10:36 -07:00
Bart Sears
86b81e9137 resolved conflicts for merge of d1e2789b to master
Change-Id: Ibfbae4ec1d692854a13eaa09deac3134c3524126
2015-07-04 00:15:01 -07:00
Miao Chou
658bf2fa6d Add BluetoothService to reduce resuming time after reboot
As a subclass of SystemService, BluetoothService wraps around
BluetoothManagerService to unlock Auto-enabling Bluetooth earlier by overriding
onBootPhase() and removes the need to wait for BOOT_COMPLETED message.

Bug:21705209
Change-Id: I2acc41370a750d8416e11e662e06392326741d2c
2015-07-01 19:09:44 +00:00
Xiaohui Chen
70f6c38644 Introduce system user and primary user.
Bug: 19913735
Change-Id: I2c7855915d778cf80a7154314321ddd90e2eaaac
2015-06-23 15:25:37 -07:00
Alan Viverette
15d48a16f6 DO NOT MERGE: Remove DayNight theme
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

Though wise men at their end know dark is right,
Because their words had forked no lightning they
Do not go gentle into that good night.

Bug: 21854466
Change-Id: I0b7cd116c23f7df88e94f31b3aee7dd22a102804
2015-06-18 15:15:16 -07:00
Christopher Tate
2ff4d92774 am 485c2f8c: am 4f4d54f3: am 1c24a8cd: Merge "If we\'re out of space, retry background dexopting later" into mnc-dev
* commit '485c2f8c5715c12bd84a20f9746ce40a1ff15e70':
  If we're out of space, retry background dexopting later
2015-06-12 21:02:07 +00:00
Christopher Tate
2c9655b3d4 If we're out of space, retry background dexopting later
Give it 4 hours to give the user time to do stuff, then retry;
repeat until we have space to work in.

Bug 20468442

Change-Id: Id4b11abcc38a9e2a50a062f0067a13ce0ae831ad
2015-06-12 13:06:45 -07:00
Steve Paik
b8850932d7 Merge "Disable AssetAtlasService when PRELOAD_RESOURCES is turned off" 2015-06-11 15:30:03 +00:00
Steve Paik
3c27a2303f Disable AssetAtlasService when PRELOAD_RESOURCES is turned off
Change-Id: Ie77810219c8d5dbff7e9364b60db2d1ea50bd685
2015-06-10 18:25:44 -07:00
Tim Kilbourn
0935f3ce51 Refactor DropBoxManagerService as a SystemService.
Move the binder stub inside the service and inherit from SystemService
to take advantage of SystemServiceManager.

Change-Id: Ic6fff50ccfcf6c9626ffca8d61f627c055608953
2015-06-04 09:57:38 -07:00
Alan Viverette
e54d245b99 Improve keying for theme caches, rebase system theme on config change
Themes now use an array of applied styles rather than a String to store
their history. They are keyed based on a hash code computed from the
history of applied styles. The themed drawable cache has been abstracted
out into its own class.

Also updates system context to use DayNight as the default and ensures
that GlobalActions uses the correct context, which exercises the change.

CTS tests have been added in another CL.

Bug: 20421157
Change-Id: I9eb4b7dffd198ad24d02f656eaf0839570b59caa
2015-05-06 10:41:43 -07:00
Prerepa Viswanadham
d1808401ca Merge changes from topic 'mwd-merge-050415' into mnc-dev
* changes:
  Merge commit 'b6f59f4' into master_merge
  Merge commit 'f6db0ce' into master_merge
  Merge commit '17455a3' into master_merge
  Merge commit 'b4d5b32' into master_merge
  Merge commit 'a1a2fa7' into master_merge
  Merge commit '8dfdb98' into master_merge
  Merge commit 'eba66c3' into master_merge
2015-05-05 01:06:38 +00:00
Svet Ganov
b9d71a6f89 Add body sensors app op - framework base
Change-Id: Idd5cd573fab3405e5b2a6e51d2d9d115650826e9
2015-05-01 13:56:04 -07:00
John Spurlock
df7f02b6e0 am ad61b833: Merge "Fix no vibration during shutdown."
* commit 'ad61b8336aa9627a6ae19580bbdc370dc8bd6810':
  Fix no vibration during shutdown.
2015-04-30 12:47:20 +00:00
Dianne Hackborn
0b4daca9ba Implement user-settable power save whitelist.
The whitelist is now maintained by DeviceIdleController,
which is moving out into its own independent system service.
Network stats now queries it for the whitelist, instead of
collecting that itself.

Also did a few improvements in alarm manager -- made the
code for moving alarms out of the pending list more robust,
and fixed the debug output to always print the contents of
the pending list even if we aren't in a pending state.  (That
would have helped me identify the problem much earlier.)

Change-Id: I0f7119d4c553c3af4d77b2f71246fa6e2c13c561
2015-04-29 12:38:09 -07:00
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
riddle_hsu
d3b371755d Fix no vibration during shutdown.
In ShutdownThread:rebootOrShutdown, the vibrator is created
by "new SystemVibrator()" which will use default constructor
of Vibrator.

And because system server is not bound application,
ActivityThread.currentPackageName will be null.
Then the member mPackageName of Vibrator is null.

When doing vibration:
VibratorService.startVibrationLocked
 -> mAppOpsService.startOperation
 -> getOpsLocked (null package will get null op)
 -> return MODE_ERRORED
 -> no vibration

https://code.google.com/p/android/issues/detail?id=160830

Pass null context in SystemServer.performPendingShutdown
because vibrator service is not ready, and from the call
sequence, there is no available context to use.

Change-Id: I3e0175ba6dc2e1a92787873eda4461fba6e89783
2015-03-18 19:01:36 +00: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