359 Commits

Author SHA1 Message Date
destradaa
ea8a8a6076 Update location framework to accept raw data from GPS HAL.
Change-Id: Ib4feca004b53fa89dcece4299974ab08913455a0
2014-07-11 12:20:39 -07:00
Nick Kralevich
43c9b107d8 am 812de6f6: am dbed61c8: am ca2df286: Merge "Fix typo in the exception message."
* commit '812de6f6d75f71d1c2fd9cd319a78389c5adb703':
  Fix typo in the exception message.
2014-07-05 17:23:25 +00:00
David Christie
552bd68c2c Update Location documentation for altitude (WGS84 instead of sea level).
Change-Id: I9531fba75bc1fee7d0e7c1dc179e3d05fb3e8a42
2014-06-17 13:46:30 -07:00
destradaa
cc972725af Make sure FLP HAL statuses currently used are translated (if needed) correctly into the framework.
b/14118906

Change-Id: I4723a3b9cad99aacc70bd3b7b5b5e034aa6c033d
2014-04-25 11:39:16 -07:00
Tom O'Neill
248ada68cc Injected settings no longer include summaries
- Bug: 13279850

Change-Id: I0fd1e60b2a56c45776963c29bbae6f176fdf1bea
2014-03-03 10:30:36 -08:00
Tom O'Neill
afecea1805 Seeing if a provider is enabled doesn't require special permissions
- Bug: 10696351

Change-Id: I4f1612ce10587728e71277587144fdcb59445b3f
2014-02-28 17:38:31 -08:00
John Spurlock
8a985d24ce Tabs -> spaces in frameworks/base.
Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
2014-02-25 09:49:29 -05:00
Masaki Muranaka
405393cfe3 Fix typo in the exception message.
Change-Id: I5e8c089dfd406af40c4eb3aa76af13398c05b7e6
Signed-off-by: Masaki Muranaka <monaka@monami-software.com>
2013-12-11 01:43:29 +00:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Tom O'Neill
d5759437ee Improve some javadoc related to isProviderEnabled() apis
- LocationManager.isProviderEnabled() no longer throws SecurityException:
the caller could already circumvent the permission check by calling
Secure.isLocationProviderEnabled()

Change-Id: I5abd04264299671ed35ce4594b5be46d86378767
2013-09-11 11:03:03 -07:00
Tom O'Neill
cef05c28eb Incorporate new API council comments
- Split getStatus() into onGetSummary() and onGetEnabled()

- Call them on app's UI thread

- Allow runtime exceptions to propagate up

- Make a couple of more methods final to prevent subclasses from playing
around with the intent

- Remove explicit timing requirement from javadoc

- Mention that this will be restricted to system-image apps (will be
enforced by the actual settings code)

- b/10461474

Change-Id: Id22dd7a707c05de396ae4c5810e839ca734714c0
2013-09-05 09:45:03 -07:00
Tom O'Neill
40a86c24d2 Add LocationManager.MODE_CHANGED_ACTION broadcast
- Currently redundant with PROVIDERS_CHANGED_ACTION, but that may
change in the future

- Part of fix for b/10409275

Change-Id: I12daaf20e6546fd9e9dc71c599967fa0ad95e27f
2013-09-03 18:07:10 -07:00
Tom O'Neill
546113d4c2 Improve constant names for settings injection API
- Add timing for getStatus() call to encourage implementors to be fast

- Affects b/10461474

Change-Id: I503cbae5cf27008c587a39ab4e60d8e09daedecc
2013-08-30 10:09:39 -07:00
Tom O'Neill
7f6f45723a Remove or reduce visibility of deprecated methods
- Fix additional getInt() path, restores the location settings screen
functionality.

- Should fix "unresolved link" build breakages in
git_klp-dev-plus-aosp-without-vendor, which is much more persnickety than
klp-dev for some reason.

- Add warning that we may add additional location modes in the future.

- Finish fix for b/10461763 and b/10461474

Change-Id: Id7155e3a0d7526a377d446018ef3bdb057bad3a6
2013-08-27 10:53:15 -07:00
You Kim
d79b4963e2 Missing break in switch statement
Change-Id: I1b7e7a94df8d39e162050911e31e510d2ce5447e
2013-08-28 00:52:52 +09:00
Tom O'Neill
4a7c49c81f Address API Review for SettingInjectorService
- Escape < and > in javadoc

- Constructor does not take log tag

- Start intent rename

- Comments for Status.summary and enabled

- Bonus fixes:

  - Start renaming STATUS_KEY to SUMMARY_KEY

  - Send message back even if getting the status fails so we don't have
  to wait for the fetch to time out

  - Add comment about setting activity being invoked when disabled

- Partial fix for b/10461474

Change-Id: I025e7e0782c2873a4eda20ab4793bc6145daf8db
2013-08-26 10:08:12 -07:00
Tom O'Neill
c8211ea1cc Add a little comment about the enabled value
Change-Id: I4ac0b864f55992242b6a3b0d8ffb328f23f6b645
2013-08-22 14:28:12 -07:00
Tom O'Neill
184e75146c Warn that SettingInjectorService must be fast
- Move UPDATE_INTENT to SettingInjectorSErvice

Change-Id: I9c8f8dc0878647a051cb852721b3436e9d55b391
2013-08-19 13:13:21 -07:00
David Christie
3e32bdd418 Add comments to new hidden API in LocationRequest.
Document their purpose and permissions required in case
this is unhidden in a different code line.

Change-Id: I42f6f950157f488cf51b361e3411861ff98794e8
2013-08-16 16:16:27 -07:00
David Christie
d0d554579b Merge "Use default class loader when creating a LocationRequest from Parcel. This seems to be the standard usage, and there are rare reports of requestLocationUpdates giving NullPointerExceptions on the first call to requestLocationUpdates but not on subsequent calls (b/10207898)." into klp-dev 2013-08-16 22:55:21 +00:00
David Christie
6de1047278 Ensure LocationRequest's worksource defaults to null
Helps to make sure the service doesn't throw a
SecurityException for not having the UPDATE_DEVICE_STATS
permission.

Change-Id: I9be0302f1378d2c4441e6b7d5ce472ed0d5fbd80
2013-08-16 14:12:59 -07:00
David Christie
def20a3350 Use default class loader when creating a LocationRequest from Parcel.
This seems to be the standard usage, and there are rare reports of
requestLocationUpdates giving NullPointerExceptions on the first call
to requestLocationUpdates but not on subsequent calls (b/10207898).

Change-Id: If7a873fba5a2cd77b836ff3fda89105da20104ac
2013-08-15 16:01:42 -07:00
Tom O'Neill
95b2299dc4 Merge "API for location settings injection" into klp-dev 2013-08-14 00:22:18 +00:00
destradaa
0682809ad0 Add support in the platform for Flp Geofencing.
Change-Id: I0fb0e276d3a06322697bb5d46323779aca1f78c5
2013-08-13 16:00:04 -07:00
Tom O'Neill
fa2992c412 API for location settings injection
- Partial fix for b/10287745

Change-Id: Ie998ce0a7b350e4183fce5753bfac3eb51238ff4
2013-08-13 14:41:22 -07:00
destradaa
64be0c617f Address Robin's code review comments in initial FlpHal submission.
Change-Id: I50889599fdc5938a19b8bff4f11e64f44bcebdbf
2013-08-09 16:56:43 -07:00
destradaa
1af4b0280a Add FlpHal layer to support Location Batching.
Change-Id: Ia3a57d869dfb3f067a1b95fa66d54f311ddcfdc3
2013-08-08 15:27:38 -07:00
David Christie
c750c1fb83 Update gps status icon to be a "high power" location icon.
Move icon to right side of the screen and synchronize status with
AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION.

Change-Id: Iea2570501cb18be0489669fd4ea240dc63f9567a
2013-08-08 14:06:25 -07:00
David Christie
40e5782f5c Allow a particular LocationRequest to be excluded from
AppOps monitoring as long as the client as the appropriate
permission (UPDATE_DEVICE_STATS).

Change-Id: I7223a53bc1551e6498302a22eb310c8c5b5684b0
2013-08-01 14:31:48 -07:00
David Christie
82edc9b348 Add WorkSource capability to LocationManager
Change-Id: I0fbbad0879b87ecc75a503bf7963356595bf4b96
2013-07-22 16:50:13 -07:00
Dianne Hackborn
8c84109b9f Use FastPrintWriter... everywhere.
One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result.  Now
you need to first flush the FastPrintWriter.

Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.

Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
2013-06-24 18:16:48 -07:00
Ying Wang
0b5c30a16e Make com.android.location.provider visible to apps-only build.
Change-Id: Ic7983418d9577343817d5a80ebb0847804d2a1b2
2013-05-20 15:08:14 -07:00
Joe Malin
89cded957c am 39069b6e: am efb3726c: am 2b8f3734: am e3c549fc: am cd70c873: Merge "Android U: Making Apps Location-Aware" into jb-mr1.1-docs
* commit '39069b6e82fa848608d56b4efc8f28785816fe27':
  Android U: Making Apps Location-Aware
2013-05-13 23:36:58 -07:00
Joe Malin
39069b6e82 am efb3726c: am 2b8f3734: am e3c549fc: am cd70c873: Merge "Android U: Making Apps Location-Aware" into jb-mr1.1-docs
* commit 'efb3726c226001149c92d48fa50da7031c231490':
  Android U: Making Apps Location-Aware
2013-05-13 23:34:47 -07:00
Joe Malin
3ddba7ee37 Android U: Making Apps Location-Aware
Change-Id: I8f44c6ca6d797ceb8ada5b2c723a8cca0081cf0a
2013-05-13 20:50:22 -07:00
Jaikumar Ganesh
8ce470dd4b GPS Hardware geofencing.
Add support for doing geofencing in hardware.

Change-Id: I6d5015190e8d84e1f4beb1010ed977a71c1622d0
2013-04-10 15:25:07 -07:00
Victoria Lease
54ca7aef2e Annotate Locations coming from mock providers
LocationManagerService now annotates incoming Location objects that
have come from mock location providers. The new isFromMockProvider()
method can be called on any Location to determine whether the
provider that supplied the Location was a mock location provider.

Bug: 6813235
Change-Id: Ib5140e93ea427f2e0b0036151047f87a02b4d23a
2013-01-22 09:39:47 -08:00
Dianne Hackborn
a06de0f29b New "app ops" service.
Initial implementation, tracking use of the vibrator, GPS,
and location reports.

Also includes an update to battery stats to also keep track of
vibrator usage (since I had to be in the vibrator code anyway
to instrument it).

The service itself is only half-done.  Currently no API to
retrieve the data (which once there will allow us to show you
which apps are currently causing the GPS to run and who has
recently accessed your location), it doesn't persist its data
like it should, and no way to tell it to reject app requests
for various operations.

But hey, it's a start!

Change-Id: I05b8d76cc4a4f7f37bc758c1701f51f9e0550e15
2013-01-09 12:47:47 -08:00
Laurent Tu
ccb4c318aa Revert "Move location provider lib to frameworks/ex - 1"
This reverts commit 578081f9da7ddb056b9b98524c639acd9194ecb6.
2012-12-11 15:45:09 -08:00
Laurent Tu
578081f9da Move location provider lib to frameworks/ex - 1
Move location provider lib to frameworks/ex so it can be re-used in
GmsCore.

This is the frameworks/base part of the change (1).

Change-Id: Ifc31a6809876e9c9afb6ed841b66cf06de7e8964
2012-12-05 13:57:01 -08:00
Victoria Lease
a5fa049562 am 4b77660b: am 7023b3b0: Merge "clarify Geofence.createCircle() param ranges" into jb-mr1.1-dev
* commit '4b77660b38cfff2ffb67c15db4c9e20adaac41d7':
  clarify Geofence.createCircle() param ranges
2012-11-29 14:28:04 -08:00
Victoria Lease
3dffb8cb69 clarify Geofence.createCircle() param ranges
This commit adds the valid ranges to the latitude/longitude
parameters in Geofence.createCircle()'s javadoc.

Bug: 7172696
Change-Id: Iff6e3c3723d3fd9b6393bbc827ec5755c0d034af
2012-11-27 09:23:52 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Laurent Tu
7ab7f53892 Hide new location APIs and undeprecate old ones
Hide all new location APIs related to LocationRequest/Geofence and
undeprecate all deprecated APIs consequently to the LocationRequest and
Geofence introduction. Also introduce LocationRequestUnbundled for
LocationProviders to use.

Change-Id: I5b116c7d342041f45b341c88a4b6813571118018
2012-11-01 15:22:22 -07:00
Victoria Lease
1e701979a0 Merge "fix NLP for COARSE applications, build FLP with SDK" into jb-mr1-dev 2012-11-01 15:07:56 -07:00
Victoria Lease
779b77455f fix NLP for COARSE applications, build FLP with SDK
In this commit, we provide a means for unbundled location providers
to attach an EXTRA_NO_GPS_LOCATION to the Locations that they report.

We also build FusedLocation against the SDK rather than the internal
tree.

Used in conjunction with I394ded497b8de40d1f85618bff282553cdf378cb
to fix NLP for applications with only ACCESS_COARSE_LOCATION
permission.

Bug: 7453355
Change-Id: Ie696f7abff9ef5237740ab87fe9f537a1c812c54
2012-11-01 13:55:36 -07:00
Scott Main
8761e143c9 docs: Clarify the callback mechanisms for LocationRequest
and clarify horizontal geofencing

Change-Id: I8ff264d7a12c8ec3c79854e008aeeb5f922ad459
2012-11-01 09:54:15 -07:00
Victoria Lease
b17223b6f5 revise android.location.Geofence documentation
Bug: 7172696
Change-Id: Ib1a104ee4a97c51996200b8d456face66178115f
2012-10-24 10:40:07 -07:00
Victoria Lease
2291ca47c7 LocationManager javadoc permission fixes
The javadoc mistakenly claimed that GPS and PASSIVE location
providers could be used with ACCESS_COARSE_LOCATION permissions.
That was incorrect, and the javadoc has been amended.

Bug: 7389249
Change-Id: I6f6489bb539679a962c67ae7263857700df33c82
2012-10-22 12:53:32 -07:00