Commit graph android_packages_modules_Co.../framework
Message SHA1
Merge "Do not deduce VCN capability if Builder is derived from request"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-21 14:06:14 +00:00
ed05115dca
Do not deduce VCN capability if Builder is derived from request
If the caller constructed the builder from a request, it means
the user might explicitly want the capabilities from the request.
Thus, the NOT_VCN_MANAGED capabilities should not be touched
later.

Test: TH
Fix: 185876442
Change-Id: I92037cc8547fb72de12d6b6402f060f6c98e1853

junyulai   commited 2021-04-21 19:10:28 +08:00
aab5a92321
Merge "Add the related extra information in the javadoc"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-21 08:22:43 +00:00
f78aabbf82
Add the related extra information in the javadoc
Bug: 185876442
Test: make docs
Change-Id: Ib0abc43e2009dbf5ee7b6c2a076424834d3d53f2

lucaslin   commited 2021-04-21 10:43:15 +08:00
8bee2fd622
Merge "[VCN20] Change requestBackgroundNetwork argument order"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-04-16 16:04:31 +00:00
c8499660b2
Merge "Don't expose raw IBinder APIs."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-04-16 07:22:13 +00:00
6f68764bf2
[VCN20] Change requestBackgroundNetwork argument order
Test: atest FrameworksNetTests FrameworksVcnTests
Fix: 185215095
Merged-In: Id281678fe85ce0894b0e92e11c0283d4d1b4ecdb
Change-Id: Id281678fe85ce0894b0e92e11c0283d4d1b4ecdb
  (cherry-picked from ag/14198667)

junyulai   commited 2021-04-16 00:16:21 +08:00
8c8ac36d9a
Don't expose raw IBinder APIs.
APIs should not expose raw IBinder objects.

Fix: 184735751
Test: builds, boots
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCases:android.net.cts.DnsResolverTest
Change-Id: Ia0c4170def31123f0b79318fec2cfe02e4fcd3bf

Lorenzo Colitti   commited 2021-04-15 18:47:21 +09:00
12bcbe5efa
Remove hidden method link in public addRoute API
The build will complain after moving connectivity framework code
outside framework because the hidden methods/members accesses are
not allowed anymore. Link to a hidden class will not work since
it's not visible in public.

Bug: 182859030
Test: make docs
Change-Id: I5726f80be7cf92b648ce851d9601d5f58bc2b647

Chiachang Wang   commited 2021-04-15 16:21:00 +08:00
7ceeabe0da
Add @RedactionType annotations to VpnTransportInfo.
This is in response to API council feedback.

Test: m
Bug: 185226718
Change-Id: I63d7249e7d14ac00558f311a3583f6adbf80e3d9

Lorenzo Colitti   commited 2021-04-14 00:28:19 +09:00
a34d4892a4
Merge "Make getUid a method on UserHandle itself instead of static"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-04-13 08:15:47 +00:00
9500ca6b5f
Merge "Rename APIs in NetworkAgentConfig.Builder"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-04-12 14:10:46 +00:00
f212a922e9
Rename APIs in NetworkAgentConfig.Builder
As API review feedback, rename disableProvisioningNotification()
to setEnabledProvisioningNotification and disableNat64Detection()
to setEnabledNat64Detection. Also, update code in caller side
accordingly.

Bug: 184735772
Test: make update-api ; atest FrameworksNetTests
Change-Id: If7305634863d1503c967e5593ebd0c8af2174bea

Chiachang Wang   commited 2021-04-12 17:27:47 +08:00
f5324d7d03
Remove TcpRepairWindow from module-lib API
Both TcpRepairWindow and TcpKeepaliveController(user) are in the
connectivity module, so TcpRepairWindow doesn't need to be
the module-lib API. Thus, remove TcpRepairWindow from
module-lib API.

Bug: 172183305
Test: m update-api
Change-Id: I8fde726f8ad73637e6deab69ea83b3699bb2cf45

paulhu   commited 2021-04-12 14:26:55 +08:00
c3663377e7
Make getUid a method on UserHandle itself instead of static
This commit addresses the API review feedback that getUid()
will be better to make it be a method on UserHandle itself
rather than a static method.

Update as it is and update the corresponding usages.

Fix: 184735865
Test: make update-api
Test: atest FrameworksNetTests
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I33844309224d84764704255d251fadc8940202ca

Chiachang Wang   commited 2021-04-09 08:33:07 +08:00
1091a06338
Merge "Improve documentation on simulateDataStall"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-04-09 00:21:34 +00:00
3b4f0832bd
Merge "Set ParseException constructors as public"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-04-09 00:20:33 +00:00
a2a324f843
Merge "Replace fields with getters in keepalive API"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-04-09 00:20:13 +00:00
445fd7e9d9
Merge "Add RequiresPermission to TestNetworkManager"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-04-09 00:19:51 +00:00
58a22b1d8f
Merge "Use String in CaptivePortalData underlying types"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-04-09 00:17:59 +00:00
55d93ddb7e
Merge "Adding OEM Network Preferences for testing"
James Mattis   authored and   Gerrit Code Review   commited 2021-04-08 20:51:05 +00:00
ee638e2670
Use String in CaptivePortalData underlying types
The venue friendly name comes from the network, and only plain strings
should be used in practice. writeCharSequence is also not usable in
CaptivePortalData, as it must build using module_api.

Use a String as the underlying type in CaptivePortalData, keeping
CharSequence in the API for consistency with UI-related elements.

This brings CaptivePortalData in line with downstream branches.

Bug: 183174863
Test: atest FrameworksNetTests
Merged-In: Ifa3ea9aae0cabf5757791c4ae13e6f551759ed97
Change-Id: Ic662d3b546d52f825f9c3a24c5e0d4ba03818ab0

Remi NGUYEN VAN   commited 2021-04-08 08:23:20 +00:00
495d9ba693
Improve documentation on simulateDataStall
Explain that:
 - The method does not cause an actual data stall.
 - The detectionMethod parameter refers to
   ConnectivityDiagnosticsManager.DataStallReport constants (which
   already use an IntDef).
 - timestampMillis is relative to SystemClock.elapsedRealtime.

Fixes: 183972768
Test: m
Change-Id: I2eeb79e0e8ec6e8fd3b8fe1dcb1abbf2e6338983

Remi NGUYEN VAN   commited 2021-04-08 16:30:25 +09:00
564f7f8df3
Add RequiresPermission to TestNetworkManager
All API methods in TestNetworkManager require the MANAGE_TEST_NETWORKS
permission.

Fixes: 183972672
Test: m
Change-Id: Ic5929c24ea88d7259d367a81fec8f223a2e3ecb0

Remi NGUYEN VAN   commited 2021-04-08 16:12:23 +09:00
c5174c3c10
Set ParseException constructors as public
As there is no strong reason to keep the constructors module-lib, set
them as public API.
This is in response to API feedback.

Fixes: 183446251
Test: m
Change-Id: I01daa6f6f8095f7a4db94d1ca05f913166939df3

Remi NGUYEN VAN   commited 2021-04-08 15:57:31 +09:00
84a217a6ef
Replace fields with getters in keepalive API
General guidance is to have getters in the API instead of fields.

Fixes: 181014882
Test: m
Change-Id: Id4bfc447701e8d0380163047779fbba043f17b6f

Remi NGUYEN VAN   commited 2021-04-08 14:06:53 +09:00
019b0eef3c
Merge "Remove Network, NetworkRequest metrics from jobscheduler"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-04-08 02:27:05 +00:00
40a440f0dc
Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager
- As API review feedback, move ACTION_CLEAR_DNS_CACHE form Intent
  to ConnectivityManager.

- Rename to "android.net.action.CLEAR_DNS_CACHE" because of lint
  suggestion.
frameworks/base/packages/Connectivity/framework/src/android/net/
ConnectivityManager.java:449: error: Inconsistent action value;
expected `android.net.action.CLEAR_DNS_CACHE`, was
`android.intent.action.CLEAR_DNS_CACHE` [ActionValue]

Bug: 183937999
Test: atest FrameworksNetTests
Test: atest ActivityTaskManagerServiceTests
Test: atest android.permission2.cts.PermissionPolicyTest
Test: atest CtsNetTestCases
Change-Id: Iae8aa0ba10dfc7581f0cfaab82643edbee789e2f

paulhu   commited 2021-04-07 19:40:47 +08:00
b49c8425b2
Merge "Expose constants of ConnectivityManager"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-07 10:11:06 +00:00
cb20318619
Expose constants of ConnectivityManager
The callers cannot call the hidden APIs after ConnectivityManager
became a part of mainline module, so expose them for callers.
Also change the value of ACTION_PROMPT_PARTIAL_CONNECTIVITY,
ACTION_PROMPT_LOST_VALIDATION and ACTION_PROMPT_UNVALIDATED because
of API lint errors.

Bug: 172183305
Test: Check private DNS settings is normal, and test NO_INTERNET
      notification can be shown normally.
Change-Id: I715c766ad8e5eb54f4dc67239c1dbca7239506fc
Merged-In: I715c766ad8e5eb54f4dc67239c1dbca7239506fc

lucaslin   authored and   Chiachang Wang   commited 2021-04-07 09:13:46 +00:00
d89b2980df
Merge "Assign the bit calculation as long to prevent overflow"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-04-07 04:24:46 +00:00
1122a53585
Remove Network, NetworkRequest metrics from jobscheduler
These metrics are deprecated so remove them from jobscheduler.
Also remove dumpDebug method from Network, NetworkRequest and
NetworkCapabilities because there's no caller anymore.

This change also for connectivity mainline module. These
three classes are inculded in framework-connectivity so
external module cannot have dependencies on its hidden API.
With this change, the dependencies can be removed.

(cherry-picked from ag/13959431)
Bug: 178777253
Test: FrameworksNetTests
      JobStoreTest
      adb shell dumpsys jobscheduler --proto
      CtsIncidentHostTestCases:JobSchedulerIncidentTest
Merged-In: Ie0c540303ba06b8fba029d2b98ae753afb08c963
Change-Id: Ie0c540303ba06b8fba029d2b98ae753afb08c963

Aaron Huang   commited 2021-04-07 12:22:57 +08:00
a35f6c23d8
Assign the bit calculation as long to prevent overflow
The value should be assigned as a long to do the bit calculation
as the mNetworkCapabilities is intended to be a long. Otherwise,
the value will be temporary assigned into an integer then
assigned to the target long. When the bit shift calculation
is out of the integer scope, the calculation will overflow and
result in unexpected bebavior.

Without assigning to a long, ConnectivityServiceTest will get
Out-Of-Memory in StringBuilder while generating toString() in
NetworkCapabilities after updating tests to verify
NET_CAPABILITY_VSIM and NET_CAPABILITY_BIP.

Bug: 130869457
Test: atest FrameworksNetTests
Change-Id: I4d34c1215c7efb6dc352c314107792e3fa512ad7

Chiachang Wang   commited 2021-04-07 02:06:33 +00:00
2b79e200c3
Merge "ConnectivityManager: Address review comments from aosp/1595396"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-07 00:36:27 +00:00
1515b6c96d
ConnectivityManager: Address review comments from aosp/1595396
Bug: 156867433
Test: atest android.net
Test: atest com.android.server
Change-Id: I7f5d043732ae22edd14bf581b7dc676c9236b545

Roshan Pius   commited 2021-04-06 16:42:51 +00:00
189d009e37
Merge "NetworkCapabilities: Hide copy constructor"
Roshan Pius   authored and   Gerrit Code Review   commited 2021-04-06 15:57:47 +00:00
fb309ae283
Merge "Add session ID to VpnTransportInfo"
Frank Li   authored and   Gerrit Code Review   commited 2021-04-06 06:50:48 +00:00
4ae4410678
Merge "Downgrade DNS fail message from Error to Warning"
Ken Chen   authored and   Gerrit Code Review   commited 2021-04-06 06:35:04 +00:00
374a06673e
Merge "Cleanup setGlobalProxy"
Chalard Jean   authored and   Gerrit Code Review   commited 2021-04-06 06:19:01 +00:00
376274c277
Adding OEM Network Preferences for testing
Added two new per-app OEM network preferences to be used only with
testing.

Although there is a tradeoff adding these preferences to
non-test code, the benefit is that it will allow testing of the OEM
network preferences app via CTS as using the shell with elevated
permissions is not an option due to the OEM network preferences API
potentially being abused. On consideration, a small amount of test code
was deemed an acceptable tradeoff if it enabled CTS testing.

Bug: 176496580
Bug: 176494815
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: Ie896a7b40945a46a352f37d2c00671da8a8f4489

James Mattis   commited 2021-04-05 21:51:09 -07:00
9189c89f52
Downgrade DNS fail message from Error to Warning
Most DNS fails are caused by network issues, like connection timed out.
Lower log severity from error to warning to conform to go/greenlog.

Test: 1. connect to a WiFi AP without WAN
      2. atest CtsNetTestCases:android.net.cts.DnsResolverTest
      3. adb logcat | grep resNetworkResult:android
Bug: 181269159
Change-Id: Ifeaf250c91a4b9123d200bd62f085c11009f2491

Ken Chen   commited 2021-04-06 02:30:56 +00:00
acbbb253f4
Merge "Remove unstable IpPrefix"
Steven Moreland   authored and   Gerrit Code Review   commited 2021-04-05 21:59:47 +00:00
184a6ce54d
NetworkCapabilities: Hide copy constructor
Only used by connectivity service, no need to mark it public.

Bug: 184537591
Test: Compiles
Change-Id: Ie0d515d73e30a4e15141a3d92aa739192badeb13

Roshan Pius   commited 2021-04-05 09:29:30 -07:00
fc3adb5ae1
Merge "Downgrade list of subIds in NetworkCapabilities to @SystemApi"
Benedict Wong   authored and   Gerrit Code Review   commited 2021-04-02 22:33:20 +00:00
42d706acfc
Merge "API to get network visible network capability name"
Sarah Chin   authored and   Gerrit Code Review   commited 2021-04-02 16:50:10 +00:00
aac4d3242a
Cleanup setGlobalProxy
This is a small cleanup of a function called by DevicePolicyManager
coming from a conflicting change. This no longer makes a concrete
difference but is still a good change.

Test: m services.devicepolicy
Bug: 172183305
Change-Id: I7ee907314ddb253eb4e97d177f0ea0ab3b58cf03

Chalard Jean   commited 2021-04-02 20:37:21 +09:00
e1ce6ae5d0
Downgrade list of subIds in NetworkCapabilities to @SystemApi
This change downgrades API visibility for the list-of-subIds in the
NetworkCapabilities to SystemApi

Bug: 175662146
Test: atest NetworkCapabilitiesTest#testSubIds
Test: atest FrameworksNetTests
Change-Id: I372fa9eaa7585aefd1710948ca007456feedd578

Benedict Wong   commited 2021-04-02 01:18:11 -07:00
5cec03468c
Remove unstable IpPrefix
Seems nothing is using this.

Bug: 183654927
Test: N/A
Change-Id: I94233d79fb5d93970b38a79a09fc4d50822c3620

Steven Moreland   commited 2021-04-01 22:59:02 +00:00
a732a85f7e
Merge "Expose BIP and VSIM relavent definitions"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-04-01 11:38:17 +00:00
5e6693605c
Merge "Move deduceRestrictedCapability to libs/net and rename it"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-04-01 11:37:51 +00:00
6098194278