Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Merge "Add keepalive related methods and fields to system APIs"
Aaron Huang   authored and   Android (Google) Code Review   commited 2019-12-17 13:57:13 +00:00
aab5480b48
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

Aaron Huang   commited 2019-12-13 23:05:37 +08:00
5a916810c6
Merge "Make getNetworkSpecifier() public API." am: ad60ef88e0 am: c0f993bb04 am: f5d13c5ac5
Change-Id: I73894e4236dc5660f2eb54be3d48aa7359822947

Automerger Merge Worker   commited 2019-12-12 12:47:00 +00:00
2d41a6ebe6
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

Chalard Jean   commited 2019-12-12 13:10:55 +09:00
294ebbbad8
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

Jeffrey Huang   commited 2019-12-05 11:28:11 -08:00
3d97148418
Merge "Expose netId to SystemApi" am: ed2644bf65 am: 4127bbc6bf
am: 25797f3843

Change-Id: I4dce3a699666c8f75e028b7dc2e196ca0b44b41c

markchien   authored and   android-build-merger   commited 2019-12-05 00:43:27 -08:00
be1810eddd
Merge "Expose netId to SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-05 02:29:41 +00:00
ed2644bf65
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

markchien   commited 2019-12-04 14:33:51 +08:00
d2751e09d2
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

paulhu   commited 2019-12-04 11:45:51 +08:00
e031948c1a
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

paulhu   commited 2019-12-04 11:44:45 +08:00
8e96a75543
Merge "Give apps access to the NAT64 prefix." am: 3391fbb6a2 am: 6a96b757df
am: 151d65dab6

Change-Id: I759e5da8648fd10b26aa235410ee6e22e1976a9b

Chalard Jean   authored and   android-build-merger   commited 2019-12-01 18:33:11 -08:00
d8d95a5865
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

Chalard Jean   authored and   Maciej Å»enczykowski   commited 2019-11-30 10:25:02 +00:00
7aa4400722
Merge "Add IpConfiguration parcelable interface implementation to system API" am: 2193b07c21 am: fda119df8e
am: 2dbf6f50f3

Change-Id: I9add4992fbacca4668867abc7a218256805d1bfc

Aaron Huang   authored and   android-build-merger   commited 2019-11-28 02:19:08 -08:00
a717c87e3b
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

Aaron Huang   commited 2019-11-28 07:25:40 +00:00
4c1dd06339
Merge changes I195d894e,I7069c111 am: 3d59a27d1c am: cc64d36d32
am: 6e40e5fa0b

Change-Id: I3a8926f3b444f19b6db200c361ce348da25dbcb8

Chalard Jean   authored and   android-build-merger   commited 2019-11-25 07:20:17 -08:00
6aaf2bc277
Merge "Expose IpConfiguration and ProxyInfo APIs" am: c2df0b68c4 am: 10481a8f5f
am: d91e5a5ccb

Change-Id: Iebd6cdd25f61a2255f1e17984bafda4c79a7d518

Aaron Huang   authored and   android-build-merger   commited 2019-11-25 07:16:49 -08:00
402cea9bfd
Merge changes I195d894e,I7069c111
* changes:
  [NS A10] Cleanup
  [NS A09] Always rematch all networks to requests

Chalard Jean   authored and   Gerrit Code Review   commited 2019-11-22 14:08:09 +00:00
3d59a27d1c
Merge "Expose IpConfiguration and ProxyInfo APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2019-11-22 09:25:16 +00:00
c2df0b68c4
Merge "Cut the dependency to APN constants" am: f1df59afe3 am: ca757d6635
am: 832da6e8c4

Change-Id: I71f8a944fcb8b3d8199296aef67251b50abe6172

Chalard Jean   authored and   android-build-merger   commited 2019-11-21 05:00:52 -08:00
ca7e22fea5
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

Chalard Jean   commited 2019-11-21 14:48:00 +09:00
afaed1a5e0
Merge "Use TelephonyManager instead of ITelephony Binder" am: 138728da9a am: 565782e413
am: 1e9a9a3d4f

Change-Id: I52c56a08092297b45b57f37f258f38ef5d93b393

Meng Wang   authored and   android-build-merger   commited 2019-11-20 20:59:54 -08:00
0f7c764ef0
Merge "Use TelephonyManager instead of ITelephony Binder"
Meng Wang   authored and   Gerrit Code Review   commited 2019-11-21 04:36:10 +00:00
138728da9a
Use TelephonyManager instead of ITelephony Binder
Bug: 140908357
Test: make
Change-Id: If3be915329cc27c560af3fd71a903984a626aca8

Meng Wang   commited 2019-11-20 10:05:33 -08:00
ed6f441315
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

Aaron Huang   commited 2019-11-20 20:07:05 +08:00
fb8581aac0
[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

Chalard Jean   commited 2019-11-20 20:42:40 +09:00
b0b3bc6d3d
Merge "Add @UnsupportedAppUsage annotations for greylist."
Artur Satayev   authored and   Android (Google) Code Review   commited 2019-11-19 15:05:51 +00:00
e100a72cbc
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.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6

Artur Satayev   commited 2019-11-19 15:05:35 +00:00
32958fcc98
Merge "StaticIpConfiguration: Couple of minor fixes" am: 90a81fedc5 am: a215878d38
am: 7aa5f04e7f

Change-Id: I66a1e125c1ecfa456ae7e83153dfc02eb7d7d3b0

Roshan Pius   authored and   android-build-merger   commited 2019-11-18 07:17:43 -08:00
615462b9f2
Merge "StaticIpConfiguration: Couple of minor fixes"
Roshan Pius   authored and   Gerrit Code Review   commited 2019-11-18 15:05:31 +00:00
90a81fedc5
Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 73e22ad21d am: 01586c399e
am: 0049091605

Change-Id: Ief1f090f3664d583565f291c89357bfbac58fe17

Jayachandran Chinnakkannu   authored and   android-build-merger   commited 2019-11-18 01:09:40 -08:00
368ede6dbf
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

Jayachandran C   commited 2019-11-15 19:26:33 -08:00
2092850198
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)

Roshan Pius   commited 2019-11-14 18:13:26 -08:00
32b898bb6d
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

Artur Satayev   authored and   satayev   commited 2019-11-13 15:05:56 +00:00
96639a6e4e
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

Artur Satayev   commited 2019-11-13 12:58:29 +00:00
fa065b1fc8
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

Artur Satayev   commited 2019-11-08 16:17:13 +00:00
56cb6bb2a9
Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

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: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1

Artur Satayev   commited 2019-11-08 16:17:13 +00:00
8124713528
Merge "[NS01] Create NetworkScore" am: bd692519f4 am: 10c6d68c49
am: 95d990daef

Change-Id: Ic093e655b1ff7e44db57d7add6b0818a06700962

Lucas Lin   authored and   android-build-merger   commited 2019-11-07 17:05:20 -08:00
288c248dfd
[NS01] Create NetworkScore
It's the first patch for refounding network selection. The new
network selection will try to compare the networks by more
factors, and will try to choose the best network after doing
the evaluation of trade-off.
Create the object that will serve to represent network quality
for more comprehensive ranking.

Bug: 143676287
Test: 1. Build pass.
      2. atest FrameworksNetTests

Change-Id: I4b6071d14365aa84d06be9802516fedf527e70f7

lucaslin   commited 2019-11-07 16:47:56 +08:00
17e9c67315
Merge "Better notification to user when DNS-over-TLS is broken" am: f42f3830ec am: 6a78c78996 am: e2bb0da748
am: d72606c43d

Change-Id: Iffbdc181d8249f26b3c370474583673aaa1c5032

Lucas Lin   authored and   android-build-merger   commited 2019-10-23 03:27:05 -07:00
665edc1896
Merge "Better notification to user when DNS-over-TLS is broken"
Lucas Lin   authored and   Gerrit Code Review   commited 2019-10-23 09:20:09 +00:00
f42f3830ec
Better notification to user when DNS-over-TLS is broken
Provide a specifc notification to let users know that device
has no internet is because it really doesn't have internet access
or it's caused by private DNS resolution failed.

Bug: 113242081
Test: atest FrameworksNetTests
Change-Id: I710c88a4742f5fd56c39fc797d7fa3ad36dba553

lucaslin   commited 2019-10-22 18:27:33 +08:00
e117e2e8d7
Merge "p2p: mirgrate p2p into tethering modes" am: baf9025bbf am: fbb3f48d47 am: 2afadcb2e6
am: e41f14ad98

Change-Id: I069022ca21c0a09ac2eab1b97436223df99a3b1b

Jimmy Chen   authored and   android-build-merger   commited 2019-10-17 23:25:44 -07:00
045387d492
Merge "p2p: mirgrate p2p into tethering modes"
Jimmy Chen   authored and   Gerrit Code Review   commited 2019-10-18 05:42:31 +00:00
baf9025bbf
Merge "Expose MacAddress methods to public API" am: db4e0d3bcf am: 1d06e0b1fb am: e0cd0f25ac
am: 5ba0a7e727

Change-Id: Ie117595096175ddb0affaa36d5f287a533e99eb5

Aaron Huang   authored and   android-build-merger   commited 2019-10-17 21:20:51 -07:00
b528016147
Expose MacAddress methods to public API
To support mainline modules, adding the methods which
are used by wifi.

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

Change-Id: I49856863c15b6b3b59aa867a77b0f137003149ef

Aaron Huang   commited 2019-10-15 17:33:05 +08:00
10b90974ac
Merge "Improve documentation for NetworkCallbacks." am: c1ea43fa1c am: 3747ac3067 am: 30baa870e5
am: 7eeb07c00e

Change-Id: I9a6eb4841c29e6e6944e3bb6eeb036f8026db4cf

Chalard Jean   authored and   android-build-merger   commited 2019-10-09 23:34:18 -07:00
ed5ff08958
Merge "Improve documentation for NetworkCallbacks."
Chalard Jean   authored and   Gerrit Code Review   commited 2019-10-10 05:56:59 +00:00
c1ea43fa1c
Improve documentation for NetworkCallbacks.
Bug: 139570489
Test: m doc-comment-check-docs
Change-Id: I9e13057b7e46908863156986429ff2ce93d4be78

Chalard Jean   commited 2019-10-09 18:33:09 +09:00
01378b64ac
resolve merge conflicts of c53848b014 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Ia9db1400207d9196012362c480ede059e94184af

Valentin Iftime   commited 2019-10-08 22:21:44 +02:00
55738c4aa0
API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b

Valentin Iftime   commited 2019-10-08 13:03:30 +02:00
9fa3509a51