History log of /frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b041f23026536dd287c1a9a962642c84ebd10004 08-May-2012 Nick Pelly <npelly@google.com> Increase interval threshold below which we just leave the GPS on.

Hot TTTF is about 5 seconds, so don't cycle the GPS hardware until
the interval is 10 seconds.

Also add some more dumpsys logging.

Bug: 6367964
Change-Id: I39402fc61f34458a1639c8814610a02606a8eb79
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
973481d6677ba89721558cb245fa8c701bf5463b 28-Feb-2012 Jean-Baptiste Queru <jbq@google.com> am ccd08b8d: am e939edb5: am f418738c: am d7fa7dee: Merge "Fixes update of extras Bundle in new Locations for GPS Provider"

* commit 'ccd08b8de9dc4c9cfaee93cbbcc7053cc9e8d96f':
Fixes update of extras Bundle in new Locations for GPS Provider
ced2b2c09a209e017f02cf28ddd9d35b2d8b8ada 19-Dec-2011 Sean Barbeau <sjbarbeau@gmail.com> Fixes update of extras Bundle in new Locations for GPS Provider

This patch fixes the update of the extras Bundle in the Location object
each time the platform derives a new GPS location and passes it to
listening applications via LocationListener.onLocationChanged().

Sometime between Android 1.6 and 2.1 a bug was introduced that stopped
any extras calculated by the platform from being added into the Location
object, which means they were never passed up to any LocationListeners
for the GPS Provider. This manifested as an issue where the number of
satellites used to derive a fix always reported “0” when retrieved from
Location.getExtras() (Issue 4810 on the Android Issues page -
http://code.google.com/p/android/issues/detail?id=4810).

Sample code to be used within
LocationListener.onLocationChanged(Location location) which demonstrates
this problem:

Bundle extras = location.getExtras();

Int numSats = extras.getInt("satellites"); //This always reports “0”
//post 1.5, although in 1.5
//it properly reported the
//number of satellites used
//to derive this location

The “satellites” extra key/value pair for Locations is defined in
http://developer.android.com/reference/android/location/Location.html#getExtras()

This patch modifies GPSLocationProvider.java to properly update the
Location object with the extras Bundle before the Location object is
passed to any listening applications, and therefore the number of
satellites used to derive a fix can now be retrieved properly through
location.getExtras() (as shown in sample code above). Therefore, this
patch fixes Issue 4810.

Change-Id: Ief21056a3623269bb3149ec78ab92738a234f57f
Signed-off-by: Sean Barbeau <sjbarbeau@gmail.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
2ffe0ad39127950074dc74bc5d15a284975da5ae 25-Oct-2011 Mike Lockwood <lockwood@android.com> Always use fresh NTP time for GPS

This is especially important when AGPS is disabled

Bug: 5355661

Change-Id: I072dbe1ddf43aa24c8fc39b750040504a1633c53
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
2b15cb21b313f83f7cccdc6f9116ba31ddc190ad 04-Aug-2011 Mike Lockwood <lockwood@android.com> Resolve merge conflict for '75f1fdec':

GPS Provider Service changes

GPS engine needs to receive network state changes from Android fw.

Added db query for the current APN, also added a new parameter
between JNI / HAL to the new method in AGpsRilInterface struct
for gps engine to receive APN from GPSLocationService

Conflicts:
services/java/com/android/server/location/GpsLocationProvider.java

Change-Id: I33c45027f1571493d3525324f62d199517c4960c
Signed-off-by: Mike Lockwood <lockwood@android.com>
75f1fdec3e95e9c8b5add02ba6e9b14913058f22 04-Aug-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 0b3af353: am a82ee49a: am 8f5dd9ad: Merge "GPS Provider Service changes"

* commit '0b3af353dcf61177158934a11404cf2914038696':
GPS Provider Service changes
a5fe6b2efee02ab11c35e80ec50fec62be227273 05-Jun-2011 Kevin Tang <zhikait@codeaurora.org> GPS Provider Service changes

GPS engine needs to receive network state changes from Android fw.

Added db query for the current APN, also added a new parameter
between JNI / HAL to the new method in AGpsRilInterface struct
for gps engine to receive APN from GPSLocationService

Change-Id: I62e35c948d2ac1961771d1a10581a3b8e695c05a
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
b7d95a46dfacf04896d5b084f13bcbe6eab33633 28-Jul-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 21700fed: am 5f7203eb: am 5a27a754: am bd1dee94: Merge "gps: Adding ip address for AGps"

* commit '21700fedfe29f6a0a752d2bea46142038e69136c':
gps: Adding ip address for AGps
21700fedfe29f6a0a752d2bea46142038e69136c 28-Jul-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 5f7203eb: am 5a27a754: am bd1dee94: Merge "gps: Adding ip address for AGps"

* commit '5f7203eb258503bc5d2ba29176bdf483a68a93b8':
gps: Adding ip address for AGps
8efd74dbedb65f69734318d9d6be70767f30b57a 02-Mar-2011 Stephen Li <stephenl@codeaurora.org> gps: Adding ip address for AGps

Change-Id: Ic590187d159853de2f1bd2912e159f0a00d8fb10
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
3885228457bc61a86fe4e91ff18fb331fc3ee777 28-Jul-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am f8d13e53: am bf676d46: am 7083ed44: am 0ff79e88: Merge "GPS: Changes to enable on-demand data call flow for CDMA connections"

* commit 'f8d13e535c3e6166c2386adac3b3a2f115d2b79d':
GPS: Changes to enable on-demand data call flow for CDMA connections
f8d13e535c3e6166c2386adac3b3a2f115d2b79d 28-Jul-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am bf676d46: am 7083ed44: am 0ff79e88: Merge "GPS: Changes to enable on-demand data call flow for CDMA connections"

* commit 'bf676d460d1d1fc8923982006c38d0f6785daea8':
GPS: Changes to enable on-demand data call flow for CDMA connections
104344e507610be42fb70c7deda3c422c543bfcb 10-Jul-2011 Jeff Sharkey <jsharkey@android.com> Cached NTP time for system services.

Uses NTP server and timeout from secure settings, or fallback to
defaults in resources. Update various system services to use cached
NTP time when fresh enough, or force updates as needed.

Bug: 4517273
Change-Id: Ie1c4c4883836013d02ca0bbd850cf8949f93b34b
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
9b9fb5cc08eaa0b66a80eba2f03168531544f65a 29-Jun-2011 Mike Lockwood <lockwood@android.com> GPS: Support for on-demand NTP time injection

Change-Id: I83db0249c13598070ed70b9f90207305b60b468f
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
83b69713f2dbeee7ff5e07836673a9a477be236f 26-Jan-2011 Stephen Li <stephenl@codeaurora.org> GPS: Changes to enable on-demand data call flow for CDMA connections

In the CDMA case we do not get a valid APN on a data connection request
to the connectivity manager. A fix is put in so that even if we get a
null APN we populate this field before we call native_agps_data_conn_open()
method to avoid a run time exception.

Change-Id: I134ead5d8b177fced9b14756c6bd8199a2b9c35d
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
859443f2a4d6a2b72c3e9c75720d32d4e4c09489 24-May-2011 Mike Lockwood <lockwood@android.com> am c0d9834a: am 5d78e0b8: Merge "GPS: Change NTP polling interval from 4 to 24 hours" into honeycomb-mr2

* commit 'c0d9834a1c6dd8d9cd0b7fe9b50495578c104405':
GPS: Change NTP polling interval from 4 to 24 hours
4c126068527c9adba45aa227d40e245ee8e7c9a4 24-May-2011 Mike Lockwood <lockwood@android.com> GPS: Change NTP polling interval from 4 to 24 hours

4 hours is excessive, and we want to save bandwidth on the NTP servers

Change-Id: Ic5ac4f4a8e62167206f3f620ea51635a2ea771d6
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
b49a73dfc4c9817bba1f227e9330555acdf9b56f 16-Mar-2011 Jake Hamby <jhamby@google.com> Enable support for SMS national language shift tables.

Add support for encoding and decoding SMS 7 bit user data using the
national language shift tables defined in 3GPP TS 23.038 (GSM/UMTS only),
including the new tables added in Release 9 for Indic languages.

Decoding is always supported, but encoding is only enabled for the
specific language tables added to the new integer array resources
"config_sms_enabled_single_shift_tables" and
"config_sms_enabled_locking_shift_tables" defined in
frameworks/base/core/res/res/values/config.xml. The default empty arrays
should be overridden in an OEM overlay for the specific nationalities where
SMS national language shift table encoding is allowed/mandated (e.g. Turkey).
GsmAlphabet.countGsmSeptets() will try to find the most efficient encoding
among all combinations of enabled locking shift and single shift tables.
If no 7 bit encoding is possible, 16 bit UCS-2 encoding will be used.

This change also fixes a bug in the decoder: when an escape septet
is followed by a septet with no entry in the extension (single shift)
table, TS 23.038 Table 6.2.1.1 states that the MS shall display
the character in the main GSM 7 bit default alphabet table, or the
active national language locking shift table. Previously, we were
decoding this sequence as a space character. Two consecutive escape
septets will continue to decode as a space character, according to
Note 1 of table 6.2.1.1.

Change-Id: I4dab3f0ffe39f3df2064ed93c9c05f26e274d18b
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
5982bf66d4fdea38105d91ff0f9d38660ac87581 17-Mar-2011 Mike Lockwood <lockwood@android.com> GPS: Restore XTRA downloading at boot.

Between Froyo and Gingerbread we disabled scheduling an XTRA data download
at boot because the Qualcomm engineers thought it should not be necessary.
However, some users noticed a GPS performance degradation after receiving
their Gingerbread update, and some reported forcing an XTRA download cleared
up the problem. This change restores the Froyo behavior of downloading
XTRA data after boot.

Bug: 3509901

Change-Id: I5a52201a2b24ce4a5d3ddb1f86340e3d5387f603
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
4a7b65e0d544ef1feff8e1e5789f469f89ebb85c 25-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Disable verbose logging

BUG: 3127049

Change-Id: I9efd9eb7ff69724b133f3b70c52e173f49ddfbc5
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
edc0f3876ce6e14f0ce35ad950c55031694fd4f8 22-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Fix network type logic in requestRefLocation

Change-Id: I20ef81bcf029b289389dba57e6cf457fda5acbf4
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
b8d9033d9928209e68518c4b12fea74187ddb382 18-Oct-2010 Mike Lockwood <lockwood@google.com> GPS: Enable some more logging

Change-Id: I7d13c859002fa96fa8c361c0c709931c6b12eb99
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
2d4d1bf14b531de9d4238b1e41b53c77f8976405 18-Oct-2010 Mike Lockwood <lockwood@google.com> Enable framework GPS and location manager logging

Change-Id: Id54fc01e7288e7d90d7b76824b708bcb2ee88333
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
50130bbc884a7ad7db39dbc4f54e76e8be87761f 11-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Add update_network_state call to AGpsRillInterface

Change-Id: I404a7a45773f592de7dfe75a8287fef15515ea8b
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
b6e5fa895c03eeefaa810eaceb498254096c093d 10-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Do not call sGpsInterface->init() multiple times

Change-Id: I5f2b55959bd67864168690c1fe619e55edc18268
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
1e84da822e7aa4d494b31c8759917d2751611f84 27-Jul-2010 Miguel Torroja <migueltb@broadcom.com> GPS: Add support for AGpsRilInterface.

Adding changes to be able to have access to missing data to SUPL
(celld, imsi, WAP_PUSH and SMS)

Change-Id: I0207f7f7ea6595ed3fd7021cb732feddf52e4cf9
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
2acfd34ccbd39258422333c9c66c586297c97683 22-Sep-2010 Mike Lockwood <lockwood@android.com> GpsLocationProvider: Fix race condition while bringing up APN for SUPL.

If handleUpdateNetworkState() is called before
ConnectivityManager.startUsingNetworkFeature() returns, then we will not
call native_agps_data_conn_open() to inform the GPS that the APN is up.
So we now set mAGpsDataConnectionState to AGPS_DATA_CONNECTION_OPENING
before calling ConnectivityManager.startUsingNetworkFeature() to avoid
this problem.

Change-Id: I5e1597d6494dc8ab68e608911c546a7a04f2ea07
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
7e9f4eb2608148436cef36c9969bf8a599b39e72 11-Sep-2010 Dianne Hackborn <hackbod@google.com> Track client requests through location manager.

This fixes a problem where applications could ask the location
manager to do very heavy-weight things (like... say... update
location every minute), which would get accounted against the
system instead of the application because ultimately it is the
system making the heavy calls (wake locks, etc).

To solve this, we introduce a new class WorkSource representing
the source of some work. Wake locks and Wifi locks allow you
to set the source to use (but only if you are system code and thus
can get the permission to do so), which is what will be reported
to the battery stats until the actual caller.

For the initial implementation, the location manager keeps track
of all clients requesting periodic updates, and tells its providers
about them as a WorkSource param when setting their min update time.
The network location provider uses this to set the source on the
wake and wifi locks it acquires, when doing work because of the
update period.

This should also be used elsewhere, such as in the GPS provider,
but this is a good start.

Change-Id: I2b6ffafad9e90ecf15d7c502e2db675fd52ae3cf
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
1a1cd3a878b6389c097e34d114b60cf953edaeaa 17-Aug-2010 Mike Lockwood <lockwood@android.com> GPS: Initialize XTRA support when GPS is enabled

BUG: 2923148

Change-Id: If9a643e385c6c567b30f47d4caa35fa812a2ba43
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
5723dfe8c87d0887b8926f43637ed300466890d2 06-Aug-2010 Mike Lockwood <lockwood@android.com> GPS: Don't set XTRA download pending flag at boot time.

XTRA data downloads are now strictly on demand from the GPS engine.
Also fix typo in handleDownloadXtraData()

Change-Id: Ied1a6e2e62134add4d965326aae909c86f834682
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
8dc16c27e23dae5bdf65fd2a2ced97c2f645a633 29-Jul-2010 Mike Lockwood <lockwood@android.com> Fix typo in GPS mode logic.

MS-Assisted support should not be required for using MS-Based mode.

Change-Id: Ia6ee219674de3e9cc13190b753f8776305a4fa90
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
f602d362ba4bb3adbf1eb4e38a794fb14274293a 20-Jun-2010 Mike Lockwood <lockwood@android.com> GPS: remove GpsEventThread from GpsLocationProvider

Rather than polling for events from the native code in an event thread,
we now require the GPS HAL libraries to call our callbacks from a thread
that is registered with the JVM to call directly into Java.
This eliminates a thread from our code and removes one step in the chain
of message passing from the GPS to the Location Manager client.

Change-Id: I2745a157690310ba9a699a8369f54a7366c6b1ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
0881f4f9339febee85c9ab4cba69970ac5cbde55 21-May-2010 Kevin.KY Tsai <kevin.ky_tsai@htc.com> Report number of satellites used in fix instead of total for GPS Location extra

Change-Id: Ibffc8d21b31b02a91c8506733002e4a778556978
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
03ca216ac19ea4e7afcb183c20c7c780f0d97756 01-Apr-2010 Mike Lockwood <lockwood@android.com> New Location Manager APIs for Criteria based requests and single shot mode.

Use MS-Assisted mode for single shot GPS fixes if it is supported.

Add finer grained control over accuracy to the android.location.Criteria class
and location criteria logic from LocationManager to LocationManagerService

Change-Id: I156b1f6c6a45d255c87ff917cf3e9726a6d7a75b
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
9d164dc5c1be55287725343349923f705a5bf8d4 07-May-2010 The Android Open Source Project <initial-contribution@android.com> am f4dffd8a: merge from open-source master

Merge commit 'f4dffd8a45386b5a5f0e6de4f30facc9eaac4001' into kraken

* commit 'f4dffd8a45386b5a5f0e6de4f30facc9eaac4001':
GpsLocationProvider: Store new Location before onGpsStatusChanged is sent
Telephony: Add PUK MMI code support for CDMA RUIM phones
Type Zero Sms should not be displayed/stored/notified.
d53ba017ee2381383b4bb4d92e6e0e661431660f 16-Apr-2010 Mike Lockwood <lockwood@android.com> GpsLocationProvider: Eliminate MIN_FIX_COUNT.

Now we stop after one fix rather than waiting for 10 when requesting occasional
fixes to conserve power.

Change-Id: Ic420f2d20780db983fc4db22246e0a486eecc58e
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
1879d284bf3dd704dbc8c95aad262ebbe3c3c0a4 16-Apr-2010 Mike Lockwood <lockwood@android.com> GpsLocationProvider: Remove NTP sanity checking now that the NTP client has been fixed.

Change-Id: Iedf3f5ff333db7298de6cd6e86fface1f8421738
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
63aa5a6f98b1016863e4f6edd87eb471b28dc28f 15-Apr-2010 Mike Lockwood <lockwood@android.com> clear calling identity in GpsLocationProvider.sendExtraCommand().

This fixes problems with wakelock permissions introduced in an earlier change.

Change-Id: If0f4761ac27525d1eece0613c96be62f9e370a14
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
04598b67a58fad93e5060bb77756ba4863013aed 14-Apr-2010 Mike Lockwood <lockwood@android.com> GPS: Support for GPS HAL managing its own scheduling

Also update to support new position mode API.

Change-Id: I00acc094d3e85bc5c0cd431af517064bfa8f2b1a
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
98e48691f738680fe59e7383a41458e7337daccd 07-Apr-2010 Mike Lockwood <lockwood@android.com> GpsLocationProvider: optimize wake lock usage.

Rather than holding a wake lock the entire time the GPS is active, we now
hold it only when messages are pending for GpsLocationProvider's Handler
and rely on the lower level implementation holding a wake lock when calling
into the provider.

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java
00b74270c9f136a8727c5f6cda0997a3a905f385 26-Mar-2010 Mike Lockwood <lockwood@android.com> Move files internal to LocationManagerService from framework.jar to services.jar

Change-Id: Iebbfc49b8300ab59730733efdf489ec87ea45a25
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java