Commit Graph

5593 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
24f1f0be3c Merge "Add additional SystemApi for NetworkStack" 2019-01-24 09:55:01 +00:00
lucaslin
b1e8e385dd Popup a notification after logging in the captive portal network
Captive portal app will be auto dismissed after user login the
captive portal network. In order to improve the user experience,
popup a notification to notify user that the captive portal
network is connected.

Bug: 113629026
Test: 1.atest FrameworksNetTests:NetworkNotificationManagerTest
      2.Connect to a captive portal network and login, check if
      there is a notification popup.

Change-Id: Id54d12268e107af2f213c2bb348c5f7908e880f4
2019-01-24 15:55:30 +08:00
Junyu Lai
81a501ea8d Merge changes from topic "ka05"
am: 455df13823

Change-Id: I2448348d1501ca50daac87f4c06c120b4de3b2ae
2019-01-23 21:24:06 -08:00
Junyu Lai
455df13823 Merge changes from topic "ka05"
* changes:
  [KA05] Export keepalive offload api for IpSec Nat-T file descriptor
  [KA01] export SocketKeepalive API for NAT-T keepalive
2019-01-24 05:06:39 +00:00
junyulai
d05a192fbe [KA05] Export keepalive offload api for IpSec Nat-T file descriptor
Adds system api of createSocketKeepalive to take file descriptor,
so privileged apps could use it without the need of IpSecService.

Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: If926c21704b6ed73a0adfcadad732b97b42bacae
2019-01-24 00:40:25 +08:00
Remi NGUYEN VAN
3bf01b0fbe Merge changes I1250730c,I7d00848c
am: 4bcdcfebd4

Change-Id: I2f19490a2340bdc2630162dfe9a277dffc5041fa
2019-01-23 08:26:33 -08:00
Lorenzo Colitti
0b27bd5aeb Merge "Stop depending on the ConnectivityService default request."
am: bb5952107d

Change-Id: Iae908cb959d50870923bce4dbe1bfed5f4c26c2c
2019-01-23 08:14:33 -08:00
Remi NGUYEN VAN
d9f75865cf Add additional SystemApi for NetworkStack
Members in this CL were missed in earlier changes.

Test: m
Bug: 112869080
Merged-In: I8b5b80ea7b267357eb0387d504a2f78358d6d502
Change-Id: I8b9b15f8b91962f3ef554fd222a825e471806c9e
2019-01-24 01:01:13 +09:00
junyulai
4c95b08a23 [KA01] export SocketKeepalive API for NAT-T keepalive
The new set of API replace the PacketKeepalive system API
which is only specific for IPsec NAT-T keepalive packet. Allows
applications to request different types of keepalives through
the same set of API.

By using keepalives, applications could request system to
periodically send specific packets on their behalf, using
hardware offload to save battery power.

This change would only address interface change and test part of
original functionality. After all reference of PacketKeepalive
are removed, another change would be submitted to remove old
API.

Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I3367666810acc44d5ad20e19acd4bf936e8b5d9c
2019-01-23 23:17:17 +08:00
Remi NGUYEN VAN
4bcdcfebd4 Merge changes I1250730c,I7d00848c
* changes:
  Create a wrapper for IpClient
  Move IpClient to NetworkStack
2019-01-23 15:05:00 +00:00
Lorenzo Colitti
bb5952107d Merge "Stop depending on the ConnectivityService default request." 2019-01-23 12:29:40 +00:00
Lorenzo Colitti
0d1aaee1dd Stop depending on the ConnectivityService default request.
This avoids the need to expose ConnectivityService implementation
details as @SystemApi and the complexities that would be required
to make NetworkCapabilities parcelable in stable AIDL.

Bug: 112869080
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Icd5d25b9b8e9b7a7d1899b000c92dc4976c3b3d7
2019-01-23 18:10:06 +09:00
Luke Huang
ee35d6a4f2 Merge changes from topic "Java async dns"
am: 6fd9d58242

Change-Id: Ia08a8300887315d673f398b1340b2f44ce501b14
2019-01-23 01:06:19 -08:00
Luke Huang
6fd9d58242 Merge changes from topic "Java async dns"
* changes:
  Add asynchronous DNS query API in Java
  Add jni method for DnsResolver
2019-01-23 08:48:23 +00:00
Remi NGUYEN VAN
290455ec58 Move IpClient to NetworkStack
Test: atest FrameworksNetTests NetworkStackTests
Bug: b/112869080
Change-Id: I7d00848c052382cd1b6ce458868bed6a1e9e8ec5
2019-01-23 16:44:21 +09:00
Remi NGUYEN VAN
edcf128bbc Merge "Add getAvoidBadWifi system API"
am: 1aa810b0f3

Change-Id: Ifdf913669df84df3e3b158d5527895236e6758b7
2019-01-22 17:41:46 -08:00
Remi NGUYEN VAN
1aa810b0f3 Merge "Add getAvoidBadWifi system API" 2019-01-23 01:13:01 +00:00
Chalard Jean
3b0efeaf61 Merge changes If71fadd2,I42047185
am: 2b428221cb

Change-Id: Ie15258f09adb7f1cc53c558e1d3d5fdaf8d93476
2019-01-22 15:12:54 -08:00
Chalard Jean
2b428221cb Merge changes If71fadd2,I42047185
* changes:
  [MS10] Address leftover comments on MS03 and MS07
  [MS09] Implement isSameNetwork.
2019-01-22 22:50:21 +00:00
Remi NGUYEN VAN
03ee99b190 Merge "Migrate ICaptivePortal to stable AIDL"
am: eb7c53718a

Change-Id: Id0844ec4d438dcc1f6c1028552dd21da6bd76584
2019-01-22 14:25:09 -08:00
Luke Huang
6d23e740f8 Add asynchronous DNS query API in Java
DnsResolver for asynchronous DNS querying
DnsPacket for parsing answer

Test: built, flashed, booted
      atest DnsResolverTest
      atest DnsPacketTest

Change-Id: Id014bc7387dd940cfaa270f68e7d4d85fab320a0
2019-01-23 00:07:43 +08:00
Luke Huang
4e5831aecc Add jni method for DnsResolver
Test: built, flashed, booted
      atest DnsResolverTest

Change-Id: Iff730ec918f4db1ba0216f90a12550fe26e271d0
2019-01-23 00:07:43 +08:00
Remi NGUYEN VAN
27de63e494 Add getAvoidBadWifi system API
This helps remove the dependency on MultinetworkPolicyTracker from
IpClient.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: If56791dbed564772f25a859f301b8b52d84e38a3
2019-01-22 15:57:34 +00:00
Remi NGUYEN VAN
44ed85862c Migrate ICaptivePortal to stable AIDL
Also add required API for the captive portal app to stop using hidden
members.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Merged-In: I62b457e709fa199822bb8f80b0eab990be4ded93
Change-Id: I62b457e709fa199822bb8f80b0eab990be4ded93
2019-01-23 00:53:13 +09:00
Pavel Grafov
d332a50c1f Merge "Add API for VPN apps to query always-on and lockdown."
am: 5e135e2bdc

Change-Id: Icb11cdd5c7384eacf1df9b7a0c42e451641f0e04
2019-01-22 07:00:53 -08:00
Pavel Grafov
5e135e2bdc Merge "Add API for VPN apps to query always-on and lockdown." 2019-01-22 14:43:06 +00:00
Remi NGUYEN VAN
d16b91fddd Merge "Add LinkProps and NetworkCaps methods to SystemApi"
am: 4bde11491b

Change-Id: I7ba317e49a6ad7a7413d9ff4e312aed0b700e695
2019-01-22 03:14:19 -08:00
Chalard Jean
7f8be9f6ca [MS09] Implement isSameNetwork.
Test: Old tests pass, new tests pass too.
Bug: 113554482

Change-Id: I420471853f3fab7725cba7ae500cebdce1912e43
2019-01-22 19:10:48 +09:00
Remi NGUYEN VAN
65599b3ca1 Merge "Add NetworkStack metrics to system API"
am: bda2c4fe17

Change-Id: I686e0ffb8d226d9245f1ef6c04bbc8d586c61e81
2019-01-22 00:09:31 -08:00
Remi NGUYEN VAN
109f8d5585 Add LinkProps and NetworkCaps methods to SystemApi
Added methods are used by the NetworkStack.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: I8822d43c1a4981ca39289525685b3f975fb0e8d5
2019-01-22 16:57:16 +09:00
Remi NGUYEN VAN
bda2c4fe17 Merge "Add NetworkStack metrics to system API" 2019-01-22 07:48:39 +00:00
Lorenzo Colitti
2244ef14a8 Merge "Properly expect all callbacks in testStackedLinkProperties."
am: 98dda351ac

Change-Id: Ida7b6da29e46856b504cc5b58afa78404a54cb4e
2019-01-21 22:41:16 -08:00
Lorenzo Colitti
98dda351ac Merge "Properly expect all callbacks in testStackedLinkProperties." 2019-01-22 06:31:23 +00:00
Remi NGUYEN VAN
50cf5400b6 Merge "Add NetworkMonitor constants to SystemApi"
am: a1e4e0bc23

Change-Id: Ic9591f31c6f2b7e613a78fa32311412952be26b8
2019-01-21 19:15:59 -08:00
Remi NGUYEN VAN
a1e4e0bc23 Merge "Add NetworkMonitor constants to SystemApi" 2019-01-22 03:03:37 +00:00
Lorenzo Colitti
4433025623 Properly expect all callbacks in testStackedLinkProperties.
Currently testStackedLinkProperties accounts for some of the
NetworkCallbacks that are fired, but not all of them. The test
passes because it only ever expects LinkProperties changed
callbacks (and not, e.g., lost callbacks), because it uses
waitForIdle(), and because at the end, when the callback is
unregistered, it does not call assertNoCallback().

Add the missing callback expectation and expect a LOST callback
at the end. Also add an assertNoCallback, even though it's not
strictly necessary. Remove all the waitForIdle statements, which
are no longer necessary because every assertion happens after
waiting for a callback.

Making the expectations more precise in a separate CL will help
ensure that upcoming changes to this code don't break anything,
and will make said changes easier to review.

Bug: 65674744
Test: atest FrameworksNetTests
Test: ConnectivityServiceTest#testStackedLinkProperties passes 400 times
Change-Id: I73cda0dd029a0e6546f7272beedf841ce5a4c0dc
2019-01-22 10:53:00 +09:00
Remi NGUYEN VAN
cbd795dff7 Merge "Add fields used by NetworkStack to the API"
am: aa983b7f1c

Change-Id: Iaf2dfea8263a1c7e78130222126e2ebbaa84fedd
2019-01-21 15:36:17 -08:00
Remi NGUYEN VAN
c8bf99d5d9 Add NetworkStack metrics to system API
Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: Ie52c55f248c173e2a5ee603ecd004fbac9004ac1
2019-01-21 23:24:41 +00:00
Remi NGUYEN VAN
aa983b7f1c Merge "Add fields used by NetworkStack to the API" 2019-01-21 23:20:26 +00:00
Chalard Jean
ae62bfc346 Merge changes I2ddfef0c,I49bee0c9
am: 1feafc2e2a

Change-Id: I54b43a6fe240d00d0e530a8777bdb9f452a2b539
2019-01-21 11:01:47 -08:00
Remi NGUYEN VAN
cfa31032d6 Merge "Add stable AIDL parcelables for IIpClient API"
am: 2fd1c3864e

Change-Id: Id3e39ed932161941f953c2f38d1ce9ed0afcc785
2019-01-21 10:56:19 -08:00
Remi NGUYEN VAN
85b9665073 Add fields used by NetworkStack to the API
Test: m
Bug: 112869080
Change-Id: I59f6d5ae8a601b7496548b87f137a577f2365a37
2019-01-21 23:03:25 +09:00
Pavel Grafov
e87b7ceaa6 Add API for VPN apps to query always-on and lockdown.
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Bug: 72628179
Change-Id: I73cb0888f7049b12ab0cdfa62678c3846e074d3b
2019-01-21 13:48:45 +00:00
Remi NGUYEN VAN
70ab67f1ce Add NetworkMonitor constants to SystemApi
NetworkMonitor lives in the NetworkStack which must only use system
APIs. This includes constants used by NetworkMonitor and captive portal
login.

Bug: 112869080
Test: m
Merged-In: I8b5f0bb61c3ef0d2f33af7dd67b72ac6c5a1d1b5
Change-Id: I4879568d3fbf9435767c8d4d0ab5198d421a2f4f
2019-01-21 21:11:15 +09:00
Chalard Jean
1feafc2e2a Merge changes I2ddfef0c,I49bee0c9
* changes:
  [MS08] Read back attributes and blobs.
  [MS07] Implement storeNetworkAttributes and storeBlob.
2019-01-21 09:34:41 +00:00
Remi NGUYEN VAN
2fd1c3864e Merge "Add stable AIDL parcelables for IIpClient API" 2019-01-21 08:01:26 +00:00
Chalard Jean
b8997229ad [MS08] Read back attributes and blobs.
Test: New tests in IpMemoryStore
Bug: 113554482

Change-Id: I2ddfef0c2ed37459c038f75d1dfc92fdefbf58f5
2019-01-21 15:21:09 +09:00
Junyu Lai
e2c006f40b Merge "Remove dead KeepaliveInfo if it cannot be started"
am: 8e1e64f928

Change-Id: I7ec41627065d21d025370905257483738ee04c42
2019-01-20 20:09:51 -08:00
Remi NGUYEN VAN
699aefeb81 Add stable AIDL parcelables for IIpClient API
Test: atest FrameworksNetTests NetworkStackTests
Bug: b/112869080
Change-Id: Ia4ac1eb482850a06c4dc1b6c1fe55d33d4087388
2019-01-21 12:54:24 +09:00
Junyu Lai
8e1e64f928 Merge "Remove dead KeepaliveInfo if it cannot be started" 2019-01-21 03:48:15 +00:00