Commit Graph

8168 Commits

Author SHA1 Message Date
Chalard Jean
a5b0d0bbab Merge changes I0613c23f,Ibeab8d0a,I8bd668ad,I7d3a16be am: a1a975e149 am: 0d6211b065
am: fece8eceef

Change-Id: I4540ad08fbb1ccabf0a19f73bc36611194ef8bfa
2019-12-01 21:37:03 -08:00
Chalard Jean
fece8eceef Merge changes I0613c23f,Ibeab8d0a,I8bd668ad,I7d3a16be am: a1a975e149
am: 0d6211b065

Change-Id: Idca7b76f4e638aaa88ededcbfc890492152211e9
2019-12-01 21:32:55 -08:00
Chalard Jean
0d6211b065 Merge changes I0613c23f,Ibeab8d0a,I8bd668ad,I7d3a16be
am: a1a975e149

Change-Id: Ibe34e78e53a15e987042703fdd27d6393e4e7d59
2019-12-01 21:26:44 -08:00
Chalard Jean
a1a975e149 Merge changes I0613c23f,Ibeab8d0a,I8bd668ad,I7d3a16be
* changes:
  [NS A14] Move code notifying battery stats in its right place
  [NS A13] Move legacy broadcast handling after rematch.
  [NS A12] Move some legacy type tracker handling to a function
  Add tests for ConnectivityService → BatteryStats messages
2019-12-02 05:17:39 +00:00
Chalard Jean
7807fa2b7f [NS A17] Update linger state after rematching.
Test: FrameworksNetTests NetworkStackTests
Change-Id: I720a1feb89088aa123201ef5867de444234343e8
2019-12-02 13:02:41 +09:00
Chalard Jean
f034453cce [NS A16] Cleanup
Move LegacyTypeTracker work into a function for readability.

Test: FrameworksNetTests NetworkStackTests
Change-Id: I9539b8cc4422b3a0cc1d3d9b3a44d59dc1905b44
2019-12-02 13:02:41 +09:00
Chalard Jean
b9d9405225 [NS A15] Move legacy default broadcasts out of the loop
Test: FrameworksNetTests NetworkStackTests
Change-Id: Ib79b777b5efda3a4c85c30055f1a6d03d5d04c25
2019-12-02 13:02:41 +09:00
Chalard Jean
9589e72241 [NS A14] Move code notifying battery stats in its right place
This should be done once every time an interface comes online.
Doing this in updateLinkProperties guarantees this happens every
time a new interface comes online, but it doesn't do it more
often than needed.

Test: FrameworksNetTests NetworkStackTests
Change-Id: I0613c23f44192944266d76107308da8d1c541d1c
2019-12-02 13:02:38 +09:00
Chalard Jean
d8d95a5865 Merge "Give apps access to the NAT64 prefix." am: 3391fbb6a2 am: 6a96b757df
am: 151d65dab6

Change-Id: I759e5da8648fd10b26aa235410ee6e22e1976a9b
2019-12-01 18:33:11 -08:00
Chalard Jean
151d65dab6 Merge "Give apps access to the NAT64 prefix." am: 3391fbb6a2
am: 6a96b757df

Change-Id: I251c5ac17fb728d6f0fe91fd96c115c8b8d1879c
2019-12-01 18:27:36 -08:00
Chalard Jean
6a96b757df Merge "Give apps access to the NAT64 prefix."
am: 3391fbb6a2

Change-Id: I673a44f3f75a2395ae3d9d436c83708f20f414e6
2019-12-01 18:20:00 -08:00
Treehugger Robot
3391fbb6a2 Merge "Give apps access to the NAT64 prefix." 2019-12-02 02:05:16 +00:00
Mark Chien
388b441848 [automerger skipped] Merge changes from topic "tether_migrate" am: 783ba3e0bd am: 3d076f29b7
am: ec489e4870 -s ours
am skip reason: change_id I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1 with SHA1 1ddfba4a60 is in history

Change-Id: I630b00c69238730fe5aa267a658f93edb236acc6
2019-11-30 04:36:38 -08:00
markchien
bbf85776e8 [automerger skipped] [Tether07] Migrate Tethering into module am: 5e86665079 am: bd4a462076
am: 7c525e9907 -s ours
am skip reason: change_id I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3 with SHA1 c70070914f is in history

Change-Id: Ie6a28a142e2cf75adfc3d1a45d87e9daa67423e4
2019-11-30 04:36:30 -08:00
Mark Chien
ec489e4870 Merge changes from topic "tether_migrate" am: 783ba3e0bd
am: 3d076f29b7

Change-Id: Ice864e02b2ef9da73f5a69e0668b6856e718988f
2019-11-30 04:31:35 -08:00
markchien
7c525e9907 [Tether07] Migrate Tethering into module am: 5e86665079
am: bd4a462076

Change-Id: I6e71b418b7303d37144532ab056c21ccbefcb554
2019-11-30 04:31:28 -08:00
Mark Chien
3d076f29b7 Merge changes from topic "tether_migrate"
am: 783ba3e0bd

Change-Id: I03e43b7a112f91637941e5193bd21b3e714f5dac
2019-11-30 04:26:07 -08:00
markchien
bd4a462076 [Tether07] Migrate Tethering into module
am: 5e86665079

Change-Id: I1aaa034e91eae2d6e9abcbbd70741a54a18b3ddc
2019-11-30 04:25:57 -08:00
Mark Chien
783ba3e0bd Merge changes from topic "tether_migrate"
* changes:
  [Tether10]Remove UserManagerInternal usage in Tethering
  [Tether07] Migrate Tethering into module
  [Tether07] Clean up build rule for libtetheroffloadjni
2019-11-30 12:17:47 +00:00
Chalard Jean
7aa4400722 Give apps access to the NAT64 prefix.
Apps that do their own DNS queries need to know the NAT64 prefix
to resolve v4 addresses on v6-only networks.

Test: FrameworksNetTests NetworkStackTests
Bug: 144877069
Change-Id: I5a255b7afc2038646b93a0ab893f8ad62d0fb34f
2019-11-30 10:25:02 +00:00
markchien
5e86665079 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
TreeHugger Robot
af72e1415f Merge changes from topic "tethering-migrate"
* changes:
  [Tether10]Remove UserManagerInternal usage in Tethering
  [Tether07] Migrate Tethering into module
  [Tether07] Clean up build rule for libtetheroffloadjni
2019-11-29 17:05:14 +00:00
Chalard Jean
f01b2efc13 [NS A13] Move legacy broadcast handling after rematch.
As opposed to other patches in this series, there is a logic change
here. This will send all necessary legacy broadcasts after all
matches have been done.

This should be fine because the callbacks and the broadcasts are
unordered anyway, and the broadcasts are still sent in the same
order as before ; there should not be an observable change from
apps besides some jitter.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: Ibeab8d0a9106c5198228888ac33084238c0a4a1a
2019-11-29 16:59:31 +09:00
Chalard Jean
61c79256b1 [NS A12] Move some legacy type tracker handling to a function
It's fine to do this out of the if() clause because :
• If the network newly satisfies a request it is sure to have
  it in the list of requests it satisfies
• If it does not newly satisfy a request and there is still
  a request with a legacy type that it satisfies, then it
  is already remembered by LegacyTypeTracker

As for the VPN, the code always enters the condition anyway.

Test: ConnectivityServiceTest
Change-Id: I8bd668ad27043d6a5036b1b3c52fa5a3146abcfa
2019-11-29 16:59:31 +09:00
Chalard Jean
0a2a20054d Add tests for ConnectivityService → BatteryStats messages
Test: ConnectivityServiceTest
Bug: 113554781
Change-Id: I7d3a16be76f606872f8edb84647b9ef94f36cba1
2019-11-29 16:59:30 +09:00
markchien
c70070914f [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-29 07:05:21 +00:00
Edward Savage-Jones
d472369791 Add NETWORK_AIRPLANE_MODE permission
Add a permission to allow airplane mode to
be toggled without holding the NETWORK_SETTINGS
(or similar) permission.

Bug: 141621384
Bug: 145164696
Test: TODO
Change-Id: Iebe2f501fdd802d54fd3345ac2fb0a8c129faf71
2019-11-28 21:13:50 +09:00
Aaron Huang
a717c87e3b Merge "Add IpConfiguration parcelable interface implementation to system API" am: 2193b07c21 am: fda119df8e
am: 2dbf6f50f3

Change-Id: I9add4992fbacca4668867abc7a218256805d1bfc
2019-11-28 02:19:08 -08:00
Aaron Huang
2dbf6f50f3 Merge "Add IpConfiguration parcelable interface implementation to system API" am: 2193b07c21
am: fda119df8e

Change-Id: Ic5b8e360cb33cdd18f32a4d2c17beb996584ebda
2019-11-28 02:14:56 -08:00
Aaron Huang
fda119df8e Merge "Add IpConfiguration parcelable interface implementation to system API"
am: 2193b07c21

Change-Id: I3ead12ee9162c16f8f5937cfc74f38071cef41c9
2019-11-28 02:09:43 -08:00
Aaron Huang
2193b07c21 Merge "Add IpConfiguration parcelable interface implementation to system API" 2019-11-28 09:56:58 +00:00
Aaron Huang
4c1dd06339 Add IpConfiguration parcelable interface implementation to system API
API lint robot warnings that parcelable requires writeToParcel
and describeContents.

Bug: 139268426
Bug: 135998869
Test: atest android.net.cts
      atest android.net.wifi.cts
      atest FrameworksNetTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I7acf000c468788c3fdcb47f8601762e7804ab940
2019-11-28 07:25:40 +00:00
Hugo Benichi
3d23d352ca Merge "BitUtils: support packing/unpacking negative long values" am: cd46b46d51 am: c9b854f5be
am: af06575aef

Change-Id: Iaa8c4084f0754781ea3e6a0a9202d9e102d5f074
2019-11-27 07:58:33 -08:00
Hugo Benichi
af06575aef Merge "BitUtils: support packing/unpacking negative long values" am: cd46b46d51
am: c9b854f5be

Change-Id: If85ad67169295e8725d654966c4d0f42439f10c4
2019-11-27 07:52:49 -08:00
Hugo Benichi
c9b854f5be Merge "BitUtils: support packing/unpacking negative long values"
am: cd46b46d51

Change-Id: Ibd0c4756fb0f888a506111bb2f33c60debe33d57
2019-11-27 07:46:56 -08:00
Treehugger Robot
cd46b46d51 Merge "BitUtils: support packing/unpacking negative long values" 2019-11-27 15:34:46 +00:00
Hugo Benichi
31270734a2 BitUtils: support packing/unpacking negative long values
Bug: None
Test: Compiled. New unit tests.
Change-Id: Ia543285e206b0bbc7d64458da10e68a951f9eec1
2019-11-27 11:00:32 +09:00
Chiachang Wang
ac0bc78aed Merge "Refactor based on new NetworkMonitor" am: 4a41fe8072 am: 02bec631c5
am: 4a30d55644

Change-Id: I7b5bb41d2e5d99a81565506a4274a38156e3afc2
2019-11-26 04:15:47 -08:00
Chiachang Wang
4a30d55644 Merge "Refactor based on new NetworkMonitor" am: 4a41fe8072
am: 02bec631c5

Change-Id: I631487e6ccc500dd921ec04fa82713f35523dce8
2019-11-26 04:10:13 -08:00
Chiachang Wang
02bec631c5 Merge "Refactor based on new NetworkMonitor"
am: 4a41fe8072

Change-Id: I6f2f42dee11b2ee3db9e52817cd7aa871539aaed
2019-11-26 04:03:47 -08:00
Chiachang Wang
4a41fe8072 Merge "Refactor based on new NetworkMonitor" 2019-11-26 10:52:33 +00:00
Chiachang Wang
bfb1ab4b02 Refactor based on new NetworkMonitor
Bug: 130325409
Test: atest NetworkStackIntegrationTests
Change-Id: I4426be339cb9990c05b3f4fb5666bd70bcd0f78e
2019-11-26 09:10:45 +08:00
Chalard Jean
646171fe03 Merge "[NS A11] Small refactor" am: a8e2afde61 am: 22391f5092
am: 758e340c84

Change-Id: I9130f7d348b53333188de759fb9529b74be63323
2019-11-25 10:38:23 -08:00
Paul Hu
f988293d3c Merge "Fix hasUseBackgroundNetworksPermission issue." am: 0a6f03873a am: d47085c444
am: 36872f15f5

Change-Id: I8a1575dedd6e3b7a8b60ee2ffd475d790aec55c4
2019-11-25 10:35:55 -08:00
Lucas Lin
b0450caf3f Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" am: fc8c834040 am: 22ba258b99
am: 61fcd4126f

Change-Id: I9539e73842040e3a38a64c4b4863adfe32c893e9
2019-11-25 10:33:04 -08:00
paulhu
ace8807b44 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" am: 5d6da8de07 am: 9717a198bb
am: 97e1cdb105

Change-Id: I0d50f6bccc9fb18a54865b45a7e8d1eaff01ea9e
2019-11-25 08:23:23 -08:00
Chalard Jean
6aaf2bc277 Merge changes I195d894e,I7069c111 am: 3d59a27d1c am: cc64d36d32
am: 6e40e5fa0b

Change-Id: I3a8926f3b444f19b6db200c361ce348da25dbcb8
2019-11-25 07:20:17 -08:00
Aaron Huang
402cea9bfd Merge "Expose IpConfiguration and ProxyInfo APIs" am: c2df0b68c4 am: 10481a8f5f
am: d91e5a5ccb

Change-Id: Iebd6cdd25f61a2255f1e17984bafda4c79a7d518
2019-11-25 07:16:49 -08:00
Chalard Jean
758e340c84 Merge "[NS A11] Small refactor" am: a8e2afde61
am: 22391f5092

Change-Id: Ib593282845cca1bbd3a2b36a2049914fc73cbbd1
2019-11-25 06:22:26 -08:00
Paul Hu
36872f15f5 Merge "Fix hasUseBackgroundNetworksPermission issue." am: 0a6f03873a
am: d47085c444

Change-Id: I8b03c9e23ffc9ff46264d6307fb841a7eda76a76
2019-11-25 06:18:10 -08:00