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
Merge commit 'f2af87b39b294a197b9a7aaa611a14cfcd669a16' into gingerbread-plus-aosp
* commit 'f2af87b39b294a197b9a7aaa611a14cfcd669a16':
Making sure the draw time is measured.
Merge commit 'c86960236d5b2095c87bf46de2400a905acabee2' into gingerbread-plus-aosp
* commit 'c86960236d5b2095c87bf46de2400a905acabee2':
Document that autoFocus must be called in auto and macro mode.
Merge commit 'baf3869b88ab4e31f792dbe08f61725bc3619ea8' into gingerbread-plus-aosp
* commit 'baf3869b88ab4e31f792dbe08f61725bc3619ea8':
Fix up handling of null fields in DownloadManager.
Merge commit '72ce42352c1c229e05d910b4176f3cddb608e814' into gingerbread-plus-aosp
* commit '72ce42352c1c229e05d910b4176f3cddb608e814':
Fix possible race conditions during channel unregistration.
Merge commit 'f996ed9f2e4a992e5d884077a15dcc23a8d90c44' into gingerbread-plus-aosp
* commit 'f996ed9f2e4a992e5d884077a15dcc23a8d90c44':
Make vCard importer/exporter aware of multi-byte parameters.
* 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
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
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
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
Merge commit 'b3e957bb9d3a3811412e5d94233c7f7e2e777c28' into gingerbread-plus-aosp
* commit 'b3e957bb9d3a3811412e5d94233c7f7e2e777c28':
New download manager error code when we can't resume.
Merge commit '209e651805dd40ea87df7ff67f2755605be9308c' into gingerbread-plus-aosp
* commit '209e651805dd40ea87df7ff67f2755605be9308c':
Make the LED colors when charging customizable by the vendor
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
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
Merge commit '997dc32b6bef1c9cc8ac6d4d598698507b2c4934' into gingerbread-plus-aosp
* commit '997dc32b6bef1c9cc8ac6d4d598698507b2c4934':
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
Merge commit '567722eee190f7cf88dc7ea95167db76d5514842' into gingerbread-plus-aosp
* commit '567722eee190f7cf88dc7ea95167db76d5514842':
Fix problems with determining when to kill apps for wake usage.
Merge commit 'e300b8c10c306b575bbbec29d5572ba92a97785e' into gingerbread-plus-aosp
* commit 'e300b8c10c306b575bbbec29d5572ba92a97785e':
DO NOT MERGE Always set/remove default routes.
Merge commit 'a8d9291d7f93d1aa0d24d71d65c7de2894812177' into gingerbread-plus-aosp
* commit 'a8d9291d7f93d1aa0d24d71d65c7de2894812177':
Various battery info things:
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
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
- 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
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