55 Commits

Author SHA1 Message Date
Jeff Sharkey
104344e507 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
2011-07-10 14:25:18 -07:00
Mike Lockwood
9b9fb5cc08 GPS: Support for on-demand NTP time injection
Change-Id: I83db0249c13598070ed70b9f90207305b60b468f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-29 15:09:40 -04:00
Mike Lockwood
7cc9ee2676 am 859443f2: am c0d9834a: am 5d78e0b8: Merge "GPS: Change NTP polling interval from 4 to 24 hours" into honeycomb-mr2
* commit '859443f2a4d6a2b72c3e9c75720d32d4e4c09489':
  GPS: Change NTP polling interval from 4 to 24 hours
2011-05-24 12:57:17 -07:00
Mike Lockwood
859443f2a4 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
2011-05-23 18:45:17 -07:00
Mike Lockwood
4c12606852 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>
2011-05-23 20:57:43 -04:00
Jake Hamby
afd28ac6ec am ee60f3fb: resolved conflicts for merge of 18cc814c to honeycomb-plus-aosp
* commit 'ee60f3fb1b4e61ac8027293a658ba710e36d36b6':
  Enable support for SMS national language shift tables.
2011-05-11 13:09:42 -07:00
Jake Hamby
ee60f3fb1b resolved conflicts for merge of 18cc814c to honeycomb-plus-aosp
Change-Id: I2b569ada3baec2dc486296623063bc2b504c5e96
2011-05-10 15:52:15 -07:00
Daisuke Miyakawa
a550bdc84a Use passive provider for location based country detection
Bug: 4345419
Change-Id: Ia3e071b97c6971538ea994fdee6029db928201d6
2011-04-28 16:18:19 -07:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
Jake Hamby
b49a73dfc4 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
2011-04-06 14:20:04 -07:00
Mike Lockwood
f63113d158 am a5b68f39: am 5982bf66: GPS: Restore XTRA downloading at boot.
* commit 'a5b68f39e2936a83eac0b995992724cd5de6905d':
  GPS: Restore XTRA downloading at boot.
2011-03-17 16:25:01 -07:00
Mike Lockwood
5982bf66d4 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>
2011-03-17 14:08:01 -04:00
Mike Lockwood
8fa50d4f2d am 6c8d8d89: am 8c32bddf: Merge "GPS: Disable verbose logging" into gingerbread
Merge commit '6c8d8d8927373fdb9ad1c853396b5dbc8295f996'

* commit '6c8d8d8927373fdb9ad1c853396b5dbc8295f996':
  GPS: Disable verbose logging
2010-10-25 14:00:38 -07:00
Mike Lockwood
4a7b65e0d5 GPS: Disable verbose logging
BUG: 3127049

Change-Id: I9efd9eb7ff69724b133f3b70c52e173f49ddfbc5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-25 16:35:55 -04:00
Mike Lockwood
4c918335ef am d78c8d8b: am f6572e7e: Merge "GPS: Fix network type logic in requestRefLocation" into gingerbread
Merge commit 'd78c8d8bb9516878eb5042a28d76bd6bcf4c6780'

* commit 'd78c8d8bb9516878eb5042a28d76bd6bcf4c6780':
  GPS: Fix network type logic in requestRefLocation
2010-10-22 09:17:38 -07:00
Mike Lockwood
edc0f3876c GPS: Fix network type logic in requestRefLocation
Change-Id: I20ef81bcf029b289389dba57e6cf457fda5acbf4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-22 09:16:17 -04:00
Brad Fitzpatrick
385a753dea resolved conflicts for merge of 368fdba4 to master
Change-Id: I42b7b433c86a71a5da5db67109f056a280077c9d
2010-10-21 07:39:10 -07:00
Joe Onorato
431bb22695 Reduce logging.
Remember, the system and main logs are
    - Shared resources
    - Primarily for recording problems
    - To be used only for large grained events during normal operation

Bug: 3104855
Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
2010-10-19 15:08:05 -04:00
Mike Lockwood
0bc1f39643 am 8333d591: am 5d5a9db5: Merge "GPS: Enable some more logging" into gingerbread
Merge commit '8333d59133da8e56cfb5465c767e89c61ede28bc'

* commit '8333d59133da8e56cfb5465c767e89c61ede28bc':
  GPS: Enable some more logging
2010-10-19 09:55:45 -07:00
Mike Lockwood
dd074306e1 am 11eada78: am ba2ec2b4: Merge "Enable framework GPS and location manager logging" into gingerbread
Merge commit '11eada780dc82fcac2a1dad4e2dde1d310b4231c'

* commit '11eada780dc82fcac2a1dad4e2dde1d310b4231c':
  Enable framework GPS and location manager logging
2010-10-19 09:54:42 -07:00
Mike Lockwood
b8d9033d99 GPS: Enable some more logging
Change-Id: I7d13c859002fa96fa8c361c0c709931c6b12eb99
Signed-off-by: Mike Lockwood <lockwood@google.com>
2010-10-18 17:59:48 -04:00
Mike Lockwood
2d4d1bf14b Enable framework GPS and location manager logging
Change-Id: Id54fc01e7288e7d90d7b76824b708bcb2ee88333
Signed-off-by: Mike Lockwood <lockwood@google.com>
2010-10-18 17:06:26 -04:00
Mike Lockwood
301f78bbbe am 431dd3b1: am 86564dc6: Merge "GPS: Add update_network_state call to AGpsRillInterface" into gingerbread
Merge commit '431dd3b1bc8f2acf7cbcf08463649b5629baf398'

* commit '431dd3b1bc8f2acf7cbcf08463649b5629baf398':
  GPS: Add update_network_state call to AGpsRillInterface
2010-10-12 11:50:23 -07:00
Mike Lockwood
50130bbc88 GPS: Add update_network_state call to AGpsRillInterface
Change-Id: I404a7a45773f592de7dfe75a8287fef15515ea8b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-11 14:28:28 -04:00
Mike Lockwood
72f23bb1a5 am 748b413e: am 1c3ef787: Merge "GPS: Do not call sGpsInterface->init() multiple times" into gingerbread
Merge commit '748b413e94c73b760c63a03126df2c4712a1ae05'

* commit '748b413e94c73b760c63a03126df2c4712a1ae05':
  GPS: Do not call sGpsInterface->init() multiple times
2010-10-11 10:20:41 -07:00
Mike Lockwood
ca936f1661 am 98e1f384: am aecab79b: Merge "Remove races in Geocoder/LocationProvider Proxy" into gingerbread
Merge commit '98e1f3840f06d3dfea987154da25d5351460d080'

* commit '98e1f3840f06d3dfea987154da25d5351460d080':
  Remove races in Geocoder/LocationProvider Proxy
2010-10-10 17:15:06 -07:00
Mike Lockwood
b6e5fa895c GPS: Do not call sGpsInterface->init() multiple times
Change-Id: I5f2b55959bd67864168690c1fe619e55edc18268
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-09 20:14:33 -04:00
Mike Lockwood
aecab79b4e Merge "Remove races in Geocoder/LocationProvider Proxy" into gingerbread 2010-10-08 11:17:17 -07:00
Mike Lockwood
22f41918fa resolved conflicts for merge of 6327a9fe to master
Change-Id: I1a398a7100abf75d8df7ae9a3d6110829645ae64
2010-10-07 13:55:25 -04:00
Mark Vandevoorde
8863c43d9e Remove races in Geocoder/LocationProvider Proxy
The proxy must ensure that enable/disable calls are not reordered when
proxied; this change adds synchronization to prevent such reordering
that could happen following an onServiceConnected() callback, and to
ensure cross-thread visibility of writes.

Also, when the package is updated, the old service instance must be
unbound and the new one bound.  This changes uses a separate
Connection object per service instance (package version) to avoid
confusing the binder objects.

Change-Id: I0907f7eed211b97ccfffa395754f1eb8ea8d8fec
2010-10-05 11:12:48 -07:00
Miguel Torroja
1e84da822e 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>
2010-10-05 13:15:37 -04:00
Mike Lockwood
5972e52e15 resolved conflicts for merge of 53b07027 to master
Change-Id: Ia5ce86d84454a4be76e71aeb77942ba8d88d2700
2010-09-30 18:43:52 -04:00
Mike Lockwood
e97ae40dff location: rebind to network location and geocoder services after package update
Change-Id: I2d7db3512b9edd7e0ba27d97442967fc2278e3b9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-30 15:25:54 -04:00
Mike Lockwood
00ec869403 am 6cec0dc0: am 32371695: Merge "GpsLocationProvider: Fix race condition while bringing up APN for SUPL." into gingerbread
Merge commit '6cec0dc0e47459553a3a6572abd28a8e49ce5875'

* commit '6cec0dc0e47459553a3a6572abd28a8e49ce5875':
  GpsLocationProvider: Fix race condition while bringing up APN for SUPL.
2010-09-22 10:01:48 -07:00
Mike Lockwood
2acfd34ccb 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>
2010-09-22 12:22:26 -04:00
Marc Blank
141e00c212 Fix broken build due to rename of Geocoder.isImplemented
Change-Id: I350d560bc99661550f939f70b6abcb40bbe44bfc
2010-09-20 20:35:09 -07:00
Dianne Hackborn
e746f03c6c resolved conflicts for merge of 53686433 to master
Change-Id: I27004dc464f5771d3205ae5757c6eccc5b16854d
2010-09-13 16:56:10 -07:00
Dianne Hackborn
7e9f4eb260 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
2010-09-13 14:20:48 -07:00
Mike Lockwood
64d078425a am 26434836: am b6ef8bad: Merge "GPS: Initialize XTRA support when GPS is enabled" into gingerbread
Merge commit '264348361e0660948a09fe516a535b7c60998def'

* commit '264348361e0660948a09fe516a535b7c60998def':
  GPS: Initialize XTRA support when GPS is enabled
2010-08-17 04:56:32 -07:00
Mike Lockwood
1a1cd3a878 GPS: Initialize XTRA support when GPS is enabled
BUG: 2923148

Change-Id: If9a643e385c6c567b30f47d4caa35fa812a2ba43
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-17 07:45:47 -04:00
Mike Lockwood
7503b96e8e am 19be0bd0: am 5723dfe8: GPS: Don\'t set XTRA download pending flag at boot time.
Merge commit '19be0bd07e348fc405e1c46a698843695fc64e48'

* commit '19be0bd07e348fc405e1c46a698843695fc64e48':
  GPS: Don't set XTRA download pending flag at boot time.
2010-08-06 07:44:28 -07:00
Mike Lockwood
5723dfe8c8 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>
2010-08-06 10:15:15 -04:00
Mike Lockwood
81cf771478 am 7522cac5: am 8dc16c27: Fix typo in GPS mode logic.
Merge commit '7522cac555bd8010d6603cfe0ad831a6f1c1af4f'

* commit '7522cac555bd8010d6603cfe0ad831a6f1c1af4f':
  Fix typo in GPS mode logic.
2010-07-29 09:06:10 -07:00
Mike Lockwood
8dc16c27e2 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>
2010-07-29 11:39:55 -04:00
Bai Tao
a58a8751b4 Add new system service CountryDetector
a. The CountryDetector detects the country the user is in
   in order of mobile network, location, sim card or locale.
   It will be used by contact and contact provider.

b. All added APIs are hidden at this stage.

Change-Id: I4ba278571ffb6ab6ded0996d4f440a18534f8ed4
2010-07-28 09:45:57 +08:00
Mike Lockwood
f602d362ba 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>
2010-06-22 09:26:41 -04:00
Kevin.KY Tsai
0881f4f933 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>
2010-05-21 15:10:39 -04:00
Mike Lockwood
03ca216ac1 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>
2010-05-21 11:47:19 -04:00
The Android Open Source Project
9d164dc5c1 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.
2010-05-06 15:22:17 -07:00
Mike Lockwood
d53ba017ee 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>
2010-04-15 20:41:26 -04:00