Commit Graph

12814 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
dcd39e81a6 Merge "Improve documentation on simulateDataStall" am: faf00d43b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669505

Change-Id: Idc8f1f13e8b0553cda6f242b95ea72f79f54b9b5
2021-04-09 01:17:31 +00:00
Remi NGUYEN VAN
592ff78b65 Merge "Set ParseException constructors as public" am: 4abe99e563
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669051

Change-Id: I418a1682eb64b2b54defa37ce12ffdf5aa805b64
2021-04-09 01:13:41 +00:00
Remi NGUYEN VAN
4c1a04c308 Merge "Replace fields with getters in keepalive API" am: bc01e88edc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669345

Change-Id: I339284a9f509d970a8c20f4738e42b25ca05c28c
2021-04-09 01:11:20 +00:00
Remi NGUYEN VAN
2e4fce8669 Merge "Add RequiresPermission to TestNetworkManager" am: 94c8957576
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669187

Change-Id: I3ea1379e439a1dfda99e9332275ea38efed86f4f
2021-04-09 01:08:42 +00:00
Remi NGUYEN VAN
1474024e59 Merge "Replace IS_DEBUGGABLE with isDebuggable module API" am: 793d607d75
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667304

Change-Id: I52e7aaca589eefb385cec78bf4372922d8089018
2021-04-09 01:05:40 +00:00
Remi NGUYEN VAN
e9aecbb5d2 Merge "Use String in CaptivePortalData underlying types" am: 4e34417eec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644997

Change-Id: If054ef1739a273e4a203be44675d3b410784dedf
2021-04-09 01:00:10 +00:00
Remi NGUYEN VAN
faf00d43b9 Merge "Improve documentation on simulateDataStall" 2021-04-09 00:21:34 +00:00
Remi NGUYEN VAN
4abe99e563 Merge "Set ParseException constructors as public" 2021-04-09 00:20:33 +00:00
Remi NGUYEN VAN
bc01e88edc Merge "Replace fields with getters in keepalive API" 2021-04-09 00:20:13 +00:00
Remi NGUYEN VAN
94c8957576 Merge "Add RequiresPermission to TestNetworkManager" 2021-04-09 00:19:51 +00:00
Remi NGUYEN VAN
793d607d75 Merge "Replace IS_DEBUGGABLE with isDebuggable module API" 2021-04-09 00:19:19 +00:00
Remi NGUYEN VAN
4e34417eec Merge "Use String in CaptivePortalData underlying types" 2021-04-09 00:17:59 +00:00
James Mattis
0cc8a225ac Merge "Adding OEM Network Preferences for testing" am: 9e1bc22ce5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1659163

Change-Id: I14a27b3b9e7dad67fe9ca275527926e63d465b9a
2021-04-08 21:29:36 +00:00
James Mattis
9e1bc22ce5 Merge "Adding OEM Network Preferences for testing" 2021-04-08 20:51:05 +00:00
Remi NGUYEN VAN
58df155b9d 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
2021-04-08 08:23:20 +00:00
Remi NGUYEN VAN
5738b86274 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
2021-04-08 16:30:25 +09:00
Remi NGUYEN VAN
6671f42bef Add RequiresPermission to TestNetworkManager
All API methods in TestNetworkManager require the MANAGE_TEST_NETWORKS
permission.

Fixes: 183972672
Test: m
Change-Id: Ic5929c24ea88d7259d367a81fec8f223a2e3ecb0
2021-04-08 16:12:23 +09:00
Remi NGUYEN VAN
da39ab14ce 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
2021-04-08 15:57:31 +09:00
Remi NGUYEN VAN
029a0cff8a 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
2021-04-08 14:06:53 +09:00
Remi NGUYEN VAN
53e0271281 Replace IS_DEBUGGABLE with isDebuggable module API
Introduce a Build.isDebuggable() getter instead of the IS_DEBUGGABLE
static member.

Also make it module API as APK modules now have access to module APIs in
S, but also TestApi so it can be tested.

Test: m
Fixes: 182345786
Change-Id: I25d0848aee758792bbaba8ab73b5dd997a7250b3
2021-04-08 13:50:31 +09:00
Aaron Huang
9b87bcb32d Merge "Remove Network, NetworkRequest metrics from jobscheduler" am: 77d6e7b0ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1666841

Change-Id: I3770e6f3b146c47fa5b20dcd09e2bbd0fd69cbdf
2021-04-08 02:43:55 +00:00
Aaron Huang
77d6e7b0ba Merge "Remove Network, NetworkRequest metrics from jobscheduler" 2021-04-08 02:27:05 +00:00
Paul Hu
d16a01546f Merge "Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager" am: ed4117ff40
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667080

Change-Id: I4f180fc6e083b21d089dc15881e89a021557635a
2021-04-08 01:56:44 +00:00
paulhu
164c97d0be 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
2021-04-07 19:40:47 +08:00
Treehugger Robot
cf22e5a521 Merge "Expose constants of ConnectivityManager" am: 62967ab5d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579805

Change-Id: I0e3930444640a8bff7b0f9846cd2ce0e92df8d6f
2021-04-07 10:42:47 +00:00
Treehugger Robot
62967ab5d5 Merge "Expose constants of ConnectivityManager" 2021-04-07 10:11:06 +00:00
lucaslin
4892f26bb8 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
2021-04-07 09:13:46 +00:00
Treehugger Robot
d9002eac4f Merge "Split networkDestroy() and destroyNetworkCache()" am: a544e4b417
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554020

Change-Id: I517e242589fa979826c65817d5918ce05ced9866
2021-04-07 05:40:17 +00:00
Treehugger Robot
a544e4b417 Merge "Split networkDestroy() and destroyNetworkCache()" 2021-04-07 05:05:46 +00:00
Chiachang Wang
7f5c1bc46c Merge "Assign the bit calculation as long to prevent overflow" am: d125112aa2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1664307

Change-Id: I548347851e102f81cd13516a6a409e74c59859f4
2021-04-07 04:56:41 +00:00
Chiachang Wang
d125112aa2 Merge "Assign the bit calculation as long to prevent overflow" 2021-04-07 04:24:46 +00:00
Aaron Huang
fe5e81000c 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
2021-04-07 12:22:57 +08:00
Chiachang Wang
7dd2a3d7db 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
2021-04-07 02:06:33 +00:00
Treehugger Robot
938579f701 Merge "ConnectivityManager: Address review comments from aosp/1595396" am: 7fe967c611
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1633279

Change-Id: I6653d668d1fdc4370f8d5db1da41214b9755bb4d
2021-04-07 01:16:24 +00:00
Treehugger Robot
7fe967c611 Merge "ConnectivityManager: Address review comments from aosp/1595396" 2021-04-07 00:36:27 +00:00
Roshan Pius
5a76723653 Merge "NetworkCapabilities: Hide copy constructor" am: 516de2b183
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1664151

Change-Id: I4e3b8ca8158102bf71b6ab2ca796bdfeeedd7d55
2021-04-06 16:49:29 +00:00
Roshan Pius
f75ffaaded ConnectivityManager: Address review comments from aosp/1595396
Bug: 156867433
Test: atest android.net
Test: atest com.android.server
Change-Id: I7f5d043732ae22edd14bf581b7dc676c9236b545
2021-04-06 16:42:51 +00:00
Roshan Pius
516de2b183 Merge "NetworkCapabilities: Hide copy constructor" 2021-04-06 15:57:47 +00:00
Frank Li
dc50757d4d Merge "Add session ID to VpnTransportInfo" am: 133733bdd2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652218

Change-Id: I736118ea676708ef6630d2153a3986459b31850c
2021-04-06 07:01:12 +00:00
Ken Chen
bd83b9f1d6 Merge "Downgrade DNS fail message from Error to Warning" am: 46b0f02e22
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662360

Change-Id: Ife7da1c0494d24e140ea9fdc64f7018340cc3e40
2021-04-06 06:55:39 +00:00
Frank Li
133733bdd2 Merge "Add session ID to VpnTransportInfo" 2021-04-06 06:50:48 +00:00
Chalard Jean
42fbe21e61 Merge "Cleanup setGlobalProxy" am: 0656c4314c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640148

Change-Id: I0052f30d52f00f40b933eb1573b1a0de37e9cba2
2021-04-06 06:50:15 +00:00
Ken Chen
46b0f02e22 Merge "Downgrade DNS fail message from Error to Warning" 2021-04-06 06:35:04 +00:00
Chalard Jean
0656c4314c Merge "Cleanup setGlobalProxy" 2021-04-06 06:19:01 +00:00
James Mattis
59e85baf63 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
2021-04-05 21:51:09 -07:00
James Mattis
08119d7700 Merge "Adding per-app support for app add/remove" am: 922249e2bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1633904

Change-Id: I8f17e1a2a7e920cb1d49fe66d06728714580ef76
2021-04-06 04:50:32 +00:00
Treehugger Robot
1ca675172c Merge "Downgrade the log level of exception log" am: 7faee617b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1660002

Change-Id: Ic9d45e57e3ffc224670d85e4e09e02a4e134987f
2021-04-06 04:47:21 +00:00
James Mattis
922249e2bb Merge "Adding per-app support for app add/remove" 2021-04-06 04:35:37 +00:00
Treehugger Robot
7faee617b9 Merge "Downgrade the log level of exception log" 2021-04-06 04:01:59 +00:00
Ken Chen
5d1c4661da 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
2021-04-06 02:30:56 +00:00