3758 Commits

Author SHA1 Message Date
Jean-Baptiste Queru
6d13b146e0 am e78a0009: resolved conflicts for merge of 4b94c451 to stage-korg-master
* commit 'e78a000955c283509ee8a21b8b7e448060ac8dd8':
  Added dropbox broadcast notification
2010-12-13 13:10:23 -08:00
Jean-Baptiste Queru
e78a000955 resolved conflicts for merge of 4b94c451 to stage-korg-master
Change-Id: I07b974f96ca598677e58623050e4668822e68f23
2010-12-13 13:06:13 -08:00
Mathias Agopian
a2c3b35587 am 74da537f: Merge "[317580] fix issue where the screen wouldn\'t be rotated properly in bypass mode" into gingerbread
* commit '74da537f80ba36c1279c04fcb85d89fc38c246a6':
  [317580] fix issue where the screen wouldn't be rotated properly in bypass mode
2010-12-08 16:15:08 -08:00
Hakan Still
b247536aa3 Added dropbox broadcast notification
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
2010-12-08 13:19:33 +01:00
Mathias Agopian
ee5a3aca57 [317580] fix issue where the screen wouldn't be rotated properly in bypass mode
In some situations, the screen transformation would not be
applied while in bypass mode.

Change-Id: I3d6dd52e4c12b11aae97b54bf8e2322536eee37f
2010-12-07 21:16:14 -08:00
Mathias Agopian
4e345ab7df am a2977c38: Merge changes Ie03796ae,Ide3e980a into gingerbread
* commit 'a2977c383d363e1e88a5b36230b1fa4c312807d2':
  [3171580] SurfaceFlinger Bypass mode. (DO NOT MERGE)
  [3171580] Add transform field to native buffers. (DO NOT MERGE)
2010-12-07 14:22:56 -08:00
Mathias Agopian
a0f011ff49 am 05813b0e: Merge changes I244b5469,I32044e91 into gingerbread
* commit '05813b0eb92cb1bc79607ee402f14ca1e4b43f6d':
  [3253328, 3171580] Treat GONE and INVISIBLE views the same when calculating transparent regions
  [3171580] Fix two typos related to fixed-size buffers
2010-12-07 14:20:14 -08:00
Mathias Agopian
48f42f8c3f am 4153bf3a: Merge "[3171580] don\'t automatically log GraphicBuffer allocation failures" into gingerbread
* commit '4153bf3a259624a2f2dc497b77b225a1fb517abc':
  [3171580] don't automatically log GraphicBuffer allocation failures
2010-12-07 14:20:09 -08:00
Mathias Agopian
025005f562 [3171580] SurfaceFlinger Bypass mode. (DO NOT MERGE)
This is a poor's man precursor to the h/w composer HAL.
Basically we detect when a window is full screen and in
that case we bypass surfaceflinger's composition step, which
yields to much improved performance.

Change-Id: Ie03796ae81a1c951949b771c9323044b980cb347
2010-12-03 17:35:07 -08:00
Mathias Agopian
1989af22b5 [3171580] Fix two typos related to fixed-size buffers
mFixedSize was never set, this bug was introduced during some "cleanup", in
practice this could cause some issues when a fixed-size buffer was used and
the window was resized.

Layer::drawForSreenShot() had a typo that had no effect.

mFixedSize was used to determine if filtering was needed, which was a bit too
conservative and created a dependency between filtering and "fixed size" states
which should exist.

Now we enable filtering based on the size of the buffer vs. the size of the layer.

Change-Id: I32044e91b0c944c1b137efdceb3f01dfaa78119d
2010-12-03 17:35:06 -08:00
Mathias Agopian
e869aee382 [3171580] don't automatically log GraphicBuffer allocation failures
some of these failures are not fatal and even expected in some cases
so they should not emit a dump in the log in those cases.

Change-Id: Idcfa252e3bfa9d74e27fe4ad8f8623aa01aa9c5e
2010-12-03 17:33:09 -08:00
Jean-Baptiste Queru
a30c12a183 am 4a88013a: resolved conflicts for merge of bf1439c5 to stage-korg-master
* commit '4a88013a4a06a9ea80e8419f94694936e6b013f0':
  Preserve flags field of event passed to injectKeyEvent()
2010-12-02 15:21:35 -08:00
Jean-Baptiste Queru
4a88013a4a resolved conflicts for merge of bf1439c5 to stage-korg-master
Change-Id: Iab543a7ee449025f1df5d58afaa8f8fdd4809c99
2010-12-02 15:16:53 -08:00
Mike Playle
c6ded10dd1 Preserve flags field of event passed to injectKeyEvent()
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.
2010-12-02 16:25:46 +00:00
Eric Laurent
ed98a7c776 am 78d81851: Merge "Fix issue 2641884: Bluetooth volume is dependent on in call volume." into gingerbread
* commit '78d81851a8ef6691541215afb19e5bc690a4c3c0':
  Fix issue 2641884: Bluetooth volume is dependent on in call volume.
2010-12-01 16:04:09 -08:00
Eric Laurent
e4eaa317f6 Fix issue 2641884: Bluetooth volume is dependent on in call volume.
The problem is that the code in AudioPolicyManagerBase::checkAndSetVolume() that forces
voice volume to max when setting bluetooth SCO volume is not called if the bluetooth stream
volume did not actually change. So even if we re apply volumes when switching to bluetooth
device, the volume voice volume is not changed and remains what it was when routed to earpiece
What makes things worse on Passion is that stream volumes are limited when connected to bluetooth
and their actual value does not change as soon as they exceed the limit threshold.

Change-Id: Id7c317db45b392a1c20dca2859678e3c64a371ed
2010-12-01 14:25:39 -08:00
Eric Laurent
0d28be6812 am e23212bc: Merge "Fix issue 3142808." into gingerbread
* commit 'e23212bc89bfcb3afbf8fdb5504556ead890e1a8':
  Fix issue 3142808.
2010-12-01 11:28:54 -08:00
Eric Laurent
e23212bc89 Merge "Fix issue 3142808." into gingerbread 2010-12-01 11:26:37 -08:00
Irfan Sheriff
f38b709e47 am af2d3c7c: Merge "DO NOT MERGE Remove wifistatetracker lock access in BroadcastReceiver" into gingerbread
* commit 'af2d3c7ccebb009f31a92c1a87b0925a2891e1c4':
  DO NOT MERGE Remove wifistatetracker lock access in BroadcastReceiver
2010-12-01 09:53:17 -08:00
Irfan Sheriff
af2d3c7cce Merge "DO NOT MERGE Remove wifistatetracker lock access in BroadcastReceiver" into gingerbread 2010-12-01 09:51:27 -08:00
Eric Laurent
b87b53d7a8 Fix issue 3142808.
There is a bug in the way audio policy manager handles A2DP interface suspend/restore
when SCO is used. This bug is not new but has been triggered by a change in the timing
of the events received by audio policy manager when a call is setup and torn down
introduced by commit 164a8f86c7e48992691368c4895709c3bdb835a4.

The fix consists in grouping the control of A2DP suspended state in a single function
that is called systematically when conditions affecting this state are changed:
- call state change
- device connection/disconnection
- change in forced usage.

Change-Id: I46ee2399ee5547b60511fc6cfd32e2720091b0f8
2010-12-01 09:45:33 -08:00
Irfan Sheriff
f92b453a58 DO NOT MERGE Remove wifistatetracker lock access in BroadcastReceiver
The worksource reporting gets blocked by the
statetracker lock which can cause system restarts when
done from broadcastreceiver thread

Bug: 3153787
Change-Id: Ie70687e7453a1c3618bac1424562be44762b2c9d
2010-11-30 16:07:05 -08:00
Mathias Agopian
3248b484a2 am b483d5cd: fix [3237242] sensormanager sensor active count gets out of sync
* commit 'b483d5cd134cda393824fd8e9c1a5443bd868ae6':
  fix [3237242] sensormanager sensor active count gets out of sync
2010-11-30 15:51:00 -08:00
Mathias Agopian
be0ece6f85 am 186b68b7: Merge "allow rotation-vector to have 4 components" into gingerbread
* commit '186b68b74417e8ef73f2083769166e7785df6c30':
  allow rotation-vector to have 4 components
2010-11-30 15:41:41 -08:00
Mathias Agopian
b483d5cd13 fix [3237242] sensormanager sensor active count gets out of sync
whether a physical sensor needed to be active or not was managed by
a simpe reference counter; unfortunatelly nothing prevented it to
get out of sync if a sensor was disabled more than once.

sensorservice already maintainted a list of all the "clients"
connected to a physical sensor; we now use that list to determine if
a sensor should be enabled. This can never be "out-of-sync" since
this is the only data structure linking a sensor to a user of that
sensor.

also removed the isEnabled() method, which was never used and
implemented wrongly (since it didn't take into account that a sensor
could be disabled for a client but not of another).

Change-Id: I789affb877728ca957e99f7ba749def37c4db1c7
2010-11-30 15:41:16 -08:00
Mathias Agopian
186b68b744 Merge "allow rotation-vector to have 4 components" into gingerbread 2010-11-30 15:38:38 -08:00
Mathias Agopian
4b7de2c8de am 66cff624: Merge "Uses 4-th order low-pass for extracting gravity." into gingerbread
* commit '66cff624e9abd23da05ddc20698eb3e7d0fb5a17':
  Uses 4-th order low-pass for extracting gravity.
2010-11-30 14:18:05 -08:00
Mathias Agopian
6038db3dda Uses 4-th order low-pass for extracting gravity.
Most accelerometers have 8-bits accuracy so we beed to
reject 48dB in thestop-band, which requires a 4-th order
filter at the cut-off frequency we're using.

Change-Id: Ic00421d38d751641f86b1f3ad7663e6b44a91198
2010-11-30 14:07:28 -08:00
Mathias Agopian
7badd2c402 allow rotation-vector to have 4 components
- upadte documentation for rotation vector
- update method dealing with rotation vector to deal with 4 components
- virtual rotation-vector sensor reports all four components
- improve SensorManager documentation layout

Whent he 4-th component of the rotation-vector is present, we can save
a square-root when computing the quaternion or rotation matrix from it.

Change-Id: Ia84d278dd5f0909fab1c5ba050f8df2679e2c7c8
2010-11-30 14:07:09 -08:00
Mathias Agopian
e3895b6ff2 am 24754c9f: Merge "don\'t attempt to normalize the rotation vector" into gingerbread
* commit '24754c9f94b1bd8b176456da82a6059b2e8ded0f':
  don't attempt to normalize the rotation vector
2010-11-30 14:05:44 -08:00
Mathias Agopian
5d45c33eb8 don't attempt to normalize the rotation vector
indeed, by construction of the rotation matrix, it is
guaranteed to have a length of 1.

moreover, the normalization code was missing a square-root,
fortunatelly, since the length is 1, this didn't cause any
damage (since sqrt(1) = 1).

Change-Id: I9facd668caaf5bb3bfccb139ab872f2bb2066365
2010-11-22 01:04:09 -08:00
Mathias Agopian
550b1e17c3 am 671a6ff4: Add support for virtual sensors.
* commit '671a6ff4be11b3e2d8eb017e0c7a78e6133fb2b8':
  Add support for virtual sensors.
2010-11-18 15:52:14 -08:00
Mathias Agopian
671a6ff4be Add support for virtual sensors.
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
2010-11-18 15:29:05 -08:00
Mathias Agopian
f11bf284d3 am 305bc0fe: Merge "Fix a race condition in sensormanager" into gingerbread
* commit '305bc0fe977f6197bfae847dbaf58916cf8980ba':
  Fix a race condition in sensormanager
2010-11-15 13:19:46 -08:00
Mathias Agopian
f33a6e9645 Fix a race condition in sensormanager
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
2010-11-14 20:55:25 -08:00
Mathias Agopian
792b847ee1 am fcab475c: Merge "record the last event received regardless of having clients or not" into gingerbread
* commit 'fcab475c906da5c159bc56a32c2610f6f55eafd9':
  record the last event received regardless of having clients or not
2010-11-11 14:49:35 -08:00
Mathias Agopian
3a9223ebf8 record the last event received regardless of having clients or not
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
2010-11-10 17:50:28 -08:00
Brad Fitzpatrick
bf44ebae04 am 9de93424: Merge "Without SD card the shutdown sequence was delayed"
* commit '9de93424cc05446e3a216f406c55a3937c028416':
  Without SD card the shutdown sequence was delayed
2010-11-10 11:07:18 -08:00
Johan Alfven
5d0db4d356 Without SD card the shutdown sequence was delayed
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
2010-11-09 10:32:25 +01:00
Mathias Agopian
f8c24a66a7 am cd43fbb4: Merge "improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)" into gingerbread
* commit 'cd43fbb4537487a9c3185e919904f8b0c93daee6':
  improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)
2010-11-08 19:38:28 -08:00
Mathias Agopian
94c4f5c1b2 improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)
the increased maximum rate is needed for proper gyro integration, current gyro
parts can sample at up to 800Hz

Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794
2010-11-08 13:51:53 -08:00
Kenny Root
8806fc729b am 70fc04c8: Reorganize PackageManager dump to avoid NPE
* commit '70fc04c84db8f99ac2ac60fd9719b91057aacc9b':
  Reorganize PackageManager dump to avoid NPE
2010-11-05 13:58:20 -07:00
Kenny Root
70fc04c84d Reorganize PackageManager dump to avoid NPE
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
2010-11-05 11:59:45 -07:00
Jeff Brown
7ab5d2d951 am a87ea46c: Fix bugs related to cheek event suppression.
* commit 'a87ea46cb023763e0a9b0222da20b0a354f79d8d':
  Fix bugs related to cheek event suppression.
2010-11-01 21:02:05 -07:00
Jeff Brown
a87ea46cb0 Fix bugs related to cheek event suppression.
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
2010-11-01 20:51:58 -07:00
Mike Lockwood
faebca7f43 am c9fa90f9: Merge "GPS: remove some logging" into gingerbread
* commit 'c9fa90f94b664589d584bb433e748e2b01b368c9':
  GPS: remove some logging
2010-10-28 14:30:34 -07:00
Mike Lockwood
fa405280b2 GPS: remove some logging
Change-Id: Ib2dca53364c9da207a87f2664b54d2ec1d1bd8d9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-28 07:35:26 -04:00
Mathias Agopian
5c0efef9a1 am 7d452f69: Merge "really fix [3118445] Transform * Transform does not work as expected" into gingerbread 2010-10-27 23:46:25 -07:00
Mathias Agopian
e031ba8d20 really fix [3118445] Transform * Transform does not work as expected
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
2010-10-27 18:04:11 -07:00
Mike Lockwood
1b571bd3e9 am 1d28a840: Merge "Location Manager: Fix LocationManager.getBestProvider filtering." into gingerbread 2010-10-26 08:36:24 -07:00