summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Add support for virtual sensors.Mathias Agopian2010-11-1815-204/+1296
| | | | | | | | | | | | | | | | | | | | | | Rework sensorservice to allow "virtual sensors", that is sensors that report a synthetized value based on real sensors. the main change to sensorservice is around managing which real sensor need to be activated and which rate to use. The logic for all this has been moved into SensorDevice, which essentially wraps the sensor HAL but adds two features to it: - it keeps track of which sensors need to be activated - it keeps track of what rate needs to be used For this purpose an "identity" is associated with each real sensor activation, so we can track them. On start-up we check for gravity, linear-acceleration and rotation-vector sensors, if they're not present in the HAL, we synthetize them in sensor-service. Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800
* Fix a race condition in sensormanagerMathias Agopian2010-11-142-1/+8
| | | | | | | | | | | | the per-connection state assumed the main sensorservice lock was held during access. This is however not true while pre-processing the events just before sending them to clients. Therefore, there was a small window during which this state could be modified while being used. we now have an internal lock that protects this state. Change-Id: I594680f20f09d6a4f1f38f093a1d3f650dcef1be
* record the last event received regardless of having clients or notMathias Agopian2010-11-102-14/+22
| | | | | | | | | | | | We only recorded the last received event (which is needed when a sensor is activated on a connection) when there was some connection active. This should fix an issue where sometimes the light sensor doesn't return an event whent activated. we also didn't need to hold the main lock while dispatching events to clients. Change-Id: I6c6386c040051ce205e3c0516c678e0603fa45e1
* improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)Mathias Agopian2010-11-083-5/+16
| | | | | | | the increased maximum rate is needed for proper gyro integration, current gyro parts can sample at up to 800Hz Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794
* Reorganize PackageManager dump to avoid NPEKenny Root2010-11-051-2/+2
| | | | | | | | | versionCode and mVersionName were added recently but ps.pkg can be null in some situations. Move them to where it will check before dereferencing it. Bug: 3152896 Change-Id: If992a1f29ac7b8f595f847b7743fd2374662bb6e
* Fix bugs related to cheek event suppression.Jeff Brown2010-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two issues: 1. First, due to an inverted conditional in the input dispatcher, we were reporting touches as long touches and vice-versa to the power manager. 2. Power manager user activity cheek event suppression also suppresses touch events (but not long touch or up events). As a result, if cheek event suppression was enabled, touches would not poke the user activity timer. However due to the above logic inversion, this actually affected long touches. Net result, if cheek suppression was enabled in the power manager and you held your thumb on the screen long enough, the phone would go to sleep! Cheek event suppression is commonly turned on when making a phone call. Interestingly, it does not seem to get turned off afterward... This change fixes the logic inversion and exempts touches from the cheek suppression. The reason we do the latter is because the old behavior was actually harmful in other ways too: a touch down would be suppressed but not a long touch or the touch up. This would cause bizarre behavior if you touched the screen while it was dimmed. Instead of brightening immediately, it would brighten either when you lifted your finger or 300ms later, whichever came first. Bug: 3154895 Change-Id: Ied9ccec6718fbe86506322ff47a4e3eb58f81834
* GPS: remove some loggingMike Lockwood2010-10-281-4/+0
| | | | | Change-Id: Ib2dca53364c9da207a87f2664b54d2ec1d1bd8d9 Signed-off-by: Mike Lockwood <lockwood@android.com>
* really fix [3118445] Transform * Transform does not work as expectedMathias Agopian2010-10-273-13/+47
| | | | | | | | Two bugs were counter acting each other. - rotation matrices are on the left-hand side of multiplies - the transform of the overlay is applied before that of the layer Change-Id: Ia79bd368e9b719235c89ecf244ea263f01ce906a
* Location Manager: Fix LocationManager.getBestProvider filtering.Mike Lockwood2010-10-261-6/+7
| | | | | | | | | | getBestProvider should only return location providers that the client has permission to use. BUG: 3124614 Change-Id: I065091d0445092563bc53fb4f7d93a1ab6bebb9a Signed-off-by: Mike Lockwood <lockwood@android.com>
* Don't turn the button backlights on if the screen is off. Part 2.Joe Onorato2010-10-251-0/+8
| | | | | | | | | | | | | | | | | | | | | These are the logs from when I just reproduced it here. This means that we got an event after the screen turned off. So isScreenTurningOffLocked() is working, but we need to also check that we're not off. This bug is happening because lightSensorChangedLocked is calling mButtonLight.setBrightness() directly instead of going through updateLightsLocked, which is where I added that check to not turn the buttons on of the screen is off. D/PowerManagerService( 1243): onSensorChanged: light value: 1280 I/power ( 1243): *** set_screen_state 0 D/PowerManagerService( 1243): enableLightSensor false D/PowerManagerService( 1243): onSensorChanged: light value: 320 D/PowerManagerService( 1243): lightSensorChangedLocked 320 D/PowerManagerService( 1243): lcdValue 55 D/PowerManagerService( 1243): buttonValue 255 D/PowerManagerService( 1243): keyboardValue 0 D/SurfaceFlinger( 1243): About to give-up screen, flinger = 0x8dcf! 0 Bug: 3117801 Change-Id: I722d66cafba71b183cc987b7383d4ad7e171ba82
* Merge "GPS: Disable verbose logging" into gingerbreadMike Lockwood2010-10-252-5/+7
|\
| * GPS: Disable verbose loggingMike Lockwood2010-10-252-5/+7
| | | | | | | | | | | | | | BUG: 3127049 Change-Id: I9efd9eb7ff69724b133f3b70c52e173f49ddfbc5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | Merge "fix [3123221] Video sticks playing back upside down following ↵Mathias Agopian2010-10-252-0/+16
|\ \ | | | | | | | | | orientation switch" into gingerbread
| * | fix [3123221] Video sticks playing back upside down following orientation switchMathias Agopian2010-10-242-0/+16
| |/ | | | | | | | | | | | | the overlay wasn't reconfigured when the screen-orientation changed. It was only done when a parameter of the surface itself changed. Change-Id: I0ca0925bf58ded4c91ab89d12cb1fe4d1477c96c
* | Merge "fix [3118445] Transform * Transform does not work as expected" into ↵Mathias Agopian2010-10-254-46/+87
|\ \ | | | | | | | | | gingerbread
| * | fix [3118445] Transform * Transform does not work as expectedMathias Agopian2010-10-244-46/+87
| |/ | | | | | | | | | | | | | | | | | | | | | | The problem wasn't in the multiply operator, but rather in the code that built the transform from the HAL bitmask. We now use the multiply operator to build the Transform from the bitmask, which guarantees, it'll always be correct. Also added a simple test for Transform. Change-Id: I09bf3b0e51d92f59d83ea91c4cc94fc2aa0bf227
* | Merge "Remove the FLIP_H/ROT_90 workaround from CameraService.do not merge" ↵Wu-cheng Li2010-10-252-11/+5
|\ \ | |/ |/| | | into gingerbread
| * Remove the FLIP_H/ROT_90 workaround from CameraService.do not mergeWu-cheng Li2010-10-252-11/+5
| | | | | | | | | | | | Now overlay does flip before rotation. bug:3114236 Change-Id: I1780e56154566435a0ceeb2f101de7ed0a0613cb
* | Make sure that when the screen is off, we don't try to turn the buttons on too.Joe Onorato2010-10-231-2/+16
|/ | | | | Bug: 3117801 Change-Id: I763f114a2b0426660d29bbda04ea7db12c1137e8
* Fix issue #3122240: Expose xlarge in GB.Dianne Hackborn2010-10-221-1/+1
| | | | | | Plus some other small API cleanup. Change-Id: I1a3c60f510f99224cccac9cc3f838f04141064f8
* GPS: Fix network type logic in requestRefLocationMike Lockwood2010-10-221-7/+14
| | | | | Change-Id: I20ef81bcf029b289389dba57e6cf457fda5acbf4 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Merge "Adjust boundaries for screen sizes." into gingerbreadDianne Hackborn2010-10-211-2/+2
|\
| * Adjust boundaries for screen sizes.Dianne Hackborn2010-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | Part of issue #3116702: New manifest tags for supported screen sizes Kind-of. If you turn your head side-ways. Change-Id: I446f1e2eadba1ce284c93ff9fb0197bb0e6b0fca
* | Merge "Mirror the preview for front-facing cameras. do not merge" into ↵Mathias Agopian2010-10-212-19/+43
|\ \ | |/ |/| | | gingerbread
| * Mirror the preview for front-facing cameras. do not mergeWu-cheng Li2010-10-202-19/+43
| | | | | | | | | | | | | | | | Now overlay does ROT_90 before FLIP_V or FLIP_H. It should be FLIP_V or FLIP_H first. The formula should be changed after overlay is fixed. bug:3059865 Change-Id: Ie4366bf7f1fcac7383e8dfc74b1b865997bbbcc6
* | Merge "Use the context_priority extension when present." into gingerbreadMathias Agopian2010-10-202-2/+16
|\ \
| * | Use the context_priority extension when present.Mathias Agopian2010-10-112-2/+16
| | | | | | | | | | | | Change-Id: I12eadf1e32d576de5d811fba44afa73263e13eef
* | | Fix isUsbMassStorageConnected() will always return trueTony Wu2010-10-201-1/+1
| |/ |/| | | | | | | | | | | After UMS mounted, isUsbMassStorageConnected() will always return true even if USB is disconnected. It's because mUmsEnabling will always be ture. Change-Id: Ib24b2359ea2684eb0a9faeb880f383e87630e6e1
* | Reduce logging.Joe Onorato2010-10-198-22/+38
| | | | | | | | | | | | | | | | | | | | Remember, the system and main logs are - Shared resources - Primarily for recording problems - To be used only for large grained events during normal operation Bug: 3104855 Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
* | DO NOT MERGE. Turn down backup logging for release.Chris Tate2010-10-191-1/+1
| | | | | | | | Change-Id: Ib9f4fd15981fcf52b5d5912995c1891836303427
* | Merge "Don't symlink native library paths for old apps" into gingerbreadKenny Root2010-10-191-7/+18
|\ \
| * | Don't symlink native library paths for old appsKenny Root2010-10-181-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apps that existed in an ASEC container before we put native libraries in the ASEC container will have their native libraries in the /data/data/<app>/lib directory. Don't try to symlink to the ASEC container's library directory in this case. Bug: 3108230 Change-Id: I32167341cc8ff8c005e50f456ee7c783bfb0bf22
* | | Merge "GPS: Enable some more logging" into gingerbreadMike Lockwood2010-10-182-2/+5
|\ \ \
| * | | GPS: Enable some more loggingMike Lockwood2010-10-182-2/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I7d13c859002fa96fa8c361c0c709931c6b12eb99 Signed-off-by: Mike Lockwood <lockwood@google.com>
* | | | Merge "Enable framework GPS and location manager logging" into gingerbreadMike Lockwood2010-10-182-8/+12
|\ \ \ \ | |/ / /
| * | | Enable framework GPS and location manager loggingMike Lockwood2010-10-182-8/+12
| |/ / | | | | | | | | | | | | Change-Id: Id54fc01e7288e7d90d7b76824b708bcb2ee88333 Signed-off-by: Mike Lockwood <lockwood@google.com>
* | | Pressing the power button quickly needs to turn the screen on and off correctly.Joe Onorato2010-10-181-22/+21
|/ / | | | | | | | | | | | | This does the animation with the power manager lock held, which isn't great, but is safe. Bug: 3102208 Change-Id: Ib0af3fab1cf6ba47053c10ae8b701376d63802ff
* | Implement issue #3094621 and #3094609 - wipe sd cardDianne Hackborn2010-10-163-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 3094621: add "wipe sd card" option to factory data reset 3094609: collapse unmount/format into one command Also since we have decided that it is important to consider the Crespo storage as internal storage, DevicePolicyManager gets a new API to be able to wipe it. (No big deal, since all of the work for this is now done in the implementation of the new UI.) Change-Id: I32a77c410f710a87dcdcbf6586c09bd2e48a8807
* | Add support for secure system overlays. (DO NOT MERGE)Jeff Brown2010-10-152-2/+2
| | | | | | | | | | | | | | | | | | | | This change adds a new window type for secure system overlays created by the system itself from non-secure system overlays that might be created by applications that have the system alert permission. Secure views ignore the presence of secure system overlays. Bug: 3098519 Change-Id: I8f8398f4fdeb0469e5d71124c21bedf121bd8c07
* | Work on issue #3101415: Crespo apps seem to have their UID changed over time.Dianne Hackborn2010-10-156-7/+23
| | | | | | | | | | | | fsync! Change-Id: Ie6c5397202579935ac69bf61d3e7b3081ecf269c
* | Debug logs for issue #3101415: Apps seem to have their UID changed over time.Dianne Hackborn2010-10-152-24/+30
| | | | | | | | | | | | | | | | - Activity manager now prints the pid doing a startActivity request. - Package manager now remembers messages about problems it has parsing packages.xml. Change-Id: I11a75aa3953dbfa5dd41cfbdf69116c764ec228f
* | NFC: Move NFC service implementation out of system_server.Nick Pelly2010-10-153-2172/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NFC service is now an application service in packages/apps/Nfc. NFC service is registered through ServiceManager.addService(), and the proxy object NfcAdapter obtains a handle to it through ServiceManager.getService(). **Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and modify service_manager.c, Process.java and PackageManagerService.java in order to force the com.android.nfc process to take a fixed uid, so that it can use ServiceManager.addService(). Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and NdefMessage require some in-process native code, so android_com_NdefMessage.cpp and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to a very small library libnfc_ndef.so that implements NDEF message parsing. This has been added to core.mk so all devices (even without NFC hardware) can work with NDEF data. Bug: 3041259 Bug: 3097445 Change-Id: If8f00ce8f2053acfc9319ca366d4a9c02bd396e6 Signed-off-by: Nick Pelly <npelly@google.com>
* | Merge "Screen on/off animation tweaks" into gingerbreadJoe Onorato2010-10-142-7/+38
|\ \
| * | Screen on/off animation tweaksJoe Onorato2010-10-142-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Pass to surface flinger whether we want animations or not. - Don't use the animation when the screen goes off because of the prox sensor. - Turn the screen-on animation back off - Also, now the animation setting controls whether or not we do the animation. Bug: 3097475 Bug: 3098508 Change-Id: I205d5564d6668b33a8dc1c40d8cc06c4aad305cf
* | | [3095807] screen takes a long time to turn onMathias Agopian2010-10-141-2/+3
|/ / | | | | | | | | | | turn on animation is now ~200 ms (12 frames). Change-Id: I49ca9e8d0afa566349d360b3b6c88f0d55aa6e75
* | addresses parts of 3096779 and 3097475Mathias Agopian2010-10-142-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 3097475: Animation setting should control the screen on animation 3096779: CRT power-on animation can briefly show the top app instead of lockscreen There is now a parameter that controls wether the ON and/or OFF animation are performed. we also always clear the screen to black on power off, to make sure it won't briefly appear on power on. HOWEVER, 3096779 is not 100% fixed in the case where we're doing the animation because there is a race, where SF doesn't wait (b/c it doesn't know) for the framework to have redrawn the lockscreen. Change-Id: Ie0f02c9225fcdf24b1e8907e268eb7da2c5b0a03
* | fix [3095607] Gingerbread screen turn-on animation does not show the last frameMathias Agopian2010-10-141-6/+5
| | | | | | | | | | | | | | | | | | always redraw the screen entirely after the power-on animation, because: - the animation may not run (ie: on the emu) - the animation may not contain the video planes - the interpolation may not be perfect and not land exactly on the last frame Change-Id: I9ba40f537b1e94464f8a3ed6f81e7c2f552df51d
* | may fix 3097381 and 3097482. don't abort on/off if the animation failsMathias Agopian2010-10-141-10/+7
| | | | | | | | | | | | | | | | now that sf handles more of the screen on/off state, we don't want to abort because/if the animation fails for some reason (which will be the case on the emulator). Change-Id: I239e0a39cf8aff3074647e82db92de4a0bf0e494
* | Merge "OBB: use PBKDF2 for key generation." into gingerbreadKenny Root2010-10-131-8/+32
|\ \
| * | OBB: use PBKDF2 for key generation.Kenny Root2010-10-131-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to using PBKDF2 for the key generation for OBBs. Any previously generated OBBs will stop being read correctly. A small pbkdf2gen program is available to allow generation of appropriate keys with the salts. Bug: 3059950 Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295