summaryrefslogtreecommitdiffstats
path: root/services/jni
Commit message (Collapse)AuthorAgeFilesLines
* Move some system services to separate directoriesAmith Yamasani2013-12-1921-6102/+0
| | | | | | | | Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
* resolved conflicts for merge of 08579921 to klp-modular-devGreg Hackmann2013-12-171-14/+221
|\ | | | | | | Change-Id: I08e9f9a2d2185ccf0c41a87c8527ea7e02ac3117
| * Add timerfd backend to AlarmManagerServiceGreg Hackmann2013-12-161-14/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On devices without /dev/alarm, use a new backend based on timerfd. timerfd has near-equivalent syscalls for the /dev/alarm ioctls we care about, with two key differences: 1) /dev/alarm uses one fd for all clocks, while timerfd needs one fd per clock type. AlarmManagerService addresses this by replacing the fd (int) with an opaque pointer (long) to the backend-specific state. 2) When the RTC changes, the /dev/alarm WAIT ioctl always returns, while timerfd cancels (and signals events) only on specially-flagged RTC timerfds. The timerfd backend masks this by creating an extraneous RTC timerfd, specifically so there's always something to signal on RTC changes. Change-Id: I5aef867748298610347f6e1479dd8bf569495832 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | am 153ec6ca: am 3545433d: am 9f4e67c5: Merge "Clean up native ↵Greg Hackmann2013-12-171-19/+19
|\ \ | |/ | | | | | | | | | | AlarmManagerService tabs/spaces and unused parameter warnings" * commit '153ec6cae7db2053c71541af8973244f0dbf6d4a': Clean up native AlarmManagerService tabs/spaces and unused parameter warnings
| * Clean up native AlarmManagerService tabs/spaces and unused parameter warningsGreg Hackmann2013-12-121-19/+19
| | | | | | | | | | Change-Id: I64da1437dd0ed30957b43450c72b9d3797112a2e Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | Introduce a Lifecycle for system servicesAdam Lesinski2013-12-122-2/+2
|/ | | | | | | | | | | | | | | | | Provide an abstract class for system services to extend from, similar to the android.app.Service. This will allow services to receive events in a uniform way, and will allow services to be created and started in the correct order regardless of whether or not a particular service exists. Similar to android.app.Service, services are meant to implement Binder interfaces as inner classes. This prevents services from having incestuous access to each other and makes them use the public API. Change-Id: Iaacfee8d5f080a28d7cc606761f4624673ed390f
* Private flags are masked in correct variableAdam Lesinski2013-10-021-0/+6
| | | | | | | | | Newly added private flags were being masked in the public flag variable as opposed to the correct privateFlags variable. bug:11033280 bug:11043194 Change-Id: Idda3a70a083457f3f1b7d4b46d231f4a7e704cf0
* Ensure access to the map of geofence callbacks is synchronized in all casesdestradaa2013-09-201-0/+1
| | | | | | | Fix Java reference leak in the JNI layer Bug: 10624887 Change-Id: I656973653d82c73a7ba2b51f22989ffed144c5df
* Merge "consumer_ir: add length to get carrier freqs" into klp-devAlex Ray2013-09-121-1/+1
|\
| * consumer_ir: add length to get carrier freqsAlex Ray2013-09-111-1/+1
| | | | | | | | Change-Id: I2c1ac27e46c0bcfdfadef227a2fa79bdcf7085d4
* | Merge "Remove dependency on JNIHelp header side effects." into klp-devRuben Brunk2013-09-127-0/+7
|\ \ | |/ |/|
| * Remove dependency on JNIHelp header side effects.Ruben Brunk2013-09-107-0/+7
| | | | | | | | | | Bug: 10680559 Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
* | Merge "Fix exceptions in the Flp Hal layer: - JNI exception accessing a ↵destradaa2013-09-111-1/+1
|\ \ | | | | | | | | | geofence method with wrong signature - FlpHardwareProvider exception when the monitoring status contains no location information" into klp-dev
| * | Fix exceptions in the Flp Hal layer:destradaa2013-09-111-1/+1
| |/ | | | | | | | | | | | | | | - JNI exception accessing a geofence method with wrong signature - FlpHardwareProvider exception when the monitoring status contains no location information Bug: 10691492 Change-Id: I1959712912af712dc9dc344f20afd1112da46efc
* | Add consumer IR frameworkErik Gilling2013-09-113-0/+118
| | | | | | | | Change-Id: I786c00db0cce61ef75e4edc24e90f2cdcba6dbfb
* | Propagate input ANR reason to activity manager log.Jeff Brown2013-09-101-4/+8
|/ | | | | | | | Make it a little easier to diagnose input dispatch timeouts by providing the detailed reason as the ANR annotation in the log. Bug: 10689184 Change-Id: Ie18fd9ad066b0673d1f57c030e027ad0085f4650
* Fix leaks of JNI objects in the local reference tabledestradaa2013-08-231-0/+23
| | | | Change-Id: I769502f8b13e0025707abdf98c24f2cac0604602
* Fixes to FlpHal JNI layer.destradaa2013-08-211-4/+3
| | | | Change-Id: I6bc7cab7b8a042be89097f786b42d8b9ae0425ea
* Add support in the platform for Flp Geofencing.destradaa2013-08-131-37/+114
| | | | Change-Id: I0fb0e276d3a06322697bb5d46323779aca1f78c5
* Add FlpHal layer to support Location Batching.destradaa2013-08-083-0/+904
| | | | Change-Id: Ia3a57d869dfb3f067a1b95fa66d54f311ddcfdc3
* BatteryService use IBatteryProperties interfaces, drop JNITodd Poynor2013-07-303-477/+0
| | | | | | | | IBatteryPropertiesListener binder interface to deliver notifications of changed battery/power status from healthd system health daemon. healthd watches uevents from power_supply. Change-Id: I1ab38622baf28356a6627fe2354b77e2ef99d838
* Remove dead code in system server initialization.Jeff Brown2013-07-152-12/+18
| | | | | | | | | | | | System server always forks from Zygote so we no longer need the system_server executable which was probably broken anyhow. This makes the initialization sequence slightly more intelligible. Likewise, we don't need the GrimReaper anymore because init will automatically take care of restarting the system when the service manager dies. Change-Id: I02c88d9392f7c8133d9cde9d0d978da89ed80452
* Move input library code to frameworks/native.Jeff Brown2013-07-011-0/+1
| | | | | | | | | No longer compile libandroidfw as a static library on the device since it already exists as a shared library. Keeping the static library would force us to provide a static library version of libinput for the device as well which doesn't make sense. Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
* PowerManagerService: Don't reboot directly.Nick Kralevich2013-05-081-21/+0
| | | | | | | | | | | Instead of calling the reboot system call ourselves, send a message to init asking it to reboot the system. Init is in a better position to make sure the system is cleanly shutdown. Get rid of CAP_SYS_BOOT from system_server. Bug: 8646621 Change-Id: I200722412844ad8d99e35a442021c6263c3ebc05
* Pack preloaded framework assets in a texture atlasRomain Guy2013-05-023-1/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the Android runtime starts, the system preloads a series of assets in the Zygote process. These assets are shared across all processes. Unfortunately, each one of these assets is later uploaded in its own OpenGL texture, once per process. This wastes memory and generates unnecessary OpenGL state changes. This CL introduces an asset server that provides an atlas to all processes. Note: bitmaps used by skia shaders are *not* sampled from the atlas. It's an uncommon use case and would require extra texture transforms in the GL shaders. WHAT IS THE ASSETS ATLAS The "assets atlas" is a single, shareable graphic buffer that contains all the system's preloaded bitmap drawables (this includes 9-patches.) The atlas is made of two distinct objects: the graphic buffer that contains the actual pixels and the map which indicates where each preloaded bitmap can be found in the atlas (essentially a pair of x and y coordinates.) HOW IS THE ASSETS ATLAS GENERATED Because we need to support a wide variety of devices and because it is easy to change the list of preloaded drawables, the atlas is generated at runtime, during the startup phase of the system process. There are several steps that lead to the atlas generation: 1. If the device is booting for the first time, or if the device was updated, we need to find the best atlas configuration. To do so, the atlas service tries a number of width, height and algorithm variations that allows us to pack as many assets as possible while using as little memory as possible. Once a best configuration is found, it gets written to disk in /data/system/framework_atlas 2. Given a best configuration (algorithm variant, dimensions and number of bitmaps that can be packed in the atlas), the atlas service packs all the preloaded bitmaps into a single graphic buffer object. 3. The packing is done using Skia in a temporary native bitmap. The Skia bitmap is then copied into the graphic buffer using OpenGL ES to benefit from texture swizzling. HOW PROCESSES USE THE ATLAS Whenever a process' hardware renderer initializes its EGL context, it queries the atlas service for the graphic buffer and the map. It is important to remember that both the context and the map will be valid for the lifetime of the hardware renderer (if the system process goes down, all apps get killed as well.) Every time the hardware renderer needs to render a bitmap, it first checks whether the bitmap can be found in the assets atlas. When the bitmap is part of the atlas, texture coordinates are remapped appropriately before rendering. Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
* BatteryService: Fix compile warningTodd Poynor2013-04-221-0/+3
| | | | | | Add unhandled enum constant in switch. Change-Id: I3c7635d9cf1fa1e57b139b9b66103bf660afe3a4
* BatteryService: Fix detection of missing sysfs attributesTodd Poynor2013-04-221-8/+8
| | | | | | Recent conversion from char* to String8 broke these. Change-Id: I4528c3e4b90614cddbc173ee996c7fc1febb2cf5
* GPS Hardware geofencing.Jaikumar Ganesh2013-04-101-2/+177
| | | | | | Add support for doing geofencing in hardware. Change-Id: I6d5015190e8d84e1f4beb1010ed977a71c1622d0
* Add liblogYing Wang2013-04-091-0/+1
| | | | | Bug: 8580410 Change-Id: I746aa8258866508c3a725d0773faf4518096548f
* fix JNI use of incStrong/decStrongMathias Agopian2013-03-063-5/+5
| | | | Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
* Merge "BatteryService: Treat USB charging ports and charging accessories as AC"Todd Poynor2013-01-301-1/+2
|\
| * BatteryService: Treat USB charging ports and charging accessories as ACTodd Poynor2013-01-301-1/+2
| | | | | | | | Change-Id: If98330b09a1fc44992bb96195804d434a4e20470
* | Merge "BatteryService: Allow power supplies to switch type between AC and USB"Todd Poynor2013-01-301-82/+142
|\ \ | |/
| * BatteryService: Allow power supplies to switch type between AC and USBTodd Poynor2013-01-301-82/+142
| | | | | | | | | | | | | | | | | | | | Accomodate power_supply drivers that switch between MAINS and USB type according to the current power source. Re-read the type attribute when the power supply is online. Switch to String8 type for strings stored locally. Change-Id: Iacce49bf3ad85f35a7295a54df43aff7f94f3100
* | Optimize Looper JNI code.Jeff Brown2013-01-281-0/+5
|/ | | | | | | | | Use static native methods. Release the native looper objects as soon as the Looper quits instead of waiting until the GC finalizer to take care of it. Change-Id: I02783e48782a8f972ec2138862f700ade33d8e78
* Fix logging typos in GpsLocationProviderMagnus Eriksson2012-12-211-3/+3
| | | | | Change-Id: Ibf12947f3758defee990fbf685323334b8d1eeda Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
* am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
|\ | | | | | | | | * commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04': Correct executable bit for source files
| * Correct executable bit for source filesKenny Root2012-11-071-0/+0
| | | | | | | | | | | | | | | | | | Many media files and source code files were marked as executable in Git. Remove those. Also a shell script and python script were not marked as executable. Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
* | Fix a segfault when there is no power module.Jeff Brown2012-10-091-6/+8
| | | | | | | | | | | | | | This can happen in the emulator. Bug: 7315152 Change-Id: I4a3f547127419fcd4dc4fc1c6f7ee869706cf12e
* | Blank or unblank all displays as need.Jeff Brown2012-10-081-37/+19
| | | | | | | | | | | | | | | | Ensures that both the internal display and HDMI are blanked or unblanked in tandem. Bug: 7309812 Change-Id: Ie8b96d393e8bb20d23c92f3320142d9f7cf42aff
* | Merge "Pass display arg to blank/unblank" into jb-mr1-devAndy McFadden2012-09-281-2/+4
|\ \
| * | Pass display arg to blank/unblankAndy McFadden2012-09-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | blank() and unblank() now take a display argument. For now, just pass the default display in. Bug: 7240511 Change-Id: I7747732471c9116cb6b3686bd95d5f32a63279a6
* | | Bundle correlated switch changes atomically.Jeff Brown2012-09-271-6/+6
|/ / | | | | | | | | | | | | This is a prerequisite for headset jack detection on Manta. Bug: 6548391 Change-Id: I549a194344511c0cee578b00f6a9ab5fdbdfb99c
* | Use more reasonable warning thresholds for power on/off.Jeff Brown2012-09-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To encourage vendors to make power on/off as efficient and responsive as possible, we log some warnings whenever it is too slow. The previous thresholds were a little unreasonable mainly because we wanted to understand how long the process tends to take even when it's fast. Raise the warning limit while still being aggressive about timings. Ideally we want the screen to turn on/off within no more than a few frames. Bug: 7167820 Change-Id: Id28dbf8c91cefa7ae7544b72887104af7aabccff
* | Make input system aware of multiple displays.Jeff Brown2012-09-102-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input system needs to know about the window that has focus, even if it is on a secondary display. So now we send it the list of all windows and indicate which display they are on. We filter the list of windows as necessary when delivering touch events. To keep things simple, monitor input channels and input filters are not supported except on the main display. We also do not pass the display id to applications; it is only used inside the input system for now. Properly scale touch coordinates based on the viewport. This will be needed to ensure that touch works on external display as well as when the internal display is being used to simulate a different resolution. Change-Id: I1815579a52fcc852c519b5391fc7ab8767c2dc59
* | Make display manager tell input system about viewports.Jeff Brown2012-09-081-84/+42
| | | | | | | | | | | | | | The window manager is no longer responsible for telling the input system about the display viewport. Change-Id: I932882bae55decef55f25093bb2a7ebac1620bb1
* | Add plumbing for new surface flinger display API.Jeff Brown2012-08-273-98/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaned up the implementation of Surface and SurfaceSession to use more consistent naming and structure. Added JNI for all of the new surface flinger display API calls. Enforced the requirement that all Surfaces created by the window manager be named. Updated the display manager service to use the new methods. Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
* | Use new surface flinger API.Jeff Brown2012-08-271-1/+5
| | | | | | | | Change-Id: Ic888577408a59a36481a48010e19c5e77c24e211
* | BatteryService: Fix comment to match codeScott Anderson2012-08-211-2/+2
| | | | | | | | | | Change-Id: Ib4e30e7808ff3a2a8a49c000eac719a3a4273fdd Signed-off-by: Scott Anderson <saa@android.com>
* | Merge "Plumb the switch code into Dalvik." into jb-mr1-devJeff Brown2012-08-201-11/+6
|\ \