Commit Graph

2120 Commits

Author SHA1 Message Date
Paul Jensen
16c60d66db am f58e1dd3: am 4a451de0: am a43bca83: Merge "Don\'t send spurious onAvailable NetworkCallbacks when rematching" into mnc-dev
* commit 'f58e1dd34c5bca555673b08c0f3490c0328ba07a':
  Don't send spurious onAvailable NetworkCallbacks when rematching
2015-06-20 05:43:45 +00:00
Paul Jensen
a43bca8377 Merge "Don't send spurious onAvailable NetworkCallbacks when rematching" into mnc-dev 2015-06-20 01:12:20 +00:00
Paul Jensen
65a1adba2f Don't send spurious onAvailable NetworkCallbacks when rematching
Bug:21762680
Change-Id: Ia701045dffc666fe75fba0e1771872147e37179a
2015-06-19 00:06:57 +00:00
Erik Kline
6dbe7e6c98 am 0b8b1872: am 157cccef: am 3d54e672: Merge "Carefully select which DNS servers to send to netd" into mnc-dev
* commit '0b8b18721503d84104e1d6aaf69993f3b532a9fc':
  Carefully select which DNS servers to send to netd
2015-06-18 06:56:23 +00:00
Erik Kline
0f0dbb8222 Carefully select which DNS servers to send to netd
Select only DNS servers that:
    - are reachable, according to routes in the LinkProperties, AND

    - have a "suitable" source address in the LinkProperites, meaning:
        - IPv4 DNS server:
            - only if LinkProperties has any IPv4 address
        - IPv6 link-local DNS server:
            - only if the server has a scopeId set
            - assume for now that LinkProperties has a suitable
              link-local address
        - IPv6 non-link-local DNS server:
            - only if LinkProperties has a global, preferred IPv6 address

Bug: 19470192
Bug: 20733156
Change-Id: Ibd95f3f7b33a4fb6c36d1cea4adb63c99068f657
2015-06-18 14:50:21 +09:00
Paul Jensen
9facc78f66 am 79cd02c4: am 8235c839: am 278bc590: Merge "Remove dead hidden ConnectivityManager and NetworkInfo APIs." into mnc-dev
* commit '79cd02c4b0ada6eff5979f0cd39f3799606ba9bb':
  Remove dead hidden ConnectivityManager and NetworkInfo APIs.
2015-06-16 22:03:06 +00:00
Paul Jensen
278bc59082 Merge "Remove dead hidden ConnectivityManager and NetworkInfo APIs." into mnc-dev 2015-06-16 11:30:51 +00:00
Erik Kline
fdfd66c062 am 47585f46: am a01b9e6f: am e1ee8c66: Merge "Add a test that Network#getNetworkHandle() behaves sanely." into mnc-dev
* commit '47585f462a9cde661169b16cea870c05e91d92f8':
  Add a test that Network#getNetworkHandle() behaves sanely.
2015-06-16 04:17:27 +00:00
Erik Kline
e1ee8c665f Merge "Add a test that Network#getNetworkHandle() behaves sanely." into mnc-dev 2015-06-16 03:43:56 +00:00
Paul Jensen
c6b3de1e4a Remove dead hidden ConnectivityManager and NetworkInfo APIs.
- There are no callers of
  NetworkInfo.setIsConnectedToProvisioningNetwork(), so remove all the
  code that deals with mIsConnectedToProvisioningNetwork being true,
  including the two ConnectiviyManager APIs.
- There are no callers of
  ConnectivityManager.getMobileRedirectedProvisioningUrl(), so remove
  the code that reads this URL.
- There are no callers of
  ConnectivityManager.captivePortalCheckCompleted(), so remove this
  API which is currently a no-op.

Change-Id: Ifa44c7553c7c45ebe261a2a124d9bf8d6f96c690
2015-06-16 02:07:36 +00:00
Paul Jensen
bad054a7bc am b379fdd0: am 49ab026a: am 5cc59014: Merge "Remove most sleep() calls from ConnectivityServiceTest" into mnc-dev
* commit 'b379fdd0e9fa560e0abfe771acf920bb6aca60ad':
  Remove most sleep() calls from ConnectivityServiceTest
2015-06-15 14:11:20 +00:00
Paul Jensen
5cc5901463 Merge "Remove most sleep() calls from ConnectivityServiceTest" into mnc-dev 2015-06-15 13:35:48 +00:00
Erik Kline
cc00792876 Add a test that Network#getNetworkHandle() behaves sanely.
Additionally:
    - make zero more obvious for debugging, rather than emitting
      some inscrutable magic value.

Bug: 19537384
Change-Id: Iac9a3297a0dda1ba3d69fd01cf6de81f01fd837e
2015-06-15 15:18:38 +09:00
Chris Wren
197908c00c am 604f6cf1: am 63cae6c8: am 17de4b2a: Merge "remove usage of deprecated method setLatestEventInfo" into mnc-dev
* commit '604f6cf11307f1be19fad05c40482fd792ab3162':
  remove usage of deprecated method setLatestEventInfo
2015-06-12 20:05:49 +00:00
Paul Jensen
f98df17f98 Remove most sleep() calls from ConnectivityServiceTest
Change-Id: I90d2f6811ed1cb84614101200ac377e920bd864a
2015-06-12 10:31:09 -04:00
Chris Wren
cb43350ffd remove usage of deprecated method setLatestEventInfo
Bug: 18510449
Change-Id: I56a77991c729990e501f402e007dfa79ee57621e
2015-06-12 10:16:04 -04:00
Robert Greenwalt
6e032ecb6f am c2a3f75f: am 1ec7d05e: am ddb3d3aa: Merge "Remove network requests properly." into mnc-dev
* commit 'c2a3f75fb60a4a720f07791cfe0730f42cd8eb80':
  Remove network requests properly.
2015-06-11 05:55:20 +00:00
Robert Greenwalt
ddb3d3aacc Merge "Remove network requests properly." into mnc-dev 2015-06-11 02:19:17 +00:00
Robert Greenwalt
8d2cfc2253 Remove network requests properly.
We used to only remove requests that we'd acted on but that's
just wrong.

Also adds test case which exposed the problem but passes with the fix.

bug:20731384
Change-Id: I581a005560cc71167b857abf2452769399a9e1b7
2015-06-10 14:44:34 -07:00
Paul Jensen
29db31b5d3 am c05c31a4: am 0fac11a8: am 69f4bb15: Merge "Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs" into mnc-dev
* commit 'c05c31a4c684f15bacd1908737bf8148d0e6adb3':
  Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs
2015-06-10 18:42:59 +00:00
Paul Jensen
69f4bb15a9 Merge "Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs" into mnc-dev 2015-06-10 17:59:54 +00:00
Lorenzo Colitti
2157940561 am bb2f798a: am 1f91eed0: am ccd85f3e: Merge "When no Internet access is detected, display a notification first." into mnc-dev
* commit 'bb2f798ae19cb7ef928274972ca9ad6c2c2c7eff':
  When no Internet access is detected, display a notification first.
2015-06-10 17:13:22 +00:00
Paul Jensen
bd2f32f60b Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs
Overlapping the NetIDs can cause the ConnectivityService instance under test
to inadvertently use real networks, for example when NetworkMonitor attempts
to validate a network.  This fixes test hangs when run on devices with
active internet connections.

Change-Id: I5e1898953f0117b9f75beccac4a52ae2db173567
2015-06-10 11:30:26 -04:00
Lorenzo Colitti
ccd85f3e29 Merge "When no Internet access is detected, display a notification first." into mnc-dev 2015-06-10 15:25:31 +00:00
Lorenzo Colitti
74baf41e0f When no Internet access is detected, display a notification first.
Previously, we displayed a dialog on top of whatever the user was
doing. Instead, display a notification that can take the user to
the dialog.

Because the notification is less intrusive, also enable it even
if the network without Internet access is already the system
default network. Previously we did not do this because in that
case the user might not have other useful options, and thus a
dialog would have been too intrusive.

Bug: 20081183
Bug: 20538448
Change-Id: I677be238d675c13a13dc0bae2dbb37cbe4f52cb6
2015-06-10 23:37:00 +09:00
Erik Kline
042d4af72b am baad4077: am 69b0dcab: am 85a69cd4: Merge "initial revision of NetworkDiagnostics" into mnc-dev
* commit 'baad4077955905933b9b5a8cdd6e82349cc68c96':
  initial revision of NetworkDiagnostics
2015-06-10 00:00:10 +00:00
Robin Lee
50c54c9921 am e26ae30e: am 9e46757d: am 54d152cd: Merge "Switch over to updated VPN warning strings" into mnc-dev
* commit 'e26ae30eeedd8145a021697e9b7e18bb740537c7':
  Switch over to updated VPN warning strings
2015-06-09 23:40:57 +00:00
Erik Kline
85a69cd4a6 Merge "initial revision of NetworkDiagnostics" into mnc-dev 2015-06-09 23:23:03 +00:00
Robin Lee
54d152cd12 Merge "Switch over to updated VPN warning strings" into mnc-dev 2015-06-09 23:13:38 +00:00
Robin Lee
06c0fff375 Switch over to updated VPN warning strings
These are more consistent and have placeholders for the description of
whatever VPN apps are actually active.

Bug: 20516964
Bug: 17474682
Change-Id: I37ff287b795f10bbbb192540f09f8100bb27b1a0
2015-06-09 12:04:23 -07:00
Erik Kline
9647f3807b initial revision of NetworkDiagnostics
Bug: 21449922
Change-Id: I6a66cfa98601d6ccfe38ff840b0dd49ed1538a41
2015-06-09 23:37:58 +09:00
Erik Kline
187415ae7c am b3cc45a1: am b99a1ac6: am 1162744f: Merge "Make public Network#bindSocket(FileDescriptor)." into mnc-dev
* commit 'b3cc45a1f53a6a88a736004c553ce417596bb440':
  Make public Network#bindSocket(FileDescriptor).
2015-06-09 13:17:03 +00:00
Erik Kline
94fd615d1f Make public Network#bindSocket(FileDescriptor).
Code that uses android.system.Os to create sockets as FileDescriptors
should be able to bind them to networks.  Note that FileDescriptors
could already be marked as "protected from VPNs" via
NetworkUtils#protectFromVpn(), but heretofore were not easily bound
to any particular network.

Bug: 21449922
Change-Id: I4bb86db5d95d5a55bb2d7e245848d11eaa351e65
2015-06-09 16:19:24 +09:00
Lorenzo Colitti
2fefcbb64d am 0172266b: am 1ad2c080: am 50e55480: Merge "Remove "returning Blocked NetworkInfo" logspam." into mnc-dev
* commit '0172266ba772c4b00f96bf40bf18cf245e35d8bc':
  Remove "returning Blocked NetworkInfo" logspam.
2015-06-05 09:37:42 +00:00
Lorenzo Colitti
50e554808b Merge "Remove "returning Blocked NetworkInfo" logspam." into mnc-dev 2015-06-05 07:50:44 +00:00
Lorenzo Colitti
f71cce4fb9 Remove "returning Blocked NetworkInfo" logspam.
Bug: 20006730
Change-Id: I2061127e3c7283c0a4899940d3fc224ca114f754
2015-06-05 10:58:17 +09:00
Feixiong Zhang
9531266775 am c58d411c: am bd9e049a: am 20ed3f97: Merge "Fix the empty reason field in connectivity change intent." into mnc-dev
* commit 'c58d411c379718231786cf7b3f3238aebd1ba8b5':
  Fix the empty reason field in connectivity change intent.
2015-06-04 20:38:52 +00:00
Feixiong Zhang
20ed3f9768 Merge "Fix the empty reason field in connectivity change intent." into mnc-dev 2015-06-04 18:54:49 +00:00
Feixiong Zhang
1f7f908de3 Fix the empty reason field in connectivity change intent.
The code set it to null instead of info.getReason.

Change-Id: I1b26ad040c23da7080dbfaeb5376181998115805
2015-06-04 11:38:41 -07:00
Paul Jensen
270e8d3d20 am 8d0f3976: am bc292eea: am c5e1878d: Merge "Revive ConnectivityServiceTest and add some tests." into mnc-dev
* commit '8d0f3976a4a571c2e495c01a6334c99781817214':
  Revive ConnectivityServiceTest and add some tests.
2015-06-04 13:45:36 +00:00
Paul Jensen
c5e1878d96 Merge "Revive ConnectivityServiceTest and add some tests." into mnc-dev 2015-06-04 13:11:34 +00:00
Paul Jensen
bb910e9bcd Revive ConnectivityServiceTest and add some tests.
Change-Id: I44740a7b21cff18ac2a67d09c4d0e597add19ee0
2015-06-04 09:09:36 -04:00
Lorenzo Colitti
2e5c4ee2ca am 9d68fe46: am 74c720c9: am a267d9c1: Merge "Disable mDefaultDns to see if we can remove it." into mnc-dev
* commit '9d68fe46504ac2521fbcc8ad5e5d7e74dbffd89c':
  Disable mDefaultDns to see if we can remove it.
2015-06-04 06:06:26 +00:00
Lorenzo Colitti
a267d9c1f9 Merge "Disable mDefaultDns to see if we can remove it." into mnc-dev 2015-06-04 05:31:59 +00:00
Erik Kline
e979fc9e4c am e0002169: am 6ac63c7d: am 7cbc907b: Delete unsed mDnsLock.
* commit 'e0002169bda4a74e654852885d1b1ba3a4e39f47':
  Delete unsed mDnsLock.
2015-06-03 19:23:06 +00:00
Lorenzo Colitti
aacd8eacce am e3a96451: am d315f373: am 0326f777: Merge changes I9b96cdcf,Ib4b29a7f into mnc-dev
* commit 'e3a9645108fdbacfb0e0292aacb1e146efc215a3':
  Remove the IPv4 address from the interface when DHCP fails.
  Make the dumpsys connectivity shorter and easier to read.
2015-06-03 19:22:55 +00:00
Erik Kline
7cbc907b61 Delete unsed mDnsLock.
Bug: 21449922
Change-Id: I0c9f95c30eaa170d809e86f6505379f34a0a7603
2015-06-03 16:10:08 +09:00
Lorenzo Colitti
3b1ad969cf Make the dumpsys connectivity shorter and easier to read.
- Print NetworkFactories on one line.
- Only print LegacyTypeTracker networks if they are connected,
  and record supported network types on a separate summary line.
- Print all tethering upstreams on one line.
- Summarize the state of the transition wakelock on one line.
- Don't print Inet condition reports if there are none.
  (Currently there can never be any.)

Bug: 21449922
Change-Id: Ib4b29a7fd882e6c105839a255fffecf4f346cf7e
2015-06-03 11:29:41 +09:00
Stuart Scott
c265f34fa0 am c96a66dd: am 378c2cbf: am d198fe19: Network Reset should have a lockdown like Factory Reset.
* commit 'c96a66dd03b7928e0945dc7ff0ce961d7091fc7d':
  Network Reset should have a lockdown like Factory Reset.
2015-06-01 19:04:44 +00:00
Stuart Scott
d198fe197b Network Reset should have a lockdown like Factory Reset.
bug:20332322
Change-Id: I7c61a011d11e89513757f112abf320bb2a785edb
(cherry picked from commit 94b038bbb291431a7b39611d72f206b07e839891)
2015-06-01 16:31:00 +00:00