Commit Graph

4643 Commits

Author SHA1 Message Date
Automerger Merge Worker
1bafcb692f Merge "Make getNetworkSpecifier() public API." am: ad60ef88e0 am: 31f969ba66 am: fead85c4d4
Change-Id: I73894e4236dc5660f2eb54be3d48aa7359822947
2019-12-12 12:47:00 +00:00
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
4f059fa56e Merge "InterfaceConfiguration: Don't use @hide Sets class" am: 2bf6bf92c6 am: e7182d5ba5
am: 3f3dd3b432

Change-Id: I2538620dc77f8bbde5d3589aef22a1675e25fb03
2019-12-10 06:09:15 -08: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
Jeffrey Huang
77db950964 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00
Aaron Huang
df293c54ad Merge "Add TrafficStats methods to public APIs" am: 8aed6e69f0 am: 1abb8de060
am: d9b442b050

Change-Id: Iaf7fe6ba60048daecfde44c8348f68727b245d98
2019-12-06 03:19:38 -08: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
Jeffrey Huang
cb78285b81 Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00
markchien
6d32634b8a Merge "Expose netId to SystemApi" am: 1d379ac065 am: 1952cb5129
am: 1d87d9b784

Change-Id: I4dce3a699666c8f75e028b7dc2e196ca0b44b41c
2019-12-05 00:43:27 -08:00
Xiao Ma
4ff3397343 Merge "Add DHCP Rapid Commit FILS support." am: 488c2b03d7 am: 2000a1410f
am: 9b115791e5

Change-Id: I6e782e27e195d81e14269e12f715dce92052e604
2019-12-05 00:42:35 -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
a6af6b6c2a 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
2019-12-04 11:45: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
97ebd17170 Merge "Give apps access to the NAT64 prefix." am: ce149dba87 am: 7dfd758583
am: 36abe134c0

Change-Id: I759e5da8648fd10b26aa235410ee6e22e1976a9b
2019-12-01 18:33:11 -08: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
43429e772d Merge "Add IpConfiguration parcelable interface implementation to system API" am: 76101baf9a am: 21d23db938
am: 3262be5183

Change-Id: I9add4992fbacca4668867abc7a218256805d1bfc
2019-11-28 02:19:08 -08: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
f6166035c4 Merge "Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)" am: 9dcbd6de87 am: c0ea72cf10
am: f72d5dbbf1

Change-Id: I8a7f28feb66265be2379beda7bc3fce732e4a294
2019-11-26 09:37:25 -08: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
Chalard Jean
839ff7dded Merge changes I195d894e,I7069c111 am: 87ed7d7816 am: aab1364ef9
am: eb24ef664f

Change-Id: I3a8926f3b444f19b6db200c361ce348da25dbcb8
2019-11-25 07:20:17 -08:00
Aaron Huang
fde6552f0c Merge "Expose IpConfiguration and ProxyInfo APIs" am: 920a4a5b1b am: 4082917f46
am: d78b2a0b67

Change-Id: Iebd6cdd25f61a2255f1e17984bafda4c79a7d518
2019-11-25 07:16:49 -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
Roshan Pius
61069abccb Merge "NetworkScoreManager: Add @SystemApi for wifi mainline module" 2019-11-24 06:57:07 +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
5d33d00a6e Merge "Cut the dependency to APN constants" am: 8f0513bd0b am: 28df771bd4
am: 72cd1fa27a

Change-Id: I71f8a944fcb8b3d8199296aef67251b50abe6172
2019-11-21 05:00:52 -08: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
cbb746d5fb Merge "Use TelephonyManager instead of ITelephony Binder" am: de953fd5f2 am: f1b067c671
am: 33be3a80ea

Change-Id: I52c56a08092297b45b57f37f258f38ef5d93b393
2019-11-20 20:59:54 -08: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
d9e13e7990 Merge changes from topic "scanreuslt-wifiinfo-systemapi"
* changes:
  Expose ScanResult/WifiInfo @hide APIs as @SystemApi
  SettingsLib: convert raw fields to getters
  NetworkKey: migrate from ScanResult.wifiSsid to SSID
2019-11-20 18:57:28 +00:00