Commit graph

12,793 commits

Message SHA1
Merge "Remove Network, NetworkRequest metrics from jobscheduler" am: 77d6e7b0ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1666841

Change-Id: I3770e6f3b146c47fa5b20dcd09e2bbd0fd69cbdf

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-04-08 02:43:55 +00:00
9b87bcb32d
Merge "Remove Network, NetworkRequest metrics from jobscheduler"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-04-08 02:27:05 +00:00
77d6e7b0ba
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

Paul Hu   authored and   Automerger Merge Worker   commited 2021-04-08 01:56:44 +00:00
d16a01546f
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
164c97d0be
Merge "Expose constants of ConnectivityManager" am: 62967ab5d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579805

Change-Id: I0e3930444640a8bff7b0f9846cd2ce0e92df8d6f

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-07 10:42:47 +00:00
cf22e5a521
Merge "Expose constants of ConnectivityManager"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-07 10:11:06 +00:00
62967ab5d5
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
4892f26bb8
Merge "Split networkDestroy() and destroyNetworkCache()" am: a544e4b417
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554020

Change-Id: I517e242589fa979826c65817d5918ce05ced9866

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-07 05:40:17 +00:00
d9002eac4f
Merge "Split networkDestroy() and destroyNetworkCache()"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-07 05:05:46 +00:00
a544e4b417
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

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-04-07 04:56:41 +00:00
7f5c1bc46c
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
d125112aa2
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
fe5e81000c
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
7dd2a3d7db
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

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-07 01:16:24 +00:00
938579f701
Merge "ConnectivityManager: Address review comments from aosp/1595396"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-07 00:36:27 +00:00
7fe967c611
Merge "NetworkCapabilities: Hide copy constructor" am: 516de2b183
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1664151

Change-Id: I4e3b8ca8158102bf71b6ab2ca796bdfeeedd7d55

Roshan Pius   authored and   Automerger Merge Worker   commited 2021-04-06 16:49:29 +00:00
5a76723653
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
f75ffaaded
Merge "NetworkCapabilities: Hide copy constructor"
Roshan Pius   authored and   Gerrit Code Review   commited 2021-04-06 15:57:47 +00:00
516de2b183
Merge "Add session ID to VpnTransportInfo" am: 133733bdd2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652218

Change-Id: I736118ea676708ef6630d2153a3986459b31850c

Frank Li   authored and   Automerger Merge Worker   commited 2021-04-06 07:01:12 +00:00
dc50757d4d
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

Ken Chen   authored and   Automerger Merge Worker   commited 2021-04-06 06:55:39 +00:00
bd83b9f1d6
Merge "Add session ID to VpnTransportInfo"
Frank Li   authored and   Gerrit Code Review   commited 2021-04-06 06:50:48 +00:00
133733bdd2
Merge "Cleanup setGlobalProxy" am: 0656c4314c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640148

Change-Id: I0052f30d52f00f40b933eb1573b1a0de37e9cba2

Chalard Jean   authored and   Automerger Merge Worker   commited 2021-04-06 06:50:15 +00:00
42fbe21e61
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
46b0f02e22
Merge "Cleanup setGlobalProxy"
Chalard Jean   authored and   Gerrit Code Review   commited 2021-04-06 06:19:01 +00:00
0656c4314c
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

James Mattis   authored and   Automerger Merge Worker   commited 2021-04-06 04:50:32 +00:00
08119d7700
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

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-06 04:47:21 +00:00
1ca675172c
Merge "Adding per-app support for app add/remove"
James Mattis   authored and   Gerrit Code Review   commited 2021-04-06 04:35:37 +00:00
922249e2bb
Merge "Downgrade the log level of exception log"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-06 04:01:59 +00:00
7faee617b9
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
5d1c4661da
Downgrade the log level of exception log
This exception log is usually printed when the device connects to
a wifi. The cause is that when the device connects to a wifi,
wifi will send CONNECTING state first, then CONNECTED state.
And in CONNECTING state, wifi will send the LinkProperties to
ConnectivityService and ConnectivityService will try to update
that LinkProperties(including interface) to netd. But the netid
hasn't set to netd yet before wifi CONNECTED, so this exception
log will be printed.
There is no really issue in this case, so downgrade the log level
might be a better thing for all Android developer.

Bug: 181269159
Test: m
Change-Id: I61c09352225a610fcd6d3dd33b782ee114c35fc5

lucaslin   authored and   Lucas Lin   commited 2021-04-06 02:02:50 +00:00
3967e5f614
Merge "Remove unstable IpPrefix" am: 3f6415a2f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662674

Change-Id: I7517ae6cefa96ee3ca38fbcca36970677cb6469b

Steven Moreland   authored and   Automerger Merge Worker   commited 2021-04-05 22:37:44 +00:00
2babf25cf0
Merge "Remove unstable IpPrefix"
Steven Moreland   authored and   Gerrit Code Review   commited 2021-04-05 21:59:47 +00:00
3f6415a2f5
Adding per-app support for app add/remove
Adding support for per-app network functionality to react to application
installs, removals and updates. Also, opportunistic cleanup of a couple
annotations.

Bug: 177092163
Bug: 176494815
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I45acbd0d2ef50d575f14a944ce82b185ed69f219

James Mattis   commited 2021-04-05 09:55:44 -07:00
bd275dcf3d
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
f458be1093
Merge "Fix broken testCaptivePortalApp" am: 5110c6dad6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1659999

Change-Id: I7a77b050fd844f76e4f7aafa319017382ac06602

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-05 13:44:51 +00:00
0fa2dde613
Merge "Fix broken testCaptivePortalApp"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-05 13:05:41 +00:00
5110c6dad6
Merge "Fix a bug where the wrong profile is queried" am: 167cc4a044
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662362

Change-Id: Id60b4897a749136010f00d5ede018991b54c7b70

Chalard Jean   authored and   Automerger Merge Worker   commited 2021-04-05 06:35:20 +00:00
92bbfaf0a2
Merge "Fix a bug where the wrong profile is queried"
Chalard Jean   authored and   Gerrit Code Review   commited 2021-04-05 05:48:17 +00:00
167cc4a044
Merge "Downgrade list of subIds in NetworkCapabilities to @SystemApi" am: 87e0ab8905
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652974

Change-Id: I4dc51bf65af853a7510586169caa12b083c2f94b

Benedict Wong   authored and   Automerger Merge Worker   commited 2021-04-02 23:10:21 +00:00
d5af88a835
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
87e0ab8905
Merge "API to get network visible network capability name" am: 129857619f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653200

Change-Id: I7f8b909ec061d8bb875ff2688e2fb9a4cea54318

Sarah Chin   authored and   Automerger Merge Worker   commited 2021-04-02 17:45:29 +00:00
7d29a97aa8
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
129857619f
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
aac3b872ea
Fix broken testCaptivePortalApp
This was broken by aosp/1657763, only on eng builds because
of a wtf. The root cause of the issue is that the test is
acquiring MAINLINE_NETWORK_STACK after it registers a callback
but before in unregisters it. After aosp/1657763, the objects
keeping track of callbacks are separate for processes with and
without MAINLINE_NETWORK_STACK, which means the removal is
looked up in a different counter.

Solve this by having the NRI remember the relevant counter
keeping track of it.

Bug: none
Test: testCaptivePortalApp
Change-Id: I566a28522fa68be9cc2bdb4624b588b4f01d3b7e

Chalard Jean   commited 2021-04-02 20:18:18 +09:00
70b2d9ac2f
Fix a bug where the wrong profile is queried
UserManager#isManagedProfile() is not aware of the user
handle of the context the UM instance is created on.
Instead, call isManagedProfile(int).

Bug: 183625645
Test: ConnectivityServiceTest
Change-Id: I1fef22d67d75df25a8c2d0694f857c3e1c1a1306

Chalard Jean   commited 2021-04-02 19:24:44 +09:00
0a04bdb730
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
4310e45eff
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
0fb772f6df
Merge "Move some constants from TrafficStatsConstants to NetworkStackConstants" am: 5c520a3650
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625861

Change-Id: I1a21497634c2ee53abfca8dea4b8bab40cf28b3a

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-04-01 16:25:44 +00:00
348a73f1f0
Merge "Move some constants from TrafficStatsConstants to NetworkStackConstants"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-04-01 15:59:39 +00:00
5c520a3650
Merge "Expose BIP and VSIM relavent definitions" am: 55a22edbab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652223

Change-Id: I1e9d92cd27fc0dcd84cc62ad7c2a591c9f5a54e5

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-04-01 12:26:04 +00:00
f73b66fadf