Commit graph android_packages_modules_Co.../core/java
Message SHA1
Expose clearCapabilities for mainline module
Support telephony mainline module usage.

Bug: 138306002
Test: Build and make api-stubs-docs-update-current-api
Change-Id: I0a462da4e87cae2c7d4a9b9a92de061a086c5752

Chiachang Wang   commited 2020-01-08 11:08:10 +08:00
b3d429fda1
Merge "Change tetheroffloadjni to tetheringutilsjni" am: c21a9bcc0e am: ec2f2397ff am: 69df3dd6c8
Change-Id: I2069561edb05b53e565563c8419c689531ff9571

Automerger Merge Worker   commited 2020-01-07 09:38:44 +00:00
3c01fca5a7
Merge "Change tetheroffloadjni to tetheringutilsjni"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-07 09:05:43 +00:00
c21a9bcc0e
Merge "Use new UnsupportedAppUsage annotation."
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-07 07:58:18 +00:00
74bd408649
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

markchien   authored and   Mark Chien   commited 2020-01-07 07:42:13 +00:00
697fca5c4d
Merge changes If28f0be6,If0f80067 am: 96529ad7fc am: 6df702d3c9 am: b071735cd8
Change-Id: I826f1f94ea62eb5bd93e5d7edcbe278c8247ae2d

Automerger Merge Worker   commited 2020-01-07 07:31:36 +00:00
bb5729e19d
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

Lorenzo Colitti   commited 2020-01-07 13:02:32 +09:00
b32fb84a4b
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

Artur Satayev   commited 2020-01-06 16:47:35 +00:00
b9ea02fe06
Add the DHCP server address to LinkProperties.
Bug: 134098566
Test: see subsequent CL in topic
Change-Id: If0f80067934189137c87cd379e7ae47b187562fd

ruibin zhang   authored and   Lorenzo Colitti   commited 2020-01-07 01:21:07 +09:00
56d4a8aed7
Merge "Add NETWORK_AIRPLANE_MODE permission"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-06 14:15:46 +00:00
cf385e4746
Merge "Expose NetworkCapabilities methods to system/public APIs" am: 2b6f4c6dbb am: 990c9b6c8d am: 231a4ab4fe
Change-Id: I6515df858f4ebc94d234f905a659db45188d72c6

Automerger Merge Worker   commited 2019-12-27 08:54:24 +00:00
4516709248
Expose NetworkCapabilities methods to system/public APIs
Add methods to system/public APIs for mainline support.

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

Change-Id: I6ec333309172edaf5aa976f83cfbe63512043594

Aaron Huang   commited 2019-12-27 08:31:06 +00:00
9572fe28f5
[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

markchien   commited 2019-12-20 10:31:31 +08:00
b0bb7865e0
[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
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e

markchien   commited 2019-12-19 20:53:06 +08:00
4f94981670
Merge "Add LinkProperties methods to system APIs" am: b64d2c9501 am: 80bcbcdeec am: 96c042b148
Change-Id: I39e9224206a43a85fecaf0956003cd4896ca0820

Automerger Merge Worker   commited 2019-12-19 08:38:26 +00:00
ac96fa4df6
Merge "Add LinkProperties methods to system APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2019-12-19 08:01:58 +00:00
b64d2c9501
Merge "Fix parceling of LinkProperties Inet6Addr" am: 87c9d38d1e am: c7e09e3c83 am: 0b0d019da8
Change-Id: I6692a91c3e00fb8726ed4914f7d7e3c22874a068

Automerger Merge Worker   commited 2019-12-19 03:46:11 +00:00
8cec43be41
Merge "Fix parceling of LinkProperties Inet6Addr"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-12-19 03:07:43 +00:00
87c9d38d1e
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

Remi NGUYEN VAN   commited 2019-12-18 19:52:30 +09:00
e50cd96c1d
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
763aff5afa
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
70061ab8f1
Merge "Make getNetworkSpecifier() public API." am: ad60ef88e0 am: 5ea0681fa3 am: cdbb9b07e5
Change-Id: I73894e4236dc5660f2eb54be3d48aa7359822947

Automerger Merge Worker   commited 2019-12-12 12:47:00 +00:00
faa71bfb70
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
c07f570d1c
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
a8e97d4f95
Merge "Expose netId to SystemApi" am: cec4a7df3a am: bd154aca0c
am: bafe3cfffb

Change-Id: I4dce3a699666c8f75e028b7dc2e196ca0b44b41c

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

Aaron Huang   commited 2019-12-02 19:29:18 +08:00
644d130385
Merge "Give apps access to the NAT64 prefix." am: d6d1874f83 am: 72a0f88e74
am: 9038bc9908

Change-Id: I759e5da8648fd10b26aa235410ee6e22e1976a9b

Chalard Jean   authored and   android-build-merger   commited 2019-12-01 18:33:11 -08:00
12ed34c77a
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
6491fb772c
Add NETWORK_AIRPLANE_MODE permission
Add a permission to allow airplane mode to
be toggled without holding the NETWORK_SETTINGS
(or similar) permission.

Bug: 141621384
Bug: 145164696
Test: TODO
Change-Id: Iebe2f501fdd802d54fd3345ac2fb0a8c129faf71

Edward Savage-Jones   authored and   Lorenzo Colitti   commited 2019-11-28 21:13:50 +09:00
3b9fe32d02
Merge "Add IpConfiguration parcelable interface implementation to system API" am: 9ff42e83d1 am: db770e3ed4
am: 54861e8164

Change-Id: I9add4992fbacca4668867abc7a218256805d1bfc

Aaron Huang   authored and   android-build-merger   commited 2019-11-28 02:19:08 -08:00
8801199e83
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
1841dc26d5
Merge changes I195d894e,I7069c111 am: ff8b7b351b am: f4cc54739a
am: 19bd6b4cb6

Change-Id: I3a8926f3b444f19b6db200c361ce348da25dbcb8

Chalard Jean   authored and   android-build-merger   commited 2019-11-25 07:20:17 -08:00
13aa1adc42
Merge "Expose IpConfiguration and ProxyInfo APIs" am: 1e6d453bc6 am: 2eb55c5f81
am: 0b9d4e8360

Change-Id: Iebd6cdd25f61a2255f1e17984bafda4c79a7d518

Aaron Huang   authored and   android-build-merger   commited 2019-11-25 07:16:49 -08:00
26477ec272
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
ff8b7b351b
Merge "Expose IpConfiguration and ProxyInfo APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2019-11-22 09:25:16 +00:00
1e6d453bc6
Merge "Cut the dependency to APN constants" am: b3c04f00fc am: ec0f7aaaf3
am: d021be89fb

Change-Id: I71f8a944fcb8b3d8199296aef67251b50abe6172

Chalard Jean   authored and   android-build-merger   commited 2019-11-21 05:00:52 -08:00
7fa1f100d2
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
1f42df12dc
Merge "Use TelephonyManager instead of ITelephony Binder" am: 33046223a2 am: eb1e692b65
am: 21f23c28dc

Change-Id: I52c56a08092297b45b57f37f258f38ef5d93b393

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

Meng Wang   commited 2019-11-20 10:05:33 -08:00
91311c0033
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
a523b44d11
[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
6090209bc1
Merge "Add @UnsupportedAppUsage annotations for greylist."
Artur Satayev   authored and   Android (Google) Code Review   commited 2019-11-19 15:05:51 +00:00
fe00410093
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
fc03a99f74
Merge "StaticIpConfiguration: Couple of minor fixes" am: bf78f3fcc0 am: 3c28bfe9d4
am: 45fe413537

Change-Id: I66a1e125c1ecfa456ae7e83153dfc02eb7d7d3b0

Roshan Pius   authored and   android-build-merger   commited 2019-11-18 07:17:43 -08:00
7f49645689
Merge "StaticIpConfiguration: Couple of minor fixes"
Roshan Pius   authored and   Gerrit Code Review   commited 2019-11-18 15:05:31 +00:00
bf78f3fcc0