3758 Commits

Author SHA1 Message Date
Xavier Ducrohet
ce57a7f353 am 6504490c: am dff6b8e7: Merge "Add --non-constant-id to aapt."
* commit '6504490cde3ec5d48321d539e654d1f2072b33f9':
  GpsLocationProvider: Clean up HAL initialization/cleanup sequence
  Fixed GSM encoded network initiated position request
  Ensuring thread-safe usage of DateFormat.
  Fixing infinite loop for zero duration.
  Fix for an infinite loop while scrolling lists.
  WAPPushManager, WAP Push over SMS message handler
  Add --non-constant-id to aapt.
2011-02-28 09:51:38 -08:00
Xavier Ducrohet
6504490cde am dff6b8e7: Merge "Add --non-constant-id to aapt."
* commit 'dff6b8e71dda9f5d841fa26408714aec2aef1505':
  GpsLocationProvider: Clean up HAL initialization/cleanup sequence
  Fixed GSM encoded network initiated position request
  Ensuring thread-safe usage of DateFormat.
  Fixing infinite loop for zero duration.
  Fix for an infinite loop while scrolling lists.
  WAPPushManager, WAP Push over SMS message handler
  Add --non-constant-id to aapt.
2011-02-28 09:16:38 -08:00
Jamie Gennis
e630e5f49b am 919853ce: Merge "Prevent SurfaceFlinger from using layer token 31." into gingerbread
* commit '919853ce244f853966817d4adb2f3b7b6e4bbe74':
  Prevent SurfaceFlinger from using layer token 31.
2011-02-27 15:44:36 -08:00
Jamie Gennis
919853ce24 Merge "Prevent SurfaceFlinger from using layer token 31." into gingerbread 2011-02-27 15:27:22 -08:00
Mike Lockwood
0a5098106c GpsLocationProvider: Clean up HAL initialization/cleanup sequence
Change-Id: Id5467000f3f3da5cbe1f112dad97a032688d2eac
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-23 14:01:44 -08:00
Robert Greenwalt
de27b51958 am 3259d885: Merge "DO NOT MERGE - backport of l92a02b31 from master" into gingerbread
* commit '3259d8853760a72b811757e1711119d041962a1c':
  DO NOT MERGE - backport of l92a02b31 from master
2011-02-16 10:51:04 -08:00
Robert Greenwalt
7e62fd1436 DO NOT MERGE - backport of l92a02b31 from master
Fix handling of multiple possible default networks.

bug:3328196
Change-Id: I994f1621ff82de454192945a9cae961e1710d537
2011-02-11 17:32:58 -08:00
Jamie Gennis
c86d904b71 Prevent SurfaceFlinger from using layer token 31.
Bug: 2964479
Change-Id: I81e948924bff35b8b300d409f2c09f3779bcdeec
2011-02-10 16:18:36 -08:00
Mathias Agopian
d0f27f435e am ada1b6f2: Merge "fix [3421350] Killing a game that uses the accelerometer renders the device unable to sleep" into gingerbread
* commit 'ada1b6f297596cac4451edbc83df060a31cdda68':
  fix [3421350] Killing a game that uses the accelerometer renders the device unable to sleep
2011-02-09 13:09:12 -08:00
Brad Fitzpatrick
b901c9abff am 9204644d: Merge "Fix a race condition in NativeDaemonConnector"
* commit '9204644d9e8fc2a3d05ff386b14b349f7a117694':
  Fix a race condition in NativeDaemonConnector
2011-02-07 10:04:54 -08:00
anga
030bc88b4c Fix a race condition in NativeDaemonConnector
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
2011-02-07 09:53:59 -08:00
Dianne Hackborn
4b7c1cacca am bb2e1ef8: Merge "Fixing possible race condition."
* commit 'bb2e1ef87fe4c5123340035766c759155e6bb90c':
  Fixing possible race condition.
2011-02-07 07:33:38 -08:00
Dianne Hackborn
bb2e1ef87f Merge "Fixing possible race condition." 2011-02-06 09:06:35 -08:00
Brad Fitzpatrick
f664d6f916 am b083d3b8: Merge "Initialize resampling buffer per track."
* commit 'b083d3b816378ef3b9dceb33b2c2e20510b2632b':
  Initialize resampling buffer per track.
2011-02-04 10:27:54 -08:00
Yuuhi Yamaguchi
681d818523 Initialize resampling buffer per track.
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
2011-02-04 15:24:34 +01:00
Mathias Agopian
7dce874f0d fix [3421350] Killing a game that uses the accelerometer renders the device unable to sleep
when an app dies, make sure to disable all sensors that process
is connected to, regardless of wether this was the LAST connection
to this sensor.

Change-Id: I400fa1c1389b2bd05a1d19abea8a35ec5bcba273
2011-02-03 16:37:31 -08:00
Jozef BABJAK
06e57b5d46 Fixing possible race condition.
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
2011-02-01 08:53:52 +01:00
Dianne Hackborn
b04ec6a8a7 am 7a7ed2b2: Merge "Do not check features in PackageManagerService DO NOT MERGE" into gingerbread
* commit '7a7ed2b21233480d63a1f6b3830e3b0c1c6a3298':
  Do not check features in PackageManagerService DO NOT MERGE
2011-01-31 17:55:11 -08:00
Kenny Root
fa2ae1ad1a Do not check features in PackageManagerService DO NOT MERGE
PackageManagerService shouldn't check features that a package declares
that it uses because this will cause problems in the future when we add
more features that older phones didn't explicitly declare. We must rely
on markets to know about phones and filter them for us to avoid this
situation.

Bug: 3409434
Change-Id: I0d51b2de33d8110edc6824af4b5b8c901f96077f
2011-01-31 16:27:38 -08:00
Dianne Hackborn
71bb59f9e6 am c12cdda9: Merge "DO NOT MERGE: Fix screen size compatibility mode." into gingerbread
* commit 'c12cdda949e6b916dd9e6fa4b30ab8b0d1898faa':
  DO NOT MERGE: Fix screen size compatibility mode.
2011-01-29 22:30:57 -08:00
Dianne Hackborn
726318b56a DO NOT MERGE: Fix screen size compatibility mode.
Cherry-picked from HC.

Change-Id: Icce2a64f187a56deefcddc3d9b22fa94effce431
2011-01-29 18:02:18 -08:00
Eric Laurent
13212f8338 am 0ef57993: Merge "Fix issue 2988031." into gingerbread
* commit '0ef579939e6c96fcd2b42b164c5debf535a6a53b':
  Fix issue 2988031.
2011-01-27 18:40:42 -08:00
Eric Laurent
111df679af Fix issue 2988031.
Limit SYSTEM stream volume when a headset is connected and music is playing.

Change-Id: Ieb44ae5bb53ffa9cd5fe8e317798eed279b78df8
2011-01-27 11:32:34 -08:00
Jean-Michel Trivi
1155efdc71 am 2ba92c71: do not merge bug 3370834 Cherrypick from master
* commit '2ba92c71b5684dce700cf848bf157153c156df1d':
  do not merge bug 3370834 Cherrypick from master
2011-01-26 14:05:18 -08:00
Jean-Michel Trivi
2ba92c71b5 do not merge bug 3370834 Cherrypick from master
Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
2011-01-26 11:20:01 -08:00
Kenny Root
2ec4af5920 am 138757db: Merge "Make OBB results a one-way call" into gingerbread
* commit '138757db4f19cb626ef5c1d371d4fca004304a08':
  Make OBB results a one-way call
2011-01-26 09:25:43 -08:00
Kenny Root
138757db4f Merge "Make OBB results a one-way call" into gingerbread 2011-01-26 09:17:28 -08:00
Kenny Root
b7db2726e9 Make OBB results a one-way call
OBB result back to an application needs to be a one-way binder call.

Bug: 3353699
Change-Id: I0e625914d18a001c2fa9d764ea6463f34cf96743
2011-01-25 17:29:59 -08:00
Mathias Agopian
df8368925a am 239fd805: Merge "fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)" into gingerbread
* commit '239fd805ef7c0e4116b0a89e20caaf287e91f017':
  fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
2011-01-25 14:46:40 -08:00
Mathias Agopian
af4fa5d83d am 1955a5c9: Merge "partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)" into gingerbread
* commit '1955a5c9da421dc89bb1a1dd3d3193159192cde9':
  partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
2011-01-25 14:46:35 -08:00
Mathias Agopian
6b72702f30 am d0441f92: Merge "fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)" into gingerbread
* commit 'd0441f921b2b1879fb44041f521d9bfaa5a547d0':
  fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)
2011-01-25 14:46:31 -08:00
Mathias Agopian
2d665dd37a am 043a3cdd: Merge "workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)" into gingerbread
* commit '043a3cddf67e2baf38711bcb125084599f8f9802':
  workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)
2011-01-25 14:46:27 -08:00
Mathias Agopian
88bccab35c am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need libpixelflinger.so. (DO NOT MERGE)" into gingerbread
* commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a':
  minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
2011-01-25 14:46:22 -08:00
Mathias Agopian
21956040a7 fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
2011-01-25 14:19:13 -08:00
Mathias Agopian
68d3478860 partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
We used to guarantee that a layer in SurfaceFlinger would never be
destroyed before all references (to its ISurface) on the client
side would be released. At some point, this guarantee got
relaxed to allow to free gralloc resources sooner. This last
change was incorrect, because:
- in implementations with reference-counting the gralloc resources
wouldn't be released anyways, until all the mapping were gone
- in implementations without ref counting, the client side
would most likely crash or do something bad
- it also caused the SharedBufferStack slot to be reallocated
to another surface, which could be problematic if the client
continued to use the surface after the window manager destroyed it.

So, we essentially reinstate the guarantee that layers won't be
destroyed until after all references to their ISurface are
released.

NOTE: This doesn't entirely fix 3306150 because there is another
problem there where the Browser continues to use a surface after it
has been destroyed.

also improve SurfaceFlinger 'dumpsys' log

list the purgatory, which shows windows that have been closed,
but for which the client still has references.
2011-01-25 14:19:13 -08:00
Mathias Agopian
8aa11d82f3 fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)
we were not clearing the screen entirely, which caused garbage when
the screen wasn't entirely covered by windows.

Change-Id: Ia7aa13c36a8a314e0e8427d419b16b9aa2165ddf
2011-01-25 14:18:58 -08:00
Mathias Agopian
84c6f5a44c workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)
we make sure to call compositionComplete after everytime we do
composition with the GPU (even for the screenshot case), which is
where the buffer locks are released.

Change-Id: I450430d1e4d1ee9ce1023970642378c42cdcfa4c
2011-01-25 14:18:29 -08:00
Mathias Agopian
728d849fc9 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Dianne Hackborn
6d92cde287 am 35f4d32d: Merge "frameworks/base: Track owner in appropriate owners list of Uri"
* commit '35f4d32dc2f0c383323e780ecc7e2764704c5d2c':
  frameworks/base: Track owner in appropriate owners list of Uri
2011-01-22 11:50:41 -08:00
Vairavan Srinivasan
91c12c27ef frameworks/base: Track owner in appropriate owners list of Uri
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
2011-01-21 18:26:06 -08:00
Eric Laurent
39999e3af5 am c5694ebd: Merge "do not merge - Fix issue 3371096." into gingerbread
* commit 'c5694ebda9a50be391ef9cfaa7f93e9efb04b6c5':
  do not merge - Fix issue 3371096.
2011-01-20 21:46:21 -08:00
Mathias Agopian
b703d338c3 am 822d4ce6: Merge "fix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly" into gingerbread
* commit '822d4ce61687d386f9630b33113c6193257d6878':
  fix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly
2011-01-20 17:41:20 -08:00
Eric Laurent
ab1fe306ae do not merge - Fix issue 3371096.
EffectModule::process() was copying effect chain input buffer to
output buffer if no effect was active instead of accumulating it.

Change-Id: If4ca75601ea69a088d0f71d88aec53e90a1dec89
2011-01-20 12:05:25 -08:00
Mathias Agopian
a97ead75db fix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly
The cut-off frequency of the lowpass filter was too high
for the sampling rate used by DELAY_NORMAL.

Now we use the same filters used for the gravity vector
(cascaded biquad at 1.5 Hz)

Change-Id: Iac290a716cc47a78337a8f0e45b103e49b4d9d78
2011-01-19 15:32:38 -08:00
Brad Fitzpatrick
6b2b053b5a am 597fa828: Merge "Watchdog can get deadlocked on activity manager" into gingerbread
* commit '597fa828fa2b3cba053f0afeeac877b1ee2d24b7':
  Watchdog can get deadlocked on activity manager
2011-01-18 18:54:25 -08:00
Brad Fitzpatrick
0971a1367f Watchdog can get deadlocked on activity manager
Bug: 3351719
Change-Id: Idf3907709340062849a09dd094137e86256ed739
2011-01-18 16:42:20 -08:00
Irfan Sheriff
ef76b8306f am 4170b463: Merge "Do not add unsolicited events to queue" into gingerbread
* commit '4170b46329ed91e81cf22dba82e2dadc326b3e3d':
  Do not add unsolicited events to queue
2011-01-18 14:43:04 -08:00
Irfan Sheriff
4170b46329 Merge "Do not add unsolicited events to queue" into gingerbread 2011-01-18 14:40:18 -08:00
Jeff Brown
b26c516c03 am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread
* commit '41395459e676cf9ab4059e08446656f145662c2d':
  Filter virtual keys after touches.  (DO NOT MERGE)
2011-01-18 14:38:27 -08:00
Jeff Brown
41395459e6 Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread 2011-01-18 14:31:31 -08:00