119 Commits

Author SHA1 Message Date
Robert Greenwalt
19b9ab46a9 Turn off DUN connection after tethering.
Use matching feature type when turning tethering off or the request is ignored.

Also, turn on DUN apn right away so that we don't fail aggressive test cases.

Also don't report connections for enabled apn's that we're no longer connected to.

bug:3332880
bug:3338033
Change-Id: I7db2dfd4879f03465bc9f6d39488c078570dcaf3
2011-01-12 15:52:10 -08:00
Robert Greenwalt
f21ef7db77 Fix any_connection reporting.
A recent change caused us to think there was no other connection available
when transitioning from 3g to wifi.

bug:3335074
Change-Id: I1f55df8a0eb5b27131572b111fbaac8f1ebbc0d3
2011-01-11 18:32:17 -08:00
Robert Greenwalt
bff9018b74 Fix handling of multiple possible default networks
Old code assumed only 2 choices but now we have more.

bug:3328196
Change-Id: I92a02b31fae6c53f73b3684581230fad5cb1b82a
2011-01-06 17:12:23 -08:00
Stan Chesnutt
3d1db8672a Allow bumpDns() to execute correctly before boot has completed
Change-Id: I5c2cf023e555f49d7e29592f9d1439b3ac367e3d
2011-01-05 17:14:03 -08:00
Robert Greenwalt
e32e812b11 Always file DUN requests for tethering.
A bit of a hack so that first trySetupData call uses the proper APN in
strange edge cases.  Made a new startUsingNetworkFeature string
that ConnectivityService knows means always pass the request to telephony
even if telephony connections are not currently available.

bug:3133178
Change-Id: I2559b9cbaed4b4ec02bdf7ea78e6003ee2be64f2
2011-01-04 11:15:19 -08:00
Robert Greenwalt
d825ea4ff0 Cache the current value of background-data.
The writing of the persistent setting is async, but we should
still remember it so if somebody asks before the write completes
we give the right answer.  Makes the read faster too.

bug:3312848
Change-Id: I864cb5f8d496d5bf9cbf0af9a71ca84da078f7c6
2010-12-29 16:15:02 -08:00
Robert Greenwalt
55985bed7b Make sure the ProxyProperties is always present.
Lets people know that it's non-null, though the InetAddr inside may be.

bug:3305689
Change-Id: I0fe16a9ef1feba987680c419fa2dc0e00e400d91
2010-12-28 11:15:06 -08:00
Robert Greenwalt
1039872f59 Reduce the spinning while tethering.
Doing too much stuff - don't retry when we know we shouldn't.

bug:3293460
Change-Id: Ic7b0b6486b39377d74df7a35572059ac60d03fa0
2010-12-23 17:13:57 -08:00
Jaikumar Ganesh
15c7439acb Add TYPE_BLUETOOTH network interface for reverse tethering.
Change-Id: I2aa61ce15f57aea9e8fd3a4cb56799c8bc51e998
2010-12-22 15:24:18 -08:00
Robert Greenwalt
efe5bd77eb am 46f98746: am 5d0fafe8: Merge "Be sure and report NO_CONNECTIVITY when needed." into gingerbread
* commit '46f987465c1df4ec984e725747d4d79fc592abb7':
  Be sure and report NO_CONNECTIVITY when needed.
2010-12-22 11:35:06 -08:00
Robert Greenwalt
46f987465c am 5d0fafe8: Merge "Be sure and report NO_CONNECTIVITY when needed." into gingerbread
* commit '5d0fafe80752ad4e40fe0ec2bc06c43e669a0612':
  Be sure and report NO_CONNECTIVITY when needed.
2010-12-21 16:06:19 -08:00
Robert Greenwalt
d68e321841 Be sure and report NO_CONNECTIVITY when needed.
Reports that we sometimes didn't report NO_CONNECTIVITY led to this suggested change.
Could not repro the problem, but the change looks ok anyway.  Better safe than sorry.

bug:3276408
Change-Id: I0cdb48a05a5c9dfcf3a0b468a6eae43d461023b1
2010-12-21 11:43:28 -08:00
Robert Greenwalt
0be1e9844a Correct an error code to pass CTS.
We used to report an unmatch stopUsingNetworkFeature call with an "ok, stopped" response,
but we need to report it as an error.

bug:3281837
Change-Id: I35728159e62a021cb10de4396b3f60a92df0570f
2010-12-15 15:22:50 -08:00
Wink Saville
e798268f16 Have MobileDataStateTracker & DataConnectionTracker communicate directly.
Added CMD_SET_DATA_ENABLE which is sent when data is enabled/disabled
via the ConnectivityService. It is anticipated that the communication
channel will be used for additional commands and to receive unsoliciated
commands from DataConnectionTracker back to MobileDataStateTracker.

Change-Id: I3863e7385155d503f069b1dcb7e4f766ec78b5f8
2010-12-07 10:31:02 -08:00
Robert Greenwalt
da3d5e6587 Add a Dummy data connection for testing purposes.
Enable with:
    <string-array translatable="false" name="networkAttributes">
        <item>"wifi,1,1,1"</item>
        <item>"dummy,7,7,0"</item>
    </string-array>

in your config.xml

Change-Id: I3965edaeb4873e95131f4083b8d23d682ce17841
2010-12-07 07:48:33 -08:00
Robert Greenwalt
a2e1339241 Make Proxy change broadcast sticky
Makes it easier for apps who care.  Includes the current values.

Change-Id: I5f1d3589a036ebc9910281f97d4780ecda2829f2
2010-12-06 11:29:17 -08:00
Robert Greenwalt
733c62909c Don't clobber the net hostname if it's already set.
Be a good citizen.

Change-Id: Ic58aeab013e2ff34201be71e01e399390edbbb5f
2010-12-06 09:47:31 -08:00
Wink Saville
ed9c02b56c Cleanup logging.
Change-Id: Ie73c6d97ec19b0d27e58c085b60e885d90066056
2010-12-03 12:01:38 -08:00
Robert Greenwalt
b7090d68be Load persisted global proxy settings.
Was persisted before, but not loaded at boot.

Change-Id: I6d6b69ede3d212a8266847d73d07a037ae917788
2010-12-02 12:19:17 -08:00
Robert Greenwalt
434203a277 Notify all VMs when proxy changes.
bug:2700664
Change-Id: I74cc6e0bd6e66847bf18f524ce851e3e9d2c4e87
2010-11-19 10:24:30 -08:00
Robert Greenwalt
03595d0118 Tell each VM to flush their DNS cache.
bug:3095357
Change-Id: I93de24e3e5a7d8b94d55f4facfffc863a2b8c202
2010-11-04 11:52:35 -07:00
Wink Saville
c2a4432507 am 83d97f46: am 96619f9f: Merge "Add some error-case logging." into gingerbread
Merge commit '83d97f460412f117998f4d446fd65ca79761a294'

* commit '83d97f460412f117998f4d446fd65ca79761a294':
  Add some error-case logging.
2010-10-11 10:49:47 -07:00
Wink Saville
83d97f4604 am 96619f9f: Merge "Add some error-case logging." into gingerbread
Merge commit '96619f9f0653a5c7f407c52ab565b5ddf23ad696' into gingerbread-plus-aosp

* commit '96619f9f0653a5c7f407c52ab565b5ddf23ad696':
  Add some error-case logging.
2010-10-10 12:47:18 -07:00
Robert Greenwalt
572172befb Add some error-case logging.
Turning off all debug logging is a good thing, but it leaves us blind when errors come in.
bug:3075537

Change-Id: I8a4e7f2ce094574ec45cec268bdbc46449540c9f
2010-10-10 11:26:41 -07:00
Robert Greenwalt
ba175a5e13 Turn on some debugging info
bug:3060742
Change-Id: I86f4e0b3f678c80e1bee11abd32ab0b9e0563b09
2010-10-05 19:12:26 -07:00
Dianne Hackborn
dc71b9e4d6 resolved conflicts for merge of 6a3eddb4 to master
Change-Id: I1ca1d100274d4a733ef2bf58b0d5d7217b4f858e
2010-09-30 20:34:34 -07:00
Dianne Hackborn
6a3eddb469 am 0a69f597: Merge "Rub in a little \'ol log-b-gone." into gingerbread
Merge commit '0a69f597604254bc37721b135ab612eaacdd0cbd' into gingerbread-plus-aosp

* commit '0a69f597604254bc37721b135ab612eaacdd0cbd':
  Rub in a little 'ol log-b-gone.
2010-09-30 19:12:11 -07:00
Dianne Hackborn
cef65eeb03 Rub in a little 'ol log-b-gone.
Mmmmmm...  great fresh scent!

Change-Id: I050e70b31b5d4a9c6731f15a4b51a3620a33a78d
2010-09-30 18:27:22 -07:00
Robert Greenwalt
f333123d50 resolved conflicts for merge of 2d457a32 to master
Change-Id: I08fc7881010083407a102f471483cd6d5b9774b4
2010-09-24 14:47:06 -07:00
Robert Greenwalt
2d457a32a6 am 8f97fe55: Merge "Move long Connectivity tasks to handler thread." into gingerbread
Merge commit '8f97fe551e7bd95abf395eed303b975eaa8f0158' into gingerbread-plus-aosp

* commit '8f97fe551e7bd95abf395eed303b975eaa8f0158':
  Move long Connectivity tasks to handler thread.
2010-09-24 11:09:29 -07:00
Robert Greenwalt
8dcc28be06 Move long Connectivity tasks to handler thread.
Reduce ANR potential.
bug:2942829

Change-Id: I21610b462d5ab91821015cd16eecd86d2c0580d1
2010-09-23 16:43:21 -07:00
Robert Greenwalt
19531dacfe am f532e958: am 6548f395: Merge "Inet status bug fix" into gingerbread
Merge commit 'f532e9583ec0111b1c198e895ed1b2fd83c3d5cf'

* commit 'f532e9583ec0111b1c198e895ed1b2fd83c3d5cf':
  Inet status bug fix
2010-09-21 10:44:26 -07:00
Robert Greenwalt
4524c62448 resolved conflicts for merge of 749e6bc5 to master
Change-Id: Ica492307505d53e57863d4363b5f75abd798bcd8
2010-09-21 10:27:59 -07:00
Robert Greenwalt
f532e9583e am 6548f395: Merge "Inet status bug fix" into gingerbread
Merge commit '6548f395a974d2a8dcefe29b3a498d1ca87d8aef' into gingerbread-plus-aosp

* commit '6548f395a974d2a8dcefe29b3a498d1ca87d8aef':
  Inet status bug fix
2010-09-21 08:22:59 -07:00
Robert Greenwalt
029be81302 Inet status bug fix
Don't wipe out the connected status every time we get a cellular status change.
Don't filter out disconnect event for wifi - we need them.

bug:3009923
Change-Id: I68cadac5f44d6eb4e0fe711fda7c5d218abb45bd
2010-09-21 05:38:36 -07:00
Robert Greenwalt
749e6bc5cc am 313af5a3: Merge "Add Inet Condition log to bugreports" into gingerbread
Merge commit '313af5a3b5ba51eb75dea35eb568c841aa4beb6a' into gingerbread-plus-aosp

* commit '313af5a3b5ba51eb75dea35eb568c841aa4beb6a':
  Add Inet Condition log to bugreports
2010-09-20 21:31:29 -07:00
Robert Greenwalt
4e8dfefb06 Add Inet Condition log to bugreports
Reports who reports what condition on which network at what time.  Where is implied.

Change-Id: I89fbc7323dec438041859fcc934169fa325f0133
2010-09-20 16:00:44 -07:00
Robert Greenwalt
d192dad69e Enhance http proxy support
Make it read proxys the correct way from CS so it works for all network types.
Add utility class for apache http client support.

bug:2700664
Change-Id: If81917b19b5f0636247a6519a1ec78bd8dbf3596
2010-09-17 16:14:10 -07:00
Robert Greenwalt
5b7c5e0552 am f434dd16: am 134b28a7: Merge "Update Inet Connection Status display" into gingerbread
Merge commit 'f434dd1660f222a1ee85e77c98893b90857805c2'

* commit 'f434dd1660f222a1ee85e77c98893b90857805c2':
  Update Inet Connection Status display
2010-09-15 19:49:53 -07:00
Robert Greenwalt
f434dd1660 am 134b28a7: Merge "Update Inet Connection Status display" into gingerbread
Merge commit '134b28a7f049719cb74fd5baadbbcc5915bc861b' into gingerbread-plus-aosp

* commit '134b28a7f049719cb74fd5baadbbcc5915bc861b':
  Update Inet Connection Status display
2010-09-15 18:02:59 -07:00
Robert Greenwalt
1e9aac2bd8 Update Inet Connection Status display
Cellular signal strength should also be green - these assets aren't, but
the art guys are working on that.

Also using a new intent so we don't overload the CONNECTIVITY_ACTION and
confuse the apps.
bug:2994024

Change-Id: I6fe8f65dd6e9869d9724064c4fae45340491a4d8
2010-09-15 17:54:17 -07:00
Robert Greenwalt
057d5e9824 Fix the build
broken merge resolution.

Change-Id: Idf1abef1ef79ddc43b9eaba1e0e523085702e2fe
2010-09-09 14:05:10 -07:00
Robert Greenwalt
ca4306c976 resolved conflicts for merge of ec52c98d to master
Change-Id: I31297232c9d918a967b93c3ae977f81b6a94f2ed
2010-09-09 13:15:32 -07:00
Robert Greenwalt
ec52c98d44 am 0727a865: Merge "Add network condition reporting." into gingerbread
Merge commit '0727a865d83b944c2fecc0bf1228a36976fe5300' into gingerbread-plus-aosp

* commit '0727a865d83b944c2fecc0bf1228a36976fe5300':
  Add network condition reporting.
2010-09-09 09:49:15 -07:00
Robert Greenwalt
d7085fcf65 Add network condition reporting.
Apps can report if they like their connection to the nets
and we display either not-really-connected or fully-connected
icons.  Final icons TBD.

bug:2978624
Change-Id: I28be52085edfe54571c0d4559aba0df883548654
2010-09-09 09:33:02 -07:00
Wink Saville
bb08caf54b Fix and simplify ConnectivityService singleton.
Change-Id: Idb74854db9d801c1cc138eb5ca866cf01940ff6d
2010-09-02 19:23:52 -07:00
Joe Onorato
00092874b1 Revert "Changed ConnectivityService#getServiceInstance so its a singleton."
This reverts commit 28961cc02f350ccd1770fb5af2f0d4c9793e4aec which causes this exception:

E/SystemServer( 2653): Failure starting Connectivity Service
E/SystemServer( 2653): java.lang.IllegalMonitorStateException: object not locked by thread before wait()
E/SystemServer( 2653):  at java.lang.Object.wait(Native Method)
E/SystemServer( 2653):  at java.lang.Object.wait(Object.java:358)
E/SystemServer( 2653):  at com.android.server.ConnectivityService$ConnectivityThread.getServiceInstance(ConnectivityService.java:186)
E/SystemServer( 2653):  at com.android.server.ConnectivityService.getInstance(ConnectivityService.java:200)
E/SystemServer( 2653):  at com.android.server.ServerThread.run(SystemServer.java:262)

Change-Id: Idd139e426e61a1913b0bf343e2f0a0b1990ba8bb
2010-09-01 21:18:22 -07:00
Robert Greenwalt
e90aa5e97e Add a default dns entry if none is provided
Fixes part of emulator which isn't telling us about dns servers.
Gets some stuff running, but browser is still broken.

bug:2961703
Change-Id: I53b946eba434aca1bb524c2acaf77922377948d1
2010-09-01 15:25:51 -07:00
Wink Saville
28961cc02f Changed ConnectivityService#getServiceInstance so its a singleton.
Change-Id: I27b5688a50917b01fb2fcd1c124da77ccae226b5
2010-09-01 14:48:29 -07:00
Robert Greenwalt
37e65ebb7e Rename NetworkProperties to LinkProperties
Also add copy constructors and use them when giving out data.

Change-Id: Id320eb8fb91d0bd250305ce7bb4f628570215615
2010-08-30 15:54:37 -07:00