11391 Commits

Author SHA1 Message Date
Steve Howard
5eb49583e2 Improve orientation sensing when waking up while flat.
This change makes the window manager pass the currently displayed
orientation to the WindowOrientationListener each time to calls to get
the currently sensed orientation.  Now, when the
WindowOrientationListener doesn't know for sure what the orientation
of the device should be (for example, if the sensed orientation is
flat on a table), then it trusts the already-displayed orientation,
rather than trusting whatever sensors reading it most recently
received.

The main use case this addresses is:
* user uses device in portrait
* user turns off device, puts it in pocket
* while in pocket, screen gets turned on, activating orientaiton
  sensor, which senses landscape orientation
* screen timed out
* user takes device out, places it on a table (or looks down at it,
  holding it flat), and unlocks it

Previously, when the device was unlocked, the
WindowOrientationListener would return landscape orientation based on
its previous sensor readings.  Now, it will override those previous
readings because it knows they never actually took effect and the
device is presently flat.

This change also slightly modifies the way we handle flat orientation,
now completely ignoring data when the tilt distrust is nonzero (even
if the current sensor reading shows non-tilted).

Change-Id: Ia4950a41827f8c53a80487d0c2e83b556df781b9
2010-08-18 14:22:19 -07:00
Brad Fitzpatrick
11709ab07c Merge "Avoid unnecessary SharedPrefences disk writes." into gingerbread 2010-08-18 14:21:32 -07:00
Mathias Agopian
4195d097c5 am 8ad86fef: Merge "Improve documentation of getAltitude" into gingerbread
Merge commit '8ad86fef49a732617dc26be9324af60f9975342d' into gingerbread-plus-aosp

* commit '8ad86fef49a732617dc26be9324af60f9975342d':
  Improve documentation of getAltitude
2010-08-18 13:57:18 -07:00
Mathias Agopian
8ad86fef49 Merge "Improve documentation of getAltitude" into gingerbread 2010-08-18 13:55:01 -07:00
Konstantin Lopyrev
28bd3a54ec am f2af87b3: Merge "Making sure the draw time is measured." into gingerbread
Merge commit 'f2af87b39b294a197b9a7aaa611a14cfcd669a16' into gingerbread-plus-aosp

* commit 'f2af87b39b294a197b9a7aaa611a14cfcd669a16':
  Making sure the draw time is measured.
2010-08-18 13:39:29 -07:00
Wu-cheng Li
a2527055f8 am c8696023: Merge "Document that autoFocus must be called in auto and macro mode." into gingerbread
Merge commit 'c86960236d5b2095c87bf46de2400a905acabee2' into gingerbread-plus-aosp

* commit 'c86960236d5b2095c87bf46de2400a905acabee2':
  Document that autoFocus must be called in auto and macro mode.
2010-08-18 13:39:01 -07:00
Steve Howard
0899e8bc9d am baf3869b: Merge "Fix up handling of null fields in DownloadManager." into gingerbread
Merge commit 'baf3869b88ab4e31f792dbe08f61725bc3619ea8' into gingerbread-plus-aosp

* commit 'baf3869b88ab4e31f792dbe08f61725bc3619ea8':
  Fix up handling of null fields in DownloadManager.
2010-08-18 13:38:42 -07:00
Jeff Brown
8fd80e924a am 72ce4235: Merge "Fix possible race conditions during channel unregistration." into gingerbread
Merge commit '72ce42352c1c229e05d910b4176f3cddb608e814' into gingerbread-plus-aosp

* commit '72ce42352c1c229e05d910b4176f3cddb608e814':
  Fix possible race conditions during channel unregistration.
2010-08-18 13:36:08 -07:00
Daisuke Miyakawa
a7bb3ba54a am f996ed9f: Merge "Make vCard importer/exporter aware of multi-byte parameters." into gingerbread
Merge commit 'f996ed9f2e4a992e5d884077a15dcc23a8d90c44' into gingerbread-plus-aosp

* commit 'f996ed9f2e4a992e5d884077a15dcc23a8d90c44':
  Make vCard importer/exporter aware of multi-byte parameters.
2010-08-18 13:35:47 -07:00
Jean-Baptiste Queru
3719f8568e DO NOT MERGE resolved conflicts for merge of 8c11e952 to gingerbread-plus-aosp
Change-Id: I29703133654f0f80a4425914d290e9dc50cbc3cc
2010-08-18 13:20:28 -07:00
Mathias Agopian
a6704d39b3 Improve documentation of getAltitude
Change-Id: Ie6c61fa6018e54143cec6e65978df9abb48854d9
2010-08-18 12:00:30 -07:00
Konstantin Lopyrev
f2af87b39b Merge "Making sure the draw time is measured." into gingerbread 2010-08-18 11:43:21 -07:00
Konstantin Lopyrev
bef337f516 Making sure the draw time is measured.
Change-Id: I6bf8094aee03793f125008386c4fea730e95d07a
2010-08-18 11:31:27 -07:00
Jean-Baptiste Queru
f939518510 Revert "- updates NetUtils to use new libnetutils headers"
This reverts commit 9bf3bb21c097cc96f30d9bf3ec7dea62a74a738b.
2010-08-18 11:16:42 -07:00
Wu-cheng Li
c86960236d Merge "Document that autoFocus must be called in auto and macro mode." into gingerbread 2010-08-18 10:19:45 -07:00
Kenny Root
02ca31fbae Add OBB flags to support overlays
* Add flags field in OBB footer to support overlays.

* Remove unused 'crypto' and 'filesystem' fields in obbtool (could
  later be supported in the "flags" field of the OBB footer).

* Add notes to document OBB classes before shipping.

Change-Id: I386b43c32c5edef55210acb5d3322639c08010ba
2010-08-18 09:34:58 -07:00
Steve Howard
baf3869b88 Merge "Fix up handling of null fields in DownloadManager." into gingerbread 2010-08-18 09:03:34 -07:00
Svetoslav Ganov
3dfaf21dfc DO NOT MERGE 2928156 Accessibility event's parcelableData property not nullified during recycling (GINGERBREAD)
Change-Id: I18437d98032487329b6b9b579ed12abbfb77501f
2010-08-17 19:03:56 -07:00
Jeff Brown
72ce42352c Merge "Fix possible race conditions during channel unregistration." into gingerbread 2010-08-17 17:05:38 -07:00
Jeff Brown
2cbecea4c9 Fix possible race conditions during channel unregistration.
Previously, the input dispatcher assumed that the input channel's
receive pipe file descriptor was a sufficiently unique identifier for
looking up input channels in its various tables.  However, it can happen
that an input channel is disposed and then a new input channel is
immediately created that reuses the same file descriptor.  Ordinarily
this is not a problem, however there is a small opportunity for a race
to arise in InputQueue.

When InputQueue receives an input event from the dispatcher, it
generates a finishedToken that encodes the channel's receive pipe fd,
and a sequence number.  The finishedToken is used by the ViewRoot
as a handle for the event so that it can tell the InputQueue when
the event has finished being processed.

Here is the race:

1. InputQueue receives an input event, assigns a new finishedToken.
2. ViewRoot begins processing the input event.
3. During processing, ViewRoot unregisters the InputChannel.
4. A new InputChannel is created and is registered with the Input Queue.
   This InputChannel happens to have the same receive pipe fd as
   the one previously registered.
5. ViewRoot tells the InputQueue that it has finished processing the
   input event, passing along the original finishedToken.
6. InputQueue throws an exception because the finishedToken's receive
   pipe fd is registered but the sequence number is incorrect so it
   assumes that the client has called finish spuriously.

The fix is to include a unique connection id within the finishedToken so
that the InputQueue can accurately confirm that the token belongs to
the currently registered InputChannel rather than to an old one that
happened to have the same receive pipe fd.  When it notices this, it
ignores the spurious finish.

I've also made a couple of other small changes to avoid similar races
elsewhere.

This patch set also includes a fix to synthesize a finished signal
when the input channel is unregistered on the client side to
help keep the server and client in sync.

Bug: 2834068
Change-Id: I1de34a36249ab74c359c2c67a57e333543400f7b
2010-08-17 17:03:42 -07:00
Daisuke Miyakawa
f996ed9f2e Merge "Make vCard importer/exporter aware of multi-byte parameters." into gingerbread 2010-08-17 16:42:06 -07:00
Daisuke Miyakawa
b7688558cc Make vCard importer/exporter aware of multi-byte parameters.
Bug: 2922186
Change-Id: Ic877940242d87ef918bf8d4dac601d37b296259b
2010-08-17 16:40:47 -07:00
Irfan Sheriff
8c11e95230 DO NOT MERGE WifiLock extensions for high performance mode
Add extension to WifiLock to allow apps to operate
in high performance mode (high power & disable suspend
optimizations for battery consumption).

Bug: 2834260
Change-Id: I8b33d307f3d569bc92ba2139b9ed224ffc147547
2010-08-17 15:27:54 -07:00
Steve Howard
8651bd5d18 Fix up handling of null fields in DownloadManager.
Document fields that can have invalid/unknown values, and fix handling
of null local URI.

Change-Id: I7684c151f0a20c91340655246bec2ce0a60328e4
2010-08-17 14:10:25 -07:00
Wu-cheng Li
f008f3ea82 Document that autoFocus must be called in auto and macro mode.
Change-Id: Ia52f8bc8a75a7473edff50326a4a0467f4295e6a
2010-08-17 13:44:35 -07:00
Brad Fitzpatrick
67fed01522 Avoid unnecessary SharedPrefences disk writes.
Apps commonly edit + commit redundant changes to their
SharedPreferences, not checking the existing values.  Rather than
force all apps to double-check that their settings writes aren't
redundant, we should just make .commit() faster (avoiding the disk
write) when the file already exists on disk and no effective changes
were made.

Change-Id: I7edbd0d3ace5b69b7af6d12c39797c8b7f86230b
2010-08-17 10:29:15 -07:00
Steve Howard
ab59914de7 am b3e957bb: Merge "New download manager error code when we can\'t resume." into gingerbread
Merge commit 'b3e957bb9d3a3811412e5d94233c7f7e2e777c28' into gingerbread-plus-aosp

* commit 'b3e957bb9d3a3811412e5d94233c7f7e2e777c28':
  New download manager error code when we can't resume.
2010-08-17 08:27:17 -07:00
Steve Howard
b3e957bb9d Merge "New download manager error code when we can't resume." into gingerbread 2010-08-17 08:20:52 -07:00
Jean-Baptiste Queru
5085848ddb am 209e6518: Merge "Make the LED colors when charging customizable by the vendor"
Merge commit '209e651805dd40ea87df7ff67f2755605be9308c' into gingerbread-plus-aosp

* commit '209e651805dd40ea87df7ff67f2755605be9308c':
  Make the LED colors when charging customizable by the vendor
2010-08-17 07:48:50 -07:00
Jean-Baptiste Queru
209e651805 Merge "Make the LED colors when charging customizable by the vendor" 2010-08-17 07:35:08 -07:00
Mathias Jeppsson
8534a8e438 Crash when powering off.
Fixing a race condition. If "confirm" is true and the shutdown
dialog is shown it may take some time before the user presses the
ok button. During this time a new call to shutdown may be made with
confirm=false. When this happens the shutdown thread is started by
the second call, and later when the users presses the ok button. This
results in ShutdownThread.beginShutdownSequence() being called
twice. I.e., the beginShutdownSequence lacks the proper protection
for this error case.

Change-Id: Ib9b01c5a43f4dc23de09057f3fc1507000317faf
2010-08-17 13:33:09 +02:00
Joseph Wen
81dcea6093 am f1f48bc7: Do JPEG tile-based decoding.
Merge commit 'f1f48bc7f200f54c76b22d845d8ba8419879b375' into gingerbread-plus-aosp

* commit 'f1f48bc7f200f54c76b22d845d8ba8419879b375':
  Do JPEG tile-based decoding.
2010-08-17 00:31:34 -07:00
Joseph Wen
f1f48bc7f2 Do JPEG tile-based decoding.
Change-Id: I5c1b4ac3c02eb4350ef0ba9a7877b22cfd730cfb
2010-08-17 14:34:02 +08:00
Mathias Agopian
98a94989dd am 833533c9: Improve Display javadoc slightly
Merge commit '833533c9292f860e4dfc060a4eba6429cd259ed4' into gingerbread-plus-aosp

* commit '833533c9292f860e4dfc060a4eba6429cd259ed4':
  Improve Display javadoc slightly
2010-08-16 16:54:49 -07:00
Steve Howard
33bbd12a05 New download manager error code when we can't resume.
Adding DownloadManager.ERROR_CANNOT_RESUME for when we can't resume an
interrupted download (because the server didn't provide an ETag or
doesn't support range requests), as well as the necessary private
status code in Downloads.Impl.

Change-Id: I5a66f1e1964198552ab2216aa6d3cc0db2254e21
2010-08-16 14:28:17 -07:00
Mathias Agopian
833533c929 Improve Display javadoc slightly
Change-Id: Iaa7d599e11d42d4aaf50e87b141f9b8d04ba445e
2010-08-16 13:30:20 -07:00
Doug Zongker
bb33d6fd98 am 997dc32b: Merge "add an api for getting a device serial number" into gingerbread
Merge commit '997dc32b6bef1c9cc8ac6d4d598698507b2c4934' into gingerbread-plus-aosp

* commit '997dc32b6bef1c9cc8ac6d4d598698507b2c4934':
  add an api for getting a device serial number
2010-08-16 13:20:05 -07:00
Doug Zongker
997dc32b6b Merge "add an api for getting a device serial number" into gingerbread 2010-08-16 09:19:40 -07:00
Doug Zongker
7d2e3df60d add an api for getting a device serial number
Add a constant to android.os.Build that returns a device-specific
alphanumeric serial number.  It's optional -- it may be blank --
though CTS will require it to be present for non-telephony devices.

Change-Id: I338ae5f43ba679a5e98f2f437dc4efdaef0c835d
2010-08-16 09:18:50 -07:00
Dianne Hackborn
2e47052fc4 am 567722ee: Merge "Fix problems with determining when to kill apps for wake usage." into gingerbread
Merge commit '567722eee190f7cf88dc7ea95167db76d5514842' into gingerbread-plus-aosp

* commit '567722eee190f7cf88dc7ea95167db76d5514842':
  Fix problems with determining when to kill apps for wake usage.
2010-08-15 17:34:49 -07:00
Dianne Hackborn
567722eee1 Merge "Fix problems with determining when to kill apps for wake usage." into gingerbread 2010-08-15 17:33:02 -07:00
Dianne Hackborn
1ebccf531d Fix problems with determining when to kill apps for wake usage.
Also improve debug printing of various times.

Change-Id: Ifcc288fd1bcbf44c069875ba97925b9e7ffe9a48
2010-08-15 17:27:29 -07:00
Robert Greenwalt
993f85f319 am e300b8c1: Merge "DO NOT MERGE Always set/remove default routes." into gingerbread
Merge commit 'e300b8c10c306b575bbbec29d5572ba92a97785e' into gingerbread-plus-aosp

* commit 'e300b8c10c306b575bbbec29d5572ba92a97785e':
  DO NOT MERGE Always set/remove default routes.
2010-08-13 16:03:29 -07:00
Dianne Hackborn
66b0343e9e am a8d9291d: Merge "Various battery info things:" into gingerbread
Merge commit 'a8d9291d7f93d1aa0d24d71d65c7de2894812177' into gingerbread-plus-aosp

* commit 'a8d9291d7f93d1aa0d24d71d65c7de2894812177':
  Various battery info things:
2010-08-13 16:00:44 -07:00
Robert Greenwalt
e300b8c10c Merge "DO NOT MERGE Always set/remove default routes." into gingerbread 2010-08-13 15:59:53 -07:00
Robert Greenwalt
b738fb9938 DO NOT MERGE Always set/remove default routes.
Must clean up default route if a default 3g connection is replaced
by a non-default (ie, mms) connection on teh same interface.

Also stop mucking with all connections dns and routes - do it only
for the connection that has changed.

bug:2865974
Change-Id: Ifdf49080fa0413a4d826813706c809975a562dfa
2010-08-13 15:53:13 -07:00
Herb Jellinek
a473394183 BluetoothHeadset.java:
Added ACTION_VENDOR_SPECIFIC_HEADSET_EVENT,
EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD,  EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS.

BluetoothAssignedNumbers.java (new file):
A home for BT assigned numbers, beginning with the company IDs.

HeadsetBase.java:
Reformatted some code.

AtCommandHandler.java:
Fixed comment typos.

Change-Id: I34d6f248166305d72be66632779fc963b894379c

Added EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID.
Fixed a minor comment typo.

Change-Id: I8550692c13510a853c894b2d108bef4520d931c2
2010-08-13 15:23:00 -07:00
Dianne Hackborn
9adb9c3b10 Various battery info things:
- Now track wake locks in battery history.
- Now track sensors in battery history.
- Some filtering of sensory data.
- Fixes to some data that wasn't cleared when resetting battery stats.
- Print amount discharged since last charge.

And the big part -- keep track of wake locks held per process,
and kill processes that hold wake locks too much while they are in
the background.  This includes information in the battery stats
about the process being killed, which will be available to the
developer if the app is reported.

Change-Id: I97202e94d00aafe0526ba2db74a03212e7539c54
2010-08-13 15:17:49 -07:00
Mikael Kanstrup
876247784e DO NOT MERGE WLAN: Reset power save mode to startup value after DHCP response.
When the driver was configured to run with power save mode disabled the
power save mode incorrectly got reverted back to AUTO mode right after
DHCP response. The power save mode value is now saved so that the device
properly reverts back to a previous mode after DHCP response.

Change-Id: Ie68cd107872d233bf422e24130a1eb9f6432db91
Bug: 2834260
2010-08-13 10:24:04 -07:00
Wu-cheng Li
77a473fbce am ccaa0028: Merge "Improve camera documentation." into gingerbread
Merge commit 'ccaa002848e9ef1ff232eee5babc9273599924af' into gingerbread-plus-aosp

* commit 'ccaa002848e9ef1ff232eee5babc9273599924af':
  Improve camera documentation.
2010-08-12 14:05:56 -07:00