Commit Graph

7602 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
2812b46691 Merge "Add NetworkRequest#satisfiedBy to SystemApi" 2020-01-21 14:12:27 +00:00
Chalard Jean
62edfd8779 [NS A25] Send all listen callbacks after all rematches
Reupload of I2db9535b1d72edd46b968b1bae66b148aa815235 with a
bugfix.

Bug: 113554781
Test: ConnectivityServiceTests NetworkStackTests
Change-Id: I904d87c01d9422ba6233d22a189e8017dd298d37
2020-01-21 19:06:04 +09:00
Chalard Jean
9fc27eab94 [NS A24] Add an object to represent changes in assignment
Reupload of I703db6d3f039bd67a90fad0eadffc6cfed9a50ee

Test: ConnectivityServiceTest
Change-Id: I9ef468a17ebcfa684e5614b25dc06fc67eb71c79
2020-01-21 19:05:48 +09:00
Remi NGUYEN VAN
3b74d613e0 Merge "Remove handling of EVENT_UNFULFILLABLE_REQUEST" 2020-01-21 05:52:05 +00:00
Remi NGUYEN VAN
59917caa0e Add NetworkRequest#satisfiedBy to SystemApi
The API is useful for NetworkFactories to select requests based on
capabilities.
This mirrors NetworkCapabilities#satisfiedByNetworkCapabilities

Test: m
Bug: 138306002
Merged-In: I1d4a928256951397cabde5c352a872fd48d85859
Change-Id: I1d4a928256951397cabde5c352a872fd48d85859
(clean cherry-pick from internal branch)
2020-01-21 12:11:52 +09:00
Remi NGUYEN VAN
82b5bb6d4f Remove handling of EVENT_UNFULFILLABLE_REQUEST
This message is not being sent by any component anymore.

Test: built, flashed, WiFi and telephony working
Test: atest FrameworksNetTests
Bug: 138306002
Merged-In: I5b1ec3136ae8a0a6928e0fb2cda3d5f5e2ca657f
Change-Id: I5b1ec3136ae8a0a6928e0fb2cda3d5f5e2ca657f
(clean cherry-pick from internal branch)
2020-01-21 12:10:34 +09:00
Chalard Jean
f78c964538 Have registerNetworkAgent return a Network.
This is more useful.

Bug: 135998869
Test: FrameworkNetTests FrameworksWifiTests
Change-Id: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669
Merged-In: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669
2020-01-20 16:22:06 +08:00
Rambo Wang
b2ff467a3a Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer" 2020-01-15 17:45:58 +00:00
Treehugger Robot
7916449753 Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi" 2020-01-15 11:42:11 +00:00
paulhu
e102b0bb49 Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests

Change-Id: I77cb45e6b2aaf4ab2c457cb59ccf77b1b8c01fa9
2020-01-15 15:38:23 +08:00
Mark Chien
a64019915e Merge "Unhide NetworkRequest API which use legacy type" 2020-01-15 06:49:33 +00:00
Treehugger Robot
4ed1963c4a Merge "Expose SocketKeepalive#SUCCESS as SystemApi" 2020-01-15 05:01:04 +00:00
paulhu
2f7c345d56 Expose SocketKeepalive#SUCCESS as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests
Change-Id: I94171b2dc4f26442df918547bf8bc40953f63f2e
Merged-In: I94171b2dc4f26442df918547bf8bc40953f63f2e
2020-01-15 02:45:43 +00:00
Rambo Wang
582ba554de Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer
StringNetworkSpecifier is widely used to specify subscription id for
the NetworkRequest. The raw string field introduce ambiguity and leave
large space for bugs. With TelephonyNetworkSpecifer, we are able to
settle down the type and value of the fields (although currently only
one) and introduce validation to detect the bug in the beginning.

Bug: 145993724
Test: atest FrameworksNetTests FrameworksTelephonyTests &
      make offline-sdk-docs
Change-Id: Iefbad9b1deb3de2c0b262d9ce5ae0704a50d08a6
2020-01-14 10:51:11 -08:00
Aaron Huang
9fef5a5cf0 Merge "Make NattKeepalivePacketData @SystemApi" 2020-01-14 14:36:09 +00:00
Lorenzo Colitti
baf25cde90 Merge "Expose ConnectivityManager#TYPE_NONE as SystemApi" 2020-01-14 05:30:14 +00:00
markchien
d6eeffd079 Unhide NetworkRequest API which use legacy type
Bug: 144753389
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I349da06769e9ffcee6bb42f51ab454e0ef774fb3
Merged-In: I349da06769e9ffcee6bb42f51ab454e0ef774fb3
2020-01-14 04:56:54 +00:00
paulhu
74357e70a8 Expose ConnectivityManager#TYPE_NONE as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests
Change-Id: Ia496aaeaf74fa44764640fd2b97c417509e040aa
2020-01-14 10:02:30 +08:00
Chiachang Wang
254c3d830e Merge "Support reevaluation request from captive portal app" 2020-01-14 01:42:22 +00:00
Aaron Huang
aead9c64fa Make NattKeepalivePacketData @SystemApi
Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests

Change-Id: I687f1a8a4b82cb7e4a0dfeb24f0b23a4de6d5287
2020-01-14 01:45:28 +08:00
Junyu Lai
429d86ae3c Merge changes from topic "sp04"
* changes:
  [SP05] add unit test for onStatsProviderLimitReached in NPMS
  [SP04] add unit test for NetworkStatsProvider
  [SP03] support registerNetworkStatsProvider API
  [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
2020-01-13 14:09:52 +00:00
junyulai
276921b6e1 [SP04] add unit test for NetworkStatsProvider
Test: atest NetworkStatsServiceTest
Bug: 130855321
Change-Id: I0c19d8bedcb9398da3f464efe01e775fde9f8a78
2020-01-13 14:43:06 +08:00
Chiachang Wang
938bfba0c3 Support reevaluation request from captive portal app
CaptivePortalLogin use similar way to validate the network as
NetworkMonitor. Provide API to reuse NetworkMonitor facilities
for consistent captive portal detection.

Bug: 134892996
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Test: manually test with captive portal Wi-Fi
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Change-Id: I6f039eae7ceb18eb6c3cf15587cdc27a7fe35b00
2020-01-13 14:28:02 +08:00
Lorenzo Colitti
a86fae785a Stop using NetworkFactory in connectivity code.
Bug: 138306002
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: I6b9979f343108c0c077abd86ae1c21e5ece0cccc
2020-01-12 17:40:02 +09:00
Treehugger Robot
0e82d1c50d Merge "Add NetworkCapabilities#deduceRestrictedCapability" 2020-01-10 09:27:31 +00:00
Aaron Huang
617e9bd709 Merge "Expose DhcpInfo parcelable interface implementation methods" 2020-01-10 08:05:24 +00:00
Aaron Huang
434bc5adf4 Merge "Add keepalive related methods and fields to system APIs" 2020-01-10 06:16:04 +00:00
Lorenzo Colitti
3bd0d010bb Merge "Add a NetworkProvider class to the SDK." 2020-01-09 15:09:58 +00:00
Aaron Huang
cf22d1a29f Expose DhcpInfo parcelable interface implementation methods
Parcelable class requires a CREATOR field be exposed.

Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
      atest android.net.cts

Change-Id: I41c68406d09014dda99f337add8c0db0298b0582
2020-01-09 21:33:22 +08:00
Lorenzo Colitti
6702d4b5b2 Add a NetworkProvider class to the SDK.
Bug: 138306002
Test: builds, boots, wifi and telephony work
Test: tested by upcoming change that uses this in NetworkFactory
Change-Id: I2f61bf323215b7c6feff8acc92e7434346751773
2020-01-09 19:50:26 +09:00
paulhu
9c7a0fa46a Add NetworkCapabilities#deduceRestrictedCapability
Support telephony mainline module usage.

Bug: 138306002
Test: atest FrameworksNetTests
      atest CtsNetTestCases --instant

Change-Id: Idbd9c547eff7227085c753461b901c7cdbe396fb
2020-01-09 17:59:46 +08:00
Junyu Lai
c494e23773 Merge "[SP01] Add NetworkStats to system API" 2020-01-09 08:33:24 +00:00
Mark Chien
8124da436a Merge "Replace ConnectivityManager constants to TetheringManager" 2020-01-09 06:32:04 +00:00
junyulai
9b292c2c1f [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
Chiachang Wang
c2441ee239 Expose clearCapabilities for mainline module
Support telephony mainline module usage.

Bug: 138306002
Test: Build and make api-stubs-docs-update-current-api
Change-Id: I6260695b01ec06244d2822f9438a7fae83539ff2
Merged-In: I0a462da4e87cae2c7d4a9b9a92de061a086c5752
2020-01-09 10:25:03 +08:00
Lorenzo Colitti
fd21b50332 Merge "Refactor NetworkFactoryInfo to hide implementation details." 2020-01-09 00:10:47 +00:00
Cody Kesting
33bb594563 Merge "Add API surface for ConnectivityDiagnostics API." 2020-01-08 21:53:14 +00:00
Xin Li
d48bb1d764 Merge "DO NOT MERGE - Merge January 2020 Security Release into master" 2020-01-08 17:39:17 +00:00
markchien
a0f8fd92fd Replace ConnectivityManager constants to TetheringManager
Replace some ConnectivityManager constants as TetheringManager inside
tethering module. No API change, will have follow up CL to delete
@hide tethering constants in ConnectivityManager and replace caller
to using TetheringManager.

Bug: 144753389
Test: build
Change-Id: Ia1b963669722c32d147375763205ed2f3af52fed
2020-01-08 15:06:09 +00:00
Lorenzo Colitti
78185eae90 Refactor NetworkFactoryInfo to hide implementation details.
This is in preparation for introducing NetworkProvider, which
will initially share ConnectivityService code with NetworkFactory.

Bug: 138306002
Test: atest FrameworksNetTests
Change-Id: Ic6f888621f473342ee3fe8fedf9411552111342b
2020-01-08 23:40:42 +09:00
Artur Satayev
9c2add6fcc Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-08 14:04:40 +00:00
Remi NGUYEN VAN
f4767ccfc0 Merge "Add FrameworksNetIntegrationTests to postsubmit"
am: 9a00f5be3b

Change-Id: I3384970a0a961dfaaf10229ed9e5d39c4f552256
2020-01-07 05:05:45 -08:00
Remi NGUYEN VAN
9a00f5be3b Merge "Add FrameworksNetIntegrationTests to postsubmit" 2020-01-07 12:16:34 +00:00
markchien
d248c13bda Merge "Change tetheroffloadjni to tetheringutilsjni"
am: 0af9d37eca

Change-Id: I48207d95cf6f512ec038fb5dc9ba4009c01d676d
2020-01-07 01:12:30 -08:00
Treehugger Robot
0af9d37eca Merge "Change tetheroffloadjni to tetheringutilsjni" 2020-01-07 09:05:43 +00:00
markchien
d53edf736f Change tetheroffloadjni to tetheringutilsjni
Rename tetheroffloadjni to tetheringutilsjni and move setupRaSocket
jni method from NetUtils into tetheringutilsjni.

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -Off/On hotspot with ipv6 upstream

Change-Id: Ib68eb6999bbe2d3ca97e68712f22b105311ef800
2020-01-07 07:42:13 +00:00
Lorenzo Colitti
21dd220d3e Merge changes If28f0be6,If0f80067
am: 96529ad7fc

Change-Id: I108d3c36ce11af544ccfed9291dc38c690724915
2020-01-06 23:03:04 -08:00
Lorenzo Colitti
279a1d6620 Make LinkPropertiesTest pass, and fix an NPE.
aosp/973686 added the DHCP server address to LinkProperties, but
it did not have any tests, and would throw NPE when parceling a
LinkProperties that did not have a DHCP server.

Add tests and fix the bug.

Bug: 134098566
Test: unit test now passes
Change-Id: If28f0be650963e8d9af7eb53f6940824582a2db3
2020-01-07 13:02:32 +09:00
ruibin zhang
ca75bc897d Add the DHCP server address to LinkProperties.
Bug: 134098566
Test: see subsequent CL in topic
Change-Id: If0f80067934189137c87cd379e7ae47b187562fd
2020-01-07 01:21:07 +09:00
Remi NGUYEN VAN
0b197df422 Add FrameworksNetIntegrationTests to postsubmit
After checking flake metrics for this test, it can be added in
presubmit.

Test: this change is to check results in postsubmit
Change-Id: I70cb149629a3e959e29cfd21048e7b148bd29fe9
2020-01-06 22:03:43 +09:00