Commit Graph

4656 Commits

Author SHA1 Message Date
markchien
ae8aa646dc [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
Artur Satayev
c20b82a466 Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 16:55:30 +00:00
Automerger Merge Worker
35990bba96 Merge "Add LinkProperties methods to system APIs" am: 4dba00e007 am: 8d2b81869c am: ae6c84fcb2
Change-Id: I39e9224206a43a85fecaf0956003cd4896ca0820
2019-12-19 08:38:26 +00:00
Automerger Merge Worker
ae6c84fcb2 Merge "Add LinkProperties methods to system APIs" am: 4dba00e007 am: 8d2b81869c
Change-Id: Ie0a102ceb853c9f61d3e1deb369938a48edcdcac
2019-12-19 08:22:11 +00:00
Aaron Huang
4dba00e007 Merge "Add LinkProperties methods to system APIs" 2019-12-19 08:01:58 +00:00
Automerger Merge Worker
bed24cb825 Merge "Fix parceling of LinkProperties Inet6Addr" am: 7382f03d58 am: 50fb44e776 am: 091f1d790c
Change-Id: I6692a91c3e00fb8726ed4914f7d7e3c22874a068
2019-12-19 03:46:11 +00:00
Automerger Merge Worker
091f1d790c Merge "Fix parceling of LinkProperties Inet6Addr" am: 7382f03d58 am: 50fb44e776
Change-Id: Ie5b7782d788717dd1cc440e502d6cdf2d1c18eaa
2019-12-19 03:29:50 +00:00
Remi NGUYEN VAN
7382f03d58 Merge "Fix parceling of LinkProperties Inet6Addr" 2019-12-19 03:07:43 +00:00
Artur Satayev
afdb23ab6f 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: I534e3fd1305e2f4af076986770033478448a665c
2019-12-18 20:44:45 +00:00
Remi NGUYEN VAN
f705ea69dc Fix parceling of LinkProperties Inet6Addr
IPv6 addresses parceled for DNS servers, private DNS servers, PCSCF
servers were parceled without the scope. This causes issues with
link-local DNS servers.

Test: atest FrameworksNetTests
Bug: 145181158
Change-Id: I0ed24e51d4d0656f4a1f932b5e9f646b35b4b971
2019-12-18 19:52:30 +09:00
Aaron Huang
e6a18182ce Merge "Add keepalive related methods and fields to system APIs" 2019-12-17 13:57:13 +00:00
Aaron Huang
17c660dfeb Add keepalive related methods and fields to system APIs
Add KeepalivePacketData to system API for mainline support.
Also, remove InvalidPacketException class from SocketKeepalive
and create a new InvalidPacketException class in android.net

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

Change-Id: I2d982e8abb5cb6b4c74a20483550b18cf814320d
2019-12-13 23:05:37 +08:00
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
Aaron Huang
8b322ed80f Add LinkProperties methods to system APIs
The exposed methods are used by telephony, wifi
and tethering. For mainline support, making the
methods @SystemApi.

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

Change-Id: Ib16a838cf9f748e1c5b045d6c2f17678f16af28c
2019-12-02 19:29:18 +08: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