Commit Graph

5404 Commits

Author SHA1 Message Date
Mathew Inwood
cc464ce183 Merge "Limit access to suspected false positives."
am: aeda49d185

Change-Id: Ib24456aaad850d5aee46dd242513840511942536
2019-01-02 04:48:33 -08:00
Mathew Inwood
ac5968e81e Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Chalard Jean
949c6ca94e Merge "[PT17] Small cleanup of PacManager"
am: 1f1bdf26f9

Change-Id: If5c8f840adaa9dd13e5cf95aedc782913aee9179
2018-12-25 03:08:21 -08:00
Chalard Jean
1f1bdf26f9 Merge "[PT17] Small cleanup of PacManager" 2018-12-25 10:55:10 +00:00
Paul Hu
7b341a8dba Merge "Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs"
am: 4d52ab7341

Change-Id: Ib1f7c272192bf4a6b44d0d7c47267ec0fe0317d6
2018-12-21 07:37:22 -08:00
Paul Hu
4d52ab7341 Merge "Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs" 2018-12-21 15:21:03 +00:00
Junyu Lai
add792f1ae Merge "Deprecate NetworkInfo"
am: 9f66465984

Change-Id: I4ac76b4bb3edb85e22440c8bfa4f0979c42c0cbd
2018-12-21 02:06:09 -08:00
Junyu Lai
9f66465984 Merge "Deprecate NetworkInfo" 2018-12-21 09:56:39 +00:00
Chalard Jean
8fff22272e [PT17] Small cleanup of PacManager
Test: runtest
Change-Id: I94a10cbae7f2d87bd8a68ae4f9972a728f4942c3
2018-12-20 18:25:22 +09:00
junyulai
5c2f626d34 Deprecate NetworkInfo
Currently NetworkInfo is used by Apps to get information of
network. However, to get such information, Apps need to poll
NetworkInfo frequently from ConnectivityService.

In order to increase the stability and reduce the maintain
effort, all functionalities provided by NetworkInfo are targeted
to be replaced or removed entirely.

Apps should use ConnectivityManager.NetworkCallback instead, to
get faster and more detailed updates from connectivity changes.

Or, apps could use getNetworkCapabilities or getLinkProperties
to get information synchronously, but should not mix the
callbacks and synchronous methods together.

Bug: 113629330
Test: atest FrameworksNetTests
Change-Id: Ie8faf620958c3fa0a4a2f233b35b825de0e99ffc
2018-12-20 16:36:10 +08:00
jiayanhong
87384f2d62 Merge "Fixed toString() printing error"
am: c5b457ba48

Change-Id: Id0f5d70a4549480fbb192628ce41796e4da04ad7
2018-12-19 09:54:46 -08:00
Treehugger Robot
c5b457ba48 Merge "Fixed toString() printing error" 2018-12-19 17:39:58 +00:00
Paul Duffin
be38ccba74 Merge "Add InetAddresses class to API"
am: 08f2a98220

Change-Id: If821b32c686fd603035050c09598384796f72fb2
2018-12-18 10:44:07 -08:00
Ken Chen
db1d2e4c36 Merge "Remove 'hasDns' parameter"
am: 07f581a4a3

Change-Id: I7efc2ff04cf65420b02ddf2cf7a13b640e37ef77
2018-12-18 10:38:59 -08:00
Paul Duffin
08f2a98220 Merge "Add InetAddresses class to API" 2018-12-18 14:11:04 +00:00
Ken Chen
07f581a4a3 Merge "Remove 'hasDns' parameter" 2018-12-18 11:17:27 +00:00
paulhu
25037063e3 Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs
These methods are marked to @UnsupportedAppUsage APIs since
Android Q. But some system apps still need them to set/get
necessary network or request information. Hence, make them to be
public or system APIs.

Bug: 120448492
Test: atest FrameworksNetTests
Change-Id: I95a44daef5615e290b40d0796ca183b88ad8a63f
2018-12-18 08:39:49 +00:00
Paul Duffin
9863a7ad63 Add InetAddresses class to API
Adds methods needed by app developers to avoid them having to call
non-SDK APIs.

Test: tests added to cts
Bug: 78686891
Change-Id: Ic0eadfdab2b111d5ca4becb753f4fe3557806433
2018-12-17 11:53:33 +00:00
Mark Chien
6503791656 Merge "Track default upstream when system is ready"
am: f744375f0a

Change-Id: I7febc52d94c1249b76608853d5cc142cdb8ad9df
2018-12-13 14:07:28 -08:00
Xin Li
cc576d293c [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
am: 41f916312b  -s ours

Change-Id: I7710a0b1a5ba1bf7acd45d694818aec91853e546
2018-12-13 12:47:28 -08:00
Xin Li
c20f2baabc [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
am: 0911727a11  -s ours

Change-Id: I60ae19c5ff7d5de669fac1ebd93d48283d9f27d8
2018-12-13 11:18:53 -08:00
Mark Chien
f744375f0a Merge "Track default upstream when system is ready" 2018-12-13 13:28:08 +00:00
markchien
8d48d97b65 Track default upstream when system is ready
Start tracking default upstream from boot.This is useful for
entitlement refine in following change. EntitlementManager can
decide if it needs to process entitlement provisioning before
tethering started.

Test: -atest FrameworksNetTests
      -build, flash, booted
      -manually turnoff/on tethering with different upstream
bug: 111490073

Change-Id: I8fdbd64c52f26b5363693bb5bd8050930e8ea961
2018-12-13 19:01:51 +08:00
Treehugger Robot
41f916312b Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Etan Cohen
be97184c39 Merge "[CM] Fix comments, add tests to TransportInfo API"
am: 4060bc1480

Change-Id: Idd668efdd1fe65754228041f23f3a91148aa38d6
2018-12-11 21:54:25 -08:00
Etan Cohen
55191eb12e [CM] Fix comments, add tests to TransportInfo API
Bug: 117605977
Test: atest NetworkCapabilitiesTest
Change-Id: I734ec56e44cd09d11ae81a856a53a26e1191b9a0
2018-12-11 15:00:10 -08:00
Xin Li
0911727a11 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
TreeHugger Robot
1a302ebcc8 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master" into stage-aosp-master 2018-12-11 21:49:22 +00:00
Junyu Lai
3b3ed972b7 Merge "VPN: Move package intent receiver to ConnectivityService."
am: aff267369c

Change-Id: I3220f34afe7e56bcbde87a8de2b00ecddecbc97a
2018-12-11 03:36:18 -08:00
junyulai
47311631d8 VPN: Move package intent receiver to ConnectivityService.
Currently, PermissionMonitor listen to user add/remove and
package add/remove intent respectively, and so does VPN.
Thus, races might occurr between them.

This commit refactor VPN part by using ConnectivityService to
listen to intents and dispatch events to VPN.

Bug: 118811303
Test: 1. atest FrameworksNetTests
      2. manually add/remove package
      3. cts-tradefed run cts -m CtsHostsideNetworkTests

Change-Id: Id76fd77c5fcfb2b0e21f211f63f007b1ea1aa53f
2018-12-11 14:04:02 +08:00
Xin Li
9416b2b2ae DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Junyu Lai
ed44d94dc1 Merge "Refactoring of deleting stats in NetworkStats based on uids."
am: 62724276e6

Change-Id: I60b086861a9a91cdd54c56c7caf21d26a6dd294a
2018-12-09 21:38:59 -08:00
Junyu Lai
62724276e6 Merge "Refactoring of deleting stats in NetworkStats based on uids." 2018-12-10 05:15:28 +00:00
Etan Cohen
e95b6a7ebc Merge "[CS] Add a generic transport-specific information API"
am: 9d38e58d60

Change-Id: Ibd5c44ff35a9002f2eafe0f0f131dbdb609f50a9
2018-12-08 20:09:11 -08:00
Etan Cohen
9d38e58d60 Merge "[CS] Add a generic transport-specific information API" 2018-12-09 03:53:44 +00:00
Etan Cohen
d397de2e39 [CS] Add a generic transport-specific information API
Add a generic transport-specific information container interface and
access methods. These can be used by a network factory to pass transport
(bearer)-specific network parameters to the app.

Bug: 117605977
Test: atest frameworks/base/tests/net/java/android/net (+new unit tests)
Change-Id: Ib7c83b677e1c02a2212265719813e648b0c9cc1b
2018-12-07 17:37:48 +00:00
Chenbo Feng
2d64d2096d Merge "Call netd to update the tcp buffer size"
am: 275ccbcc06

Change-Id: I217b1cc4afd886b449e532a7bde26bc9a5167277
2018-12-06 11:16:18 -08:00
Treehugger Robot
275ccbcc06 Merge "Call netd to update the tcp buffer size" 2018-12-06 19:01:24 +00:00
junyulai
85c0fd7969 Refactoring of deleting stats in NetworkStats based on uids.
In follow-up commits, current API would create new NetworkStats
every time when 464xlatAdjustment wants to filtered out some
uids.

This commit refactors it to delete stats in-place to get better
performance.

Bug: 118602783
Test: atest FrameworksNetTests
Change-Id: I858f95d1fa7733111786243b4e261ce8a70a068d
2018-12-06 19:01:17 +09:00
cken
d769c1db19 Remove 'hasDns' parameter
Netd use this parameter to determine which network it should use for
DNS query when VPN is enabled. But it is no more reliable when we have
seamless vpn handover, since the parameter does not make update to
netd if we have DNS configuration change. Netd should call resolver
API to get latest DNS information rather than this one.

Bug: 116539103
Test: runtest frameworks-net passes
Change-Id: I6491114ab6de0ff66322f1da69056e6f3c999b5a
2018-12-06 10:25:28 +09:00
Luke Huang
c8c22abba1 Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl"
am: c141de0b7e

Change-Id: I87360c19d58de38772f95ba8123a559007c6e71d
2018-12-04 22:21:26 -08:00
Luke Huang
c141de0b7e Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl" 2018-12-05 05:55:49 +00:00
Lucas Lin
b33add21de Merge "Simpify logic in updateTcpBufferSizes"
am: 08d5bca515

Change-Id: Ia95fd298cdea4b47cc9842b63f11282de58d18f7
2018-11-29 00:55:52 -08:00
Bill Yi
fade057e55 Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: Id08fdcae21e3ceb54e893a9ed11da6e67c889895
2018-11-28 18:45:59 -08:00
lucaslin
589964bdb5 Simpify logic in updateTcpBufferSizes
updateTcpBufferSizes() only need tcp buffer size as its
parameter. Also unify the logic to check default network
outside the function.

Bug: 120119769
Test: 1. Build pass.
      2. runtest frameworks-net

Change-Id: Iee9fec3efe7d5be5b590dd1c1f67ec5de636e613
2018-11-29 01:35:54 +00:00
Lucas Lin
1ffa04c9e2 Merge "Update LinkProperties to NetworkAgentInfo only when it's changed"
am: 023c12cf58

Change-Id: I681eaea9dfccaef5c0f003c2cef7721539f7328c
2018-11-28 02:22:50 -08:00
Lucas Lin
023c12cf58 Merge "Update LinkProperties to NetworkAgentInfo only when it's changed" 2018-11-28 09:57:48 +00:00
lucaslin
34cd39435a Update LinkProperties to NetworkAgentInfo only when it's changed
In previous design, it will always assign newLp to nai in
handleUpdateLinkProperties(). And Private dns configuration
will be missing when the same LinkProperties are updated
because the updated LinkProperties is not assigned back to
NetworkAgentInfo.

Bug: 118518971
Test: 1.Build pass.
      2.runtest frameworks-net

Change-Id: I405c8f29497fec438082a2cf30eb5c7b9497e1c4
2018-11-28 06:16:38 +00:00
Luke Huang
10786db8bb Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl
Stable aidl won't support FileDescriptor but ParcelFileDescriptor.
In order to migrate to stable aidl, replace all FileDescriptor in
INdetd.aidl.

Test: runtest frameworks-net passes
Change-Id: Icdf37aed0e0cce0352070a437066e77c0f2fd85a
2018-11-28 13:41:58 +08:00
Chiachang Wang
29429e97eb Merge "Data stall detection using DNS event"
am: 6db57bece3

Change-Id: I4b5248e97028bf8e9e837ff5ccf8e0d3138f7b05
2018-11-27 20:09:03 -08:00