Commit Graph

4554 Commits

Author SHA1 Message Date
Automerger Merge Worker
fead85c4d4 Merge "Make getNetworkSpecifier() public API." am: ad60ef88e0 am: 31f969ba66
Change-Id: I884c4e4c9ed891594845d599358f19f4a8e2ad60
2019-12-12 12:26:06 +00:00
Chalard Jean
7412d7aa61 Make getNetworkSpecifier() public API.
The builder lets clients set it, and this may be useful for
unit tests of apps. It should be public.
The need arises from uses of this in WiFi and Telephony
network factories.

Test: build
Bug: 135998869
Change-Id: I57279cac139c28e8654d2066ba0c60edd1e6cd98
2019-12-12 13:10:55 +09:00
Roshan Pius
3f3dd3b432 Merge "InterfaceConfiguration: Don't use @hide Sets class" am: 2bf6bf92c6
am: e7182d5ba5

Change-Id: I8d21b1465b3a1f5a8b54e2c4fbc8a8d6a7a6a475
2019-12-10 06:04:32 -08:00
Roshan Pius
f4c912ec75 InterfaceConfiguration: Don't use @hide Sets class
InterfaceConfiguration class is going to be jar-jar'ed by wifi (in
internal master). Remove this @hide usage to avoid transitive @hide
dependency on wifi mainline module.

Bug: 145904524
Test: Compiles
Change-Id: I4dbe69a8597d75d19fb12b4f4940b26b64fda35e
2019-12-09 15:40:19 +00:00
Aaron Huang
d9b442b050 Merge "Add TrafficStats methods to public APIs" am: 8aed6e69f0
am: 1abb8de060

Change-Id: Ib98dde2ae3b6cfee05e8d5536565ce72f6722e0b
2019-12-06 03:12:46 -08:00
Aaron Huang
29667d2942 Add TrafficStats methods to public APIs
Add methods to public APIs for mainline support.

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

Change-Id: I21a9c0dbdc79b1f1041fc9e23c6a4e1e97ecde92
2019-12-06 16:19:40 +08:00
markchien
1d87d9b784 Merge "Expose netId to SystemApi" am: 1d379ac065
am: 1952cb5129

Change-Id: I23f6428954d08761d9671b419887d58dd29171fd
2019-12-04 18:39:46 -08:00
Treehugger Robot
1d379ac065 Merge "Expose netId to SystemApi" 2019-12-05 02:29:41 +00:00
Xiao Ma
9b115791e5 Merge "Add DHCP Rapid Commit FILS support." am: 488c2b03d7
am: 2000a1410f

Change-Id: Ic560de49a0368f32c22c6f164defb898fd951a6c
2019-12-04 18:23:16 -08:00
Xiao Ma
488c2b03d7 Merge "Add DHCP Rapid Commit FILS support." 2019-12-05 02:13:02 +00:00
Paul Hu
973a925ff9 Merge "Replace the permission of internal connectivity checks" am: 6be69420df
am: 3256e731e3

Change-Id: I461936789b24940cc81146e9d0fc6c4c455206ed
2019-12-04 08:51:28 -08:00
markchien
665a2cc1f0 Expose netId to SystemApi
Tethering will be build as unblundled APP. It can't use @hide
API anymore. Expose netId for tethering because it need to set
proxy dns server with netId.

Bug: 144758139
Test: build
Change-Id: Ifefa791940874617bb479f5c23488d14be87f45e
2019-12-04 14:33:51 +08:00
paulhu
59148b7938 Replace the permission of internal connectivity checks
A number of connectivity checks that protect system-only methods
check for CONNECTIVITY_INTERNAL, but CONNECTIVITY_INTERNAL is a
signature|privileged permission. We should audit the permission
checks, and convert checks that protect code that should not be
called outside the system to a signature permission. So replace
all CONNECTIVITY_INTERNAL to other proper permissions.

Bug: 32963470
Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Change-Id: I8f2dd1cd0609056494eaf612d39820e273ae093f
Merged-In: I8f2dd1cd0609056494eaf612d39820e273ae093f
2019-12-04 11:44:45 +08:00
Xiao Ma
9484e48ea4 Add DHCP Rapid Commit FILS support.
Bug: 140223017
Test: atest FrameworksNetTests NetworkStackTests
Test: atest NetworkStackIntegrationTests
Test: manual

Change-Id: Ia73e92058f30acee16eff27e05ec53d2eb0e7110
2019-12-03 21:44:34 +09:00
Chalard Jean
36abe134c0 Merge "Give apps access to the NAT64 prefix." am: ce149dba87
am: 7dfd758583

Change-Id: I251c5ac17fb728d6f0fe91fd96c115c8b8d1879c
2019-12-01 18:27:36 -08:00
Chalard Jean
f9e2215cc4 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
Aaron Huang
3262be5183 Merge "Add IpConfiguration parcelable interface implementation to system API" am: 76101baf9a
am: 21d23db938

Change-Id: Ic5b8e360cb33cdd18f32a4d2c17beb996584ebda
2019-11-28 02:14:56 -08:00
Aaron Huang
42daacaea7 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
Jayachandran Chinnakkannu
f72d5dbbf1 Merge "Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)" am: 9dcbd6de87
am: c0ea72cf10

Change-Id: I916e810b6350be9c1a6b24f2a652e05a1fa444fa
2019-11-26 09:31:33 -08:00
Jayachandran Chinnakkannu
9dcbd6de87 Merge "Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)" 2019-11-26 17:17:38 +00:00
Jayachandran C
f823445e53 Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)
This CL deletes the reference to this API as its used in a dead code
which is used for debugging only.

Bug: 140908357
Test: Build
Change-Id: I9fa1996ab5fdb5ab884128d06c2e92bab164dea7
2019-11-25 15:19:47 -08:00
Roshan Pius
126fb85c29 Merge "NetworkScoreManager: Add @SystemApi for wifi mainline module" am: 5b57190f08
am: 0564779e76

Change-Id: I04580ad32eefb2ce4c8df8f1037b8457238c30eb
2019-11-25 06:05:07 -08:00
Roshan Pius
9518866c53 NetworkScoreManager: Add @SystemApi for wifi mainline module
Add formal API's for API's that the wifi mainline module uses:
a) NetworkScoreManager.requestNetworkScores - Request new network scores.
b) NetworkScoreManager.registerNetworkScoreCallback - @SystemApi wrapper
over the existing registerNetworkScoreCache.
c) NetworkKey.createFromScanResult - Create NetworkKey from ScanResult.

Also,
a) Converted the existing WifiNetworkScoreCache callback implementation to
support both the new @SystemApi (used by wifi) and the old @hide API
(used by settings).
b) Stopped invoking dump on all the callbacks from NetworkScoreService.
The dump of each callback should be invoked at their client site (i.e
wifi service should dump state of the callback it registers with the
service).
c) Added a helper method |dumpWithLatestScanResults| to help dump the
state of the WifiNetworkScoreCache from wifi service.

Bug: 144487252
Test: a) Device boots up and connects to wifi network.
b) Manually verified that network scores are being requested & updated
with the new interface.

Change-Id: Id5a66189150e7a088127519373a832f63bdd12ac
Merged-In: Id5a66189150e7a088127519373a832f63bdd12ac
(cherry-picked from c278f80c28)
2019-11-24 07:04:30 +00:00
Chalard Jean
eb24ef664f Merge changes I195d894e,I7069c111 am: 87ed7d7816
am: aab1364ef9

Change-Id: Ia75369ad6b360644392766296542efa4a5fdf0ce
2019-11-22 06:33:34 -08:00
Chalard Jean
87ed7d7816 Merge changes I195d894e,I7069c111
* changes:
  [NS A10] Cleanup
  [NS A09] Always rematch all networks to requests
2019-11-22 14:08:09 +00:00
Aaron Huang
d78b2a0b67 Merge "Expose IpConfiguration and ProxyInfo APIs" am: 920a4a5b1b
am: 4082917f46

Change-Id: I9ef7325d73b1df9b1a3eb32e419e4cd1caeb7729
2019-11-22 01:47:14 -08:00
Aaron Huang
920a4a5b1b Merge "Expose IpConfiguration and ProxyInfo APIs" 2019-11-22 09:25:16 +00:00
David Su
02076c7a01 Merge "NetworkKey: migrate from ScanResult.wifiSsid to SSID" am: 1124e240c0
am: c4df6668bb

Change-Id: I6e50821d3fdd5e6ff5fc4cd238ccd186dd1ff94c
2019-11-21 11:58:10 -08:00
David Su
1124e240c0 Merge "NetworkKey: migrate from ScanResult.wifiSsid to SSID" 2019-11-21 18:44:46 +00:00
Chalard Jean
72cd1fa27a Merge "Cut the dependency to APN constants" am: 8f0513bd0b
am: 28df771bd4

Change-Id: I97f01b82916e66673339bef437d80927e78282ee
2019-11-21 04:52:31 -08:00
Chalard Jean
c06d788ec9 Cut the dependency to APN constants
With Telephony moving to Mainline these constants are not accessible
any more, and should not be made public. As they are only used by
a deprecated method that can only be called by apps with a target
SDK < M and only for one of the features it used to handle, copying
the constants until this method is completely removed is the simplest
way to go.

Test: FrameworksNetTests
Bug: 144454341
Change-Id: Iea18c8d2f2c8a40f04db9383d3f74b917267ba25
2019-11-21 14:48:00 +09:00
Meng Wang
33be3a80ea Merge "Use TelephonyManager instead of ITelephony Binder" am: de953fd5f2
am: f1b067c671

Change-Id: Iba67484246e81361ed540592558371cd7f2352c6
2019-11-20 20:51:54 -08:00
Meng Wang
de953fd5f2 Merge "Use TelephonyManager instead of ITelephony Binder" 2019-11-21 04:36:10 +00:00
David Su
e51ae1566b NetworkKey: migrate from ScanResult.wifiSsid to SSID
wifiSsid is an @hide field, migrate to getter method.

Bug: 144311098
Test: atest NetworkKeyTest
Change-Id: Ic689e12b8de4af52fae26c25bc90c8eb093ad3fe
Merged-In: Ic689e12b8de4af52fae26c25bc90c8eb093ad3fe
2019-11-20 10:41:59 -08:00
Meng Wang
a73bed81ae Use TelephonyManager instead of ITelephony Binder
Bug: 140908357
Test: make
Change-Id: If3be915329cc27c560af3fd71a903984a626aca8
2019-11-20 10:05:33 -08:00
Aaron Huang
6763aec94c Expose IpConfiguration and ProxyInfo APIs
Moving IpConfiguration methods to system API
for mainline support.

Public copy constructors of ProxyInfo and add
buildPacProxy(Uri, int) to create a new proxy
properties.

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: I07bcd2a34a222ea2b3cf0d8b497f051011c41c2c
2019-11-20 20:07:05 +08:00
Chalard Jean
1a4548cdd4 [NS A09] Always rematch all networks to requests
This is a regression in performance but it is necessary for
the sake of refactoring ; when the refactoring is over, the
performance will be improved back.

Test: ConnectivityServiceTest
Change-Id: I7069c11193dccb7dce6af65cfb731c0f4ad93629
2019-11-20 20:42:40 +09:00
Roshan Pius
d3e4bc9004 Merge "StaticIpConfiguration: Couple of minor fixes" am: 5c4c9872c5
am: 402e33e6e7

Change-Id: Ic40a6d4221cdb39e40b895efbe313160b7ab0846
2019-11-18 07:14:08 -08:00
Roshan Pius
5c4c9872c5 Merge "StaticIpConfiguration: Couple of minor fixes" 2019-11-18 15:05:31 +00:00
Jayachandran Chinnakkannu
6d2b8e0d6a Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 73e22ad21d
am: 306f8cecf8

Change-Id: I7613a654dd726bcf5428a5a07ad4369f616bbcfa
2019-11-18 01:05:02 -08:00
Jayachandran C
43fa1be03a Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL replaces with getSystemService(TelephonyManager.class)

Bug: 140768340
Test: atest frameworks/base/tests/net
Change-Id: I0f14cc5440fa85c81ab90f3199e9e91c1b00f5e1
2019-11-15 19:26:33 -08:00
Roshan Pius
ae07689b94 StaticIpConfiguration: Couple of minor fixes
a) Ensure the Builder.build() does not crash if setDnsServers() is not
invoked.
b) Add a checkNotNull on setDnsServers() since it is marked @NonNull.

Bug: 144487020
Test: Compiles
Change-Id: I2b9f990efa0583c0f067c25e23d8c944ffbdf6a5
(cherry-picked from d0348339c50eeae0fe137c62476f6a01542f4163)
2019-11-14 18:13:26 -08:00
Artur Satayev
79aff5c601 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa
am: 59318bab67

Change-Id: Ic691d764839ecf34daa8b53aa92497e013c9a2a7
2019-11-13 10:40:54 -08:00
Treehugger Robot
a98026f7aa Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." 2019-11-13 18:20:08 +00:00
Artur Satayev
5a525851a8 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 15:05:56 +00:00
Kevin Hufnagle
d277bd6b30 Merge "docs: Fix broken link to NPN protocol" am: cab84c8dd3
am: 7c28465f70

Change-Id: Iebaec6b05cb01fac5a9e89fd8c1690f771f2df32
2019-11-12 14:58:12 -08:00
Kevin Hufnagle
298a24cc84 docs: Fix broken link to NPN protocol
Test: make ds-docs -j32

Bug: 24072424
Change-Id: I499325e0656e54e0a185539ca76c7b6f62f3be5b
2019-11-12 18:07:02 +00:00
Artur Satayev
756d3b447a Merge "Add @UnsupportedAppUsage annotations for greylist." am: 423c3a32d6
am: 7a565c45b1

Change-Id: I48075ef4296e0b55c0055f7364c5129bbd60e9ed
2019-11-11 09:33:13 -08:00
Artur Satayev
3be4d59369 Merge "Add @UnsupportedAppUsage annotations for max-p." am: 8893f158c6
am: da4d6567c2

Change-Id: Iff80c388dec2c6f8184b739be6fb38b8ec8a1a49
2019-11-08 09:49:03 -08:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00