summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Fix a race condition in NativeDaemonConnectoranga2011-02-071-1/+2
| | | | | | | | | | | Fixes a race between the onDaemonConnected callback and setting the mOutputStream in NativeDaemonConnector. MountService connects to vold using the NativeDaemonConnector. Throws a “NativeDaemonConnectorException: No output stream!” when the onDaemonConnected callback in MountService calls the doListCommand. Change-Id: Ib895bab37f7df680e4362df6366198c0a673c5e9
* Merge "Fixing possible race condition."Dianne Hackborn2011-02-061-2/+1
|\
| * Fixing possible race condition.Jozef BABJAK2011-02-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | That return statement is effectively a reading of asynchronously modified field. The reading and writing is elsewhere protected by locking on thread instance, except this one occurence. Moving 'return' statement into synchronized block ensures that it reads updated value. Don't be afraid of deadlock - wait() releases the lock and acquires it back when notified. Change-Id: I940c24c04a1a2d4508d14d11b6174ff4fb2ab7d5
* | Initialize resampling buffer per track.Yuuhi Yamaguchi2011-02-041-1/+1
|/ | | | | | | | When resampling too short sound, AudioMixer uses previous tracks buffer. So we re-initialize the temporary buffer per loop to avoid it. Change-Id: I55a59a3b14faa8445e09c450478fe79cef704760
* frameworks/base: Track owner in appropriate owners list of UriVairavan Srinivasan2011-01-211-6/+9
| | | | | | | | | The owner isn't kept track it URI's writeOwners when grantUriPermissionUncheckedLocked is invoked to provide both read and write access to the URI. Fix is to check for both read and write permissions and add owner to appropriate lists. Change-Id: Id23688b96aefeb0a4911ee52ad47124bc5904fa0
* Avoiding cyclic references when unbinding from a serviceMattias Petersson2011-01-071-0/+1
| | | | | | | | | | | | | Cyclic references can occur between a Service object held by an application and a ServiceRecord object held by the system server. A part of the problem is that binders are leaked and since many binders are implemented by inner classes of services these services are also leaked. This causes low memory problems. The solution is: When a Service is beeing destroyed, go through the ServiceRecord's all IntentBindRecord and set its binder references to null. This allows the binder and the service object to be garbage collected. Change-Id: I5a257521964851f34c08ffb3908feaad96b1bafe
* Clear reference to the IIntentReceiver in order to avoid memory leakJohannes Carlsson2011-01-042-1/+4
| | | | | | | | | | | | | | When using sendOrderedBroadcast(..) with a BroadcastReceiver the BroadcastReceiver instance was not released. The reason for this was that the resultTo field in the BroadcastRecord kept a reference until it was pushed out of the mBroadcastHistory. This reference in turn kept a reference to the process side IIntentReceiver (implemented in ReceiverDispatcher$InnerReceiver). This in turn had a strong reference (through mStrongRef) to the Context. In order to keep the debug output the resultTo is also kept as a String in the new resultToString variable. Change-Id: I4382a22a541c27b3694fb2b78a04ee820b235f8f
* Merge "frameworks/base: Fix to release references to previous live wallpaper"Dianne Hackborn2010-12-231-0/+2
|\
| * frameworks/base: Fix to release references to previous live wallpaperVairavan Srinivasan2010-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | The service connection to the previous live wallpaper is unbound when a new wallpaper is effective. Although the service connection is unbound it is not disconnected and its reference to wallpaper's service and engine is still effective. This adds up to the total JNI references and causes dalvik (hosting system_server) to abort. Fix is to release the references in clearWallpaperComponentLocked. Change-Id: Idd2bab83a56d2e6c6dd7ab9be08d5e14887aa384
* | frameworks/base: Fix to release references in ActivityManagerServiceVairavan Srinivasan2010-12-231-0/+8
|/ | | | | | | | | | | | | | | ServiceRecord's bindings is a hashmap to keep track of all active bindings to the service. This is not cleared when the service is brought down by activity manager. This adds up the references to IntentBindRecords and its references to ServiceRecord. Fix is to clear the bindings. ServiceRecord's restarter is a reference to the service and is not cleared when the service is brought down by activity manager. This adds up the references to ServiceRecord. Fix is to set the reference to null when the service is brought down by activity manager. Change-Id: Ica448cd5f60192c8adb23209b5d0e2cf0c04e446
* Improve performance of WindowState.toString()Mattias Petersson2010-12-211-3/+13
| | | | | | | | | | | | This fix improves the performance by caching the string that should be returned, and reuse it next time if possible. This will make it faster to switch between activities, approximately half the time to create the new view when changing from landscape to portrait. Also, the time for starting a new application is be reduced as WindowState.toString is being called thousands of times in this case. Change-Id: I2b8b9bc1e251d1af43b6c85f049c01452f2573a2
* resolved conflicts for merge of 4b94c451 to stage-korg-masterJean-Baptiste Queru2010-12-131-2/+9
|\ | | | | | | Change-Id: I07b974f96ca598677e58623050e4668822e68f23
| * Added dropbox broadcast notificationHakan Still2010-12-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | To monitor the dropbox an application have to either poll the dropbox and keep track of all entries or observ the /data/system/dropbox directory. The later requires that the application runs as system-user. This commit adds that a broadcast intent is sent when something is written to the dropbox and an application can just listen on this intent and then reads the entry with help of the DropboxManager class. The application have to hold the permission android.permission.READ_LOGS to get the intent. Change-Id: I1f77f206a243df69f4ed5306078c47f7bf6181ec
* | resolved conflicts for merge of bf1439c5 to stage-korg-masterJean-Baptiste Queru2010-12-021-1/+2
|\ \ | |/ | | | | Change-Id: Iab543a7ee449025f1df5d58afaa8f8fdd4809c99
| * Preserve flags field of event passed to injectKeyEvent()Mike Playle2010-12-021-1/+2
| | | | | | | | | | | | | | | | This patch allows users of WindowManagerService.injectKeyEvent() to set flags on the key event being injected. In particular this allows long presses (FLAG_LONG_PRESS) to be injected into the window manager.
* | am 671a6ff4: Add support for virtual sensors.Mathias Agopian2010-11-1815-204/+1296
|\ \ | | | | | | | | | | | | * commit '671a6ff4be11b3e2d8eb017e0c7a78e6133fb2b8': Add support for virtual sensors.
| * | 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
* | | am 305bc0fe: Merge "Fix a race condition in sensormanager" into gingerbreadMathias Agopian2010-11-152-1/+8
|\ \ \ | |/ / | | | | | | | | | * commit '305bc0fe977f6197bfae847dbaf58916cf8980ba': Fix a race condition in sensormanager
| * | 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
* | | am fcab475c: Merge "record the last event received regardless of having ↵Mathias Agopian2010-11-112-14/+22
|\ \ \ | |/ / | | | | | | | | | | | | | | | clients or not" into gingerbread * commit 'fcab475c906da5c159bc56a32c2610f6f55eafd9': record the last event received regardless of having clients or not
| * | 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
* | | am 9de93424: Merge "Without SD card the shutdown sequence was delayed"Brad Fitzpatrick2010-11-101-0/+11
|\ \ \ | | |/ | |/| | | | | | | * commit '9de93424cc05446e3a216f406c55a3937c028416': Without SD card the shutdown sequence was delayed
| * | Without SD card the shutdown sequence was delayedJohan Alfven2010-11-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the memory card is not inserted (or removed) from the phone the shut down process is very long. It takes almost 24 seconds. For the phone with memory card the averige is 5-6 seconds Make sure to send onShutDownComplete even if an SD card is not mounted and no unmount is done. Change-Id: I0e79b82e294a971f5e7144cdd3cc16b7ff414b9c
* | | am cd43fbb4: Merge "improve sensorservice dumpsys and increase the max ↵Mathias Agopian2010-11-083-5/+16
|\ \ \ | | |/ | |/| | | | | | | | | | | | | sensor rate to 1 ms (1000Hz)" into gingerbread * commit 'cd43fbb4537487a9c3185e919904f8b0c93daee6': improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)
| * | 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
* | | am 70fc04c8: Reorganize PackageManager dump to avoid NPEKenny Root2010-11-051-2/+2
|\ \ \ | |/ / | | | | | | | | | * commit '70fc04c84db8f99ac2ac60fd9719b91057aacc9b': Reorganize PackageManager dump to avoid NPE
| * | 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
* | | am a87ea46c: Fix bugs related to cheek event suppression.Jeff Brown2010-11-011-2/+2
|\ \ \ | |/ / | | | | | | | | | * commit 'a87ea46cb023763e0a9b0222da20b0a354f79d8d': Fix bugs related to cheek event suppression.
| * | 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
* | | am c9fa90f9: Merge "GPS: remove some logging" into gingerbreadMike Lockwood2010-10-281-4/+0
|\ \ \ | |/ / | | | | | | | | | * commit 'c9fa90f94b664589d584bb433e748e2b01b368c9': GPS: remove some logging
| * | GPS: remove some loggingMike Lockwood2010-10-281-4/+0
| | | | | | | | | | | | | | | Change-Id: Ib2dca53364c9da207a87f2664b54d2ec1d1bd8d9 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | am 7d452f69: Merge "really fix [3118445] Transform * Transform does not work ↵Mathias Agopian2010-10-273-13/+47
|\ \ \ | |/ / | | | | | | as expected" into gingerbread
| * | 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
* | | am 1d28a840: Merge "Location Manager: Fix LocationManager.getBestProvider ↵Mike Lockwood2010-10-261-6/+7
|\ \ \ | |/ / | | | | | | filtering." into gingerbread
| * | 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>
* | | am 11e2e9b0: Merge "Don\'t turn the button backlights on if the screen is ↵Joe Onorato2010-10-261-0/+8
|\ \ \ | |/ / | | | | | | off. Part 2." into gingerbread
| * | 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
* | | resolved conflicts for merge of b4ae2f1b to gingerbread-plus-aospJean-Baptiste Queru2010-10-251-1/+1
|\ \ \ | | |/ | |/| | | | Change-Id: I9d4e2649375d9262efe8aaade0778f638d04afa8
| * | Merge "frameworks/base: Handle null from topRunningNonDelayedActivityLocked"Jean-Baptiste Queru2010-10-251-1/+1
| |\ \
| | * | frameworks/base: Handle null from topRunningNonDelayedActivityLockedVairavan Srinivasan2010-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | startActivityUncheckedLocked tries to move the target task to front when it is not at front. topRunningNonDelayedActivityLocked is used to find the current task, however null value isn't handled. This null causes an unhandled exception leading to the android framework reboot. Change-Id: I2a43cda50483e28a4456846d8b3ccb30d7cf110e
* | | | am 8c32bddf: Merge "GPS: Disable verbose logging" into gingerbreadMike Lockwood2010-10-252-5/+7
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | Merge commit '8c32bddfac259543f4ed87341fce42bc5ed60506' into gingerbread-plus-aosp * commit '8c32bddfac259543f4ed87341fce42bc5ed60506': GPS: Disable verbose logging
| * | | 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>
* | | | | am 457bed2b: Merge "fix [3123221] Video sticks playing back upside down ↵Mathias Agopian2010-10-252-0/+16
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | following orientation switch" into gingerbread Merge commit '457bed2bc6561dd67429dde238453fee8602fa9b' into gingerbread-plus-aosp * commit '457bed2bc6561dd67429dde238453fee8602fa9b': fix [3123221] Video sticks playing back upside down following orientation switch
| * | | | 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
* | | | | am ce4d36ad: Merge "fix [3118445] Transform * Transform does not work as ↵Mathias Agopian2010-10-254-46/+87
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expected" into gingerbread Merge commit 'ce4d36ad729f83253d4c5ec9906148f45cc00f8e' into gingerbread-plus-aosp * commit 'ce4d36ad729f83253d4c5ec9906148f45cc00f8e': fix [3118445] Transform * Transform does not work as expected
| * | | | 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
* | | | | am 89821204: Merge "Remove the FLIP_H/ROT_90 workaround from ↵Wu-cheng Li2010-10-252-11/+5
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CameraService.do not merge" into gingerbread Merge commit '89821204379816f6bee6902c4f132c014700c3b0' into gingerbread-plus-aosp * commit '89821204379816f6bee6902c4f132c014700c3b0': Remove the FLIP_H/ROT_90 workaround from CameraService.do not merge