82742 Commits

Author SHA1 Message Date
Nick Pelly
6fa9ad4afc Location overhaul, major commit.
Themes: Fused Location, Geofencing, LocationRequest.

API changes
o Fused location is always returned when asking for location by Criteria.
o Fused location is never returned as a LocationProvider object, nor returned
  as a provider String. This wouldn't make sense because the current API
  design assumes that LocationProvider's have fixed properties (accuracy, power
  etc).
o The fused location engine will tune itself based on the criteria passed
  by applications.
o Deprecate LocationProvider. Apps should use fused location (via Criteria
  class), instead of enumerating through LocationProvider objects. It is
  also over-engineered: designed for a world with a plethora of location
  providers that never materialized.
o The Criteria class is also over-engineered, with many methods that aren't
  currently used, but for now we won't deprecate them since they may have
  value in the future. It is now used to tune the fused location engine.
o Deprecate getBestProvider() and getProvider().
o Add getLastKnownLocation(Criteria), so we can return last known
  fused locations.
o Apps with only ACCESS_COARSE_LOCATION _can_ now use the GPS, but the location
  they receive will be fudged to a 1km radius. They can also use NETWORK
  and fused locatoins, which are fudged in the same way if necessary.
o Totally deprecate Criteria, in favor of LocationRequest.
  Criteria was designed to map QOS to a location provider. What we
  really need is to map QOS to _locations_.
  The death knell was the conflicting ACCURACY_ constants on
  Criteria, with values 1, 2, 3, 1, 2. Yes not a typo.
o Totally deprecate LocationProvider.
o Deprecate test/mock provider support. They require a named provider,
  which is a concept we are moving away from. We do not yet have a
  replacement, but I think its ok to deprecate since you also
  need to have 'allow mock locations' checked in developer settings.
  They will continue to work.
o Deprecate event codes associated with provider status. The fused
  provider is _always_ available.
o Introduce Geofence data object to provide an easier path fowards
  for polygons etc.

Implementation changes
o Fused implementation: incoming (GPS and NLP) location fixes are given
  a weight, that exponentially decays with respect to age and accuracy.
  The half-life of age is ~60 seconds, and the half-life of accuracy is
  ~20 meters. The fixes are weighted and combined to output a fused
  location.
o Move Fused Location impl into
  frameworks/base/packages/FusedLocation
o Refactor Fused Location behind the IProvider AIDL interface. This allow us
  to distribute newer versions of Fused Location in a new APK, at run-time.
o Introduce ServiceWatcher.java, to refactor code used for run-time upgrades of
  Fused Location, and the NLP.
o Fused Location is by default run in the system server (but can be moved to
  any process or pacakge, even at run-time).
o Plumb the Criteria requirements through to the Fused Location provider via
  ILocation.sendExtraCommand(). I re-used this interface to avoid modifying the
  ILocation interface, which would have broken run-time upgradability of the
  NLP.
o Switch the geofence manager to using fused location.
o Clean up 'adb shell dumpsys location' output.
o Introduce config_locationProviderPackageNames and
  config_overlay_locationProviderPackageNames to configure the default
  and overlay package names for Geocoder, NLP and FLP.
o Lots of misc cleanup.
o Improve location fudging. Apply random vector then quantize.
o Hide internal POJO's from clients of com.android.location.provider.jar
  (NLP and FLP). Introduce wrappers ProviderRequestUnbundled and
  ProviderPropertiesUnbundled.
o Introduce ProviderProperties to collapse all the provider accuracy/
  bearing/altitude/power plumbing (that is deprecated anyway).
o DELETE lots of code: DummyLocationProvider,
o Rename the (internal) LocationProvider to LocationProviderBase.
o Plumb pid, uid and packageName throughout
  LocationManagerService#Receiver to support future features.

TODO: The FLP and Geofencer have a lot of room to be more intelligent
TODO: Documentation
TODO: test test test

Change-Id: Iacefd2f176ed40ce1e23b090a164792aa8819c55
2012-08-10 14:57:09 -07:00
Adam Powell
c47f80f1ae Merge "Don't assume a default of 'false' for TwoStatePreference" into jb-mr1-dev 2012-08-10 14:39:28 -07:00
Adam Powell
c1b07211b8 Don't assume a default of 'false' for TwoStatePreference
TwoStatePreference would treat a default value of false as having no
effect since it matched the initial value of the internal field. This
caused asymmetric behavior around persistence and listener
notification when the default was true (persisted) vs. false (not
persisted).

Standard behavior for most Preferences is to persist the default
value. Make TwoStatePreference (CheckBoxPreference and
SwitchPreference) follow this pattern.

Bug 5722690

Change-Id: I8b3cf55efc5dfd573b511913b48ced017f0432d8
2012-08-10 14:36:53 -07:00
Daniel Sandler
f5fd82acc3 Merge "Capture orientation change data in the gesture log." into jb-mr1-dev 2012-08-10 13:48:12 -07:00
Adam Powell
7c6f724e14 Merge "Fix some Holo text color bugs" into jb-mr1-dev 2012-08-10 13:41:52 -07:00
Daniel Sandler
747a9e986c Capture orientation change data in the gesture log.
Change-Id: I19719f82f1b6b6563b33edc85b4a8a259d04ba0c
2012-08-10 16:39:19 -04:00
Adam Powell
3f9b24e531 Fix some Holo text color bugs
Fix Switch text color in Holo Light to contrast better - always light
text against the dark switch thumb.

Fix a bug where TextAppearance.Holo.Small.Inverse was using
?textColorPrimaryInverse instead of ?textColorSecondaryInverse.
("Small" TextAppearance always uses the secondary color.)

Bug 6967184

Change-Id: I039bf089d4c7aa257ec4f600df6c0d2066164194
2012-08-10 13:38:43 -07:00
Jean-Baptiste Queru
06439fd29f am cb80cb70: am 37548994: Merge "StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test."
* commit 'cb80cb700d15319c20686998e822aed32a56adf5':
  StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test.
2012-08-10 12:44:12 -07:00
Jean-Baptiste Queru
d0604565ee am d2388b50: am 53ad027c: Merge "MtpStorage: correct the size of reserve space for MTP"
* commit 'd2388b50a5c16b920bdd656448107a21e49d753b':
  MtpStorage: correct the size of reserve space for MTP
2012-08-10 12:44:09 -07:00
The Android Open Source Project
c47d63d103 am 3401c2e9: (-s ours) Reconcile with jb-mr0-release - do not merge
* commit '3401c2e9e1343c964eb9495cbf8568172c14ac82':
2012-08-10 12:36:46 -07:00
Scott Main
68b3f065b6 am 922e038b: am ea31b47a: Merge "fix misc doc bugs from external issues" into jb-dev
* commit '922e038b087076260ae7e29facc8121d46e8ba3c':
  fix misc doc bugs from external issues
2012-08-10 12:36:34 -07:00
mike wakerly
30206968e9 am ceff3415: am 1022b999: Merge "Fix typo in UsbManager javadoc." into jb-dev
* commit 'ceff34155019bfc69be5b786097d4195fc035afe':
  Fix typo in UsbManager javadoc.
2012-08-10 12:36:30 -07:00
Scott Main
2d22538f29 am 4b4bd1b3: am 607079d8: docs: SDK r20.0.3, Support Library r10 Release Notes plus some OCD cleanup to the ADT install steps
* commit '4b4bd1b3456096b5f92372230f4ccae225ddd5c4':
  docs: SDK r20.0.3, Support Library r10 Release Notes plus some OCD cleanup to the ADT install steps
2012-08-10 12:36:26 -07:00
Daniel Sandler
9252dbd314 Add fullscreen to Dream.lightsOut().
Also don't go into lightsOut() by default in
onAttachedToWindow(), in case some dream doesn't want to do
that.

We should probably make this even more flexible, but
this is a start.

Change-Id: I606b42a288259902e89d59595ad60548a89866da
2012-08-10 13:57:32 -04:00
Jean-Baptiste Queru
cb80cb700d am 37548994: Merge "StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test."
* commit '37548994e69292932e9e2fafb7cba6c53e3a2bcd':
  StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test.
2012-08-10 09:26:53 -07:00
Jean-Baptiste Queru
d2388b50a5 am 53ad027c: Merge "MtpStorage: correct the size of reserve space for MTP"
* commit '53ad027c46bf578e26e5db70319b17a671ce8a36':
  MtpStorage: correct the size of reserve space for MTP
2012-08-10 09:26:47 -07:00
Jean-Baptiste Queru
37548994e6 Merge "StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test." 2012-08-10 09:04:05 -07:00
Jean-Baptiste Queru
53ad027c46 Merge "MtpStorage: correct the size of reserve space for MTP" 2012-08-10 09:03:42 -07:00
The Android Open Source Project
3401c2e9e1 Reconcile with jb-mr0-release - do not merge
Change-Id: I29880eeaee48f2f841d9bfbf21c310e495f26ddc
2012-08-10 08:34:23 -07:00
Daniel Sandler
6950992645 Merge "More termination conditions for Dreams." into jb-mr1-dev 2012-08-10 07:26:15 -07:00
Daniel Sandler
a2fbe53f1e More termination conditions for Dreams.
Default implementation of Dreams will finish() on KEYCODE_BACK.

PhoneStatusBar will awaken() from any Dream when the Home key is pressed.

Change-Id: I55e2a5d533a7fb93debc4c54514dba3b9098f009
2012-08-10 01:19:03 -04:00
Baligh Uddin
3b89190b2e Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-09 20:44:41 -07:00
Baligh Uddin
21264a77a7 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-09 19:54:39 -07:00
Brian Muramatsu
14262d79c4 Merge "Control GPS logging with property" into jb-mr1-dev 2012-08-09 18:46:10 -07:00
Adam Powell
f6e802283c Merge "Sync fling physics between Scroller/OverScroller" into jb-mr1-dev 2012-08-09 17:22:29 -07:00
Brian Muramatsu
1715cb36d9 Control GPS logging with property
This allows users of the PDK to debug GPS issues.

Change-Id: I4aff12e124f4264abd1a0be012df4c431044189c
2012-08-09 17:14:13 -07:00
Scott Main
922e038b08 am ea31b47a: Merge "fix misc doc bugs from external issues" into jb-dev
* commit 'ea31b47a72a6fed1269e2ba3c29c438212322bf0':
  fix misc doc bugs from external issues
2012-08-09 17:03:16 -07:00
Scott Main
ea31b47a72 Merge "fix misc doc bugs from external issues" into jb-dev 2012-08-09 17:00:52 -07:00
Adam Powell
990dfc6f90 Sync fling physics between Scroller/OverScroller
Bug 6793537

Have the default fling physics for Scroller follow the newer patterns
from OverScroller.

Make some constants determined by DisplayMetrics density in
OverScroller per-instance rather than static.

Change-Id: I5308e4bb8eca63e95cf3f1eee1ba4fa5391023b0
2012-08-09 16:55:08 -07:00
mike wakerly
ceff341550 am 1022b999: Merge "Fix typo in UsbManager javadoc." into jb-dev
* commit '1022b9999de8fb022db6923a55e37ffc7dfca176':
  Fix typo in UsbManager javadoc.
2012-08-09 16:49:07 -07:00
mike wakerly
1022b9999d Merge "Fix typo in UsbManager javadoc." into jb-dev 2012-08-09 16:47:11 -07:00
Scott Main
4b4bd1b345 am 607079d8: docs: SDK r20.0.3, Support Library r10 Release Notes plus some OCD cleanup to the ADT install steps
* commit '607079d8098f3bf6632913a6edd0bc6d6f9167d7':
  docs: SDK r20.0.3, Support Library r10 Release Notes plus some OCD cleanup to the ADT install steps
2012-08-09 16:43:18 -07:00
Scott Main
cb0b2df114 fix misc doc bugs from external issues
Change-Id: I11b1d524dd2159b58c65d3ef7a76af15624ae365
2012-08-09 16:38:12 -07:00
mike wakerly
0099d67d68 Fix typo in UsbManager javadoc.
Closes http://b.android.com/32863

Change-Id: I8fc03ee70209413f279f606b393e79c12ee9c0d2
2012-08-09 16:31:26 -07:00
mike wakerly
8046b5e00d Merge "UsbRequest: set ByteBuffer.position() upon success." into jb-mr1-dev 2012-08-09 16:10:11 -07:00
Irfan Sheriff
35cf42d0b6 Merge "Add control to disable suspend optimizations" into jb-mr1-dev 2012-08-09 15:53:17 -07:00
Irfan Sheriff
3fb4ba616e Add control to disable suspend optimizations
Add an advanced setting that allows user to turn off power savings at screen off.

Bug: 5885175
Change-Id: I2dd013b86d7500a2ad1f9ec75d86551808f05543
2012-08-09 15:50:55 -07:00
John Spurlock
c5bfe19626 Merge "Fix screen timeout determination for starting dream." into jb-mr1-dev 2012-08-09 15:43:25 -07:00
mike wakerly
a3665ba95d UsbRequest: set ByteBuffer.position() upon success.
Also clears allocated buffer before copying.

Closes http://b.android.com/28023

Bug: 5385026
Bug: 6766413
Change-Id: Icf2c1d45db4fb2a9bd1fcfdb29aa7308034faaf0
2012-08-09 15:28:10 -07:00
Adam Powell
a7bbbabc15 Merge "Some simple skip-layout optimizations for ImageView" into jb-mr1-dev 2012-08-09 15:19:46 -07:00
Adam Powell
f96ce02613 Some simple skip-layout optimizations for ImageView
Mirror the optimization from setImageDrawable into setImageResource
and setImageURI where we won't requestLayout() if the drawable's size
didn't change.

Bug 6359116

Change-Id: Iaae2100f3bddb2737628e31483b471c9e22d945f
2012-08-09 15:09:53 -07:00
Chet Haase
4e44348f91 Merge "Fix shift/mask error in ArtbEvaluator" into jb-mr1-dev 2012-08-09 14:52:25 -07:00
Chet Haase
9b5599894b Fix shift/mask error in ArtbEvaluator
Shifting from the left copies the MSB along with it. This causes a problem
in ArgbEvaluator, which shifts the top byte down by 24 for the start/end
colors, and then uses those values to interpolate alpha values. The correct
appraoch (used with the other color components) is to mask by 0xff after the
shift.

Issue #6960514 External bug: ArgbEvaluator can't evaluate alpha value properly

Change-Id: I750d38ddfecc5f30d8dab7c6d27d1a7ac06361c3
2012-08-09 14:16:29 -07:00
Scott Main
607079d809 docs: SDK r20.0.3, Support Library r10 Release Notes
plus some OCD cleanup to the ADT install steps

Change-Id: I760ddb284da2a3f53741b75d6ff0e02af8181c9a
2012-08-09 14:13:22 -07:00
Joe Malin
4aa3c034f5 Fix contentprovider docs android:exported default
Change-Id: I30682905e99fa3d05b6315c011e290fe509588f4
2012-08-09 13:02:36 -07:00
Baligh Uddin
03cfc54231 Import translations. DO NOT MERGE
Change-Id: I813d5cfc5f5b60e98f635dc62e9935299c903171
Auto-generated-cl: translation import
2012-08-09 12:32:26 -07:00
John Spurlock
b9ba2b6768 Fix screen timeout determination for starting dream.
It turns out OFF_BECAUSE_OF_TIMEOUT is not the best indicator
of actual screen timeout.

For example, it is the reason passed down when acquiring a wake lock.
This was causing us to launch Dreams in the wrong situations, and
deadlocking on calls to WindowManager.

This fix simply adds an additional check ensuring the intention is to
turn the screen off.

Change-Id: If8adff446b5b1fcb19424b45878b75bfd0552b90
2012-08-09 14:47:49 -04:00
Amith Yamasani
2c02933b13 Merge "Send BOOT_COMPLETED to all users." into jb-mr1-dev 2012-08-09 11:45:55 -07:00
The Android Automerger
7534553d4c merge in jb-mr0-release history after reset to jb-dev 2012-08-09 11:37:03 -07:00
mike wakerly
1567a4341b Fix typo in UsbManager javadoc.
Closes http://b.android.com/32863

Change-Id: I8fc03ee70209413f279f606b393e79c12ee9c0d2
2012-08-09 11:25:16 -07:00