Commit graph android_packages_modules_Co.../framework
Message SHA1
Merge "Update PrivateDnsMode from StringDef to IntDef"
Lucas Lin   authored and   Gerrit Code Review   commited 2021-05-12 17:09:50 +00:00
a23e55da49
Merge "Allow any transport with TEST if the network is restricted"
Chalard Jean   authored and   Gerrit Code Review   commited 2021-05-12 13:57:31 +00:00
6e80f1c182
Merge "Use jniThrowErrnoException from JNIHelp"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-05-12 13:12:32 +00:00
25a08f056f
Merge "Move NetworkUtils JNI out of core/jni"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-05-12 13:12:09 +00:00
954385ffac
Merge "Build framework-connectivity using module_current"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-05-12 13:11:22 +00:00
eb0961067e
Merge "Rename unwanted capabilities to forbidden capabilities."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-05-12 09:00:17 +00:00
0d942e81c7
Merge "Emphasize possibility of multiple networks with same transport"
David Su   authored and   Gerrit Code Review   commited 2021-05-11 15:51:28 +00:00
cf514f511d
Use jniThrowErrnoException from JNIHelp
Use the jniThrowErrnoException that is available in JNIHelp, instead of
reimplementing in NetworkUtils.

Bug: 179229316
Test: device boots and has connectivity
Merged-In: I257a9d55ce1f5a7c588e209b4a89d3e7a3e09994

Change-Id: I257a9d55ce1f5a7c588e209b4a89d3e7a3e09994

Remi NGUYEN VAN   commited 2021-05-11 14:18:27 +00:00
62c5136e00
Move NetworkUtils JNI out of core/jni
Keep the utilities included via a library, but move them out of
core/jni, and prepare a library to package them together with
framework-connectivity.

Also remove unnecessary dependencies in framework-connectivity.

Bug: 171540887
Test: device boots and has connectivity

Merged-In: I0b55dfe92f3cb6e848d79ac7953756f39aaa2597

Change-Id: I0b55dfe92f3cb6e848d79ac7953756f39aaa2597

Remi NGUYEN VAN   commited 2021-05-11 13:02:39 +00:00
1fd558efee
Build framework-connectivity using module_current
framework-connectivity needs to build only against stable APIs.

Bug: 171540887
Test: m framework-connectivity.impl
Merged-In: I2d51d37d067bf6fe86e4dedf05855a2dd67ed57c

Change-Id: I2d51d37d067bf6fe86e4dedf05855a2dd67ed57c

Remi NGUYEN VAN   commited 2021-05-11 13:00:42 +00:00
e4d51c9710
Rename unwanted capabilities to forbidden capabilities.
Addresses API council feedback.

Bug: 184890428
Test: atest FrameworksNetTests CtsNetTestCases
Test: atest CtsNetTestCasesLatestSdk:NetworkCapabilitiesTest on R device
Change-Id: Id7c68fbf56ee08fcad8e8e3aacf037fa1885936b

Lorenzo Colitti   commited 2021-05-11 17:46:13 +09:00
395fafb54f
Allow any transport with TEST if the network is restricted
This will allow CTS to add the WIFI transport and others,
letting them test a number of essential features of the
ranking algorithm.
It's relatively safe because restricted networks can never
become the default, and NOT_RESTRICTED is a default
capability so very few apps would be affected by the shell
creating such a network.

Bug: 184037351
Test: NetworkScoreTest (which is under review)
Change-Id: I21055dc613fead6130adc2122f2cdd0af9b49adf

Chalard Jean   commited 2021-05-11 15:42:10 +09:00
778c86525b
Update PrivateDnsMode from StringDef to IntDef
Update PrivateDnsMode from StringDef to IntDef because IntDef is
the normal way of representing multiple choices in public API.
Also update other related files.

Bug: 185311744
Test: 1. make update-api
      2. atest FrameworksNetTests CtsNetTestCases CtsNetTestCasesLatestSdk
      3. atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I23e7ec140066979726d769cabc5f7057bb2167e6
Merged-In: I23e7ec140066979726d769cabc5f7057bb2167e6
    (Cherry-picked from ag/14227609)

lucaslin   authored and   Lucas Lin   commited 2021-05-05 03:19:51 +00:00
57f9ba8b40
Merge "Add doc to getNetworkCapabilities"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-05-03 03:16:24 +00:00
59d89299c9
Add doc to getNetworkCapabilities
Test: doc-only change
Fixes: 158092418
Change-Id: Ic20fb55e1bdd4e836468794d1f86d3e9d0bc5965

Chalard Jean   commited 2021-04-30 11:24:00 +00:00
070bdd4b77
Merge "Rename getAllNetworkStateSnapshot which should be pluralized"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-29 04:40:51 +00:00
984e51670e
Merge "Address API review feedback"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-04-26 00:22:27 +00:00
5e2a729668
Address API review feedback
Address API review feedback to:
 - Rename NetworkAgent#setTeardownDelayMs to
   NetworkAgent#setTeardownDelayMillis
 - Use getters instead of fields in VpnTransportInfo
 - Rename registerDefaultNetworkCallbackAsUid to
   registerDefaultNetworkCallbackForUid in ConnectiivityManager

Bug: 183972850
Bug: 185246410
Fix: 184735863
Test: make update-api
Test: atest FrameworksNetTests
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I5e8c4bed8bda40d507afa894c359b5e24ee5d868
Merged-In: I5e8c4bed8bda40d507afa894c359b5e24ee5d868

Chiachang Wang   commited 2021-04-23 02:46:05 +00:00
9075ae36be
Rename getAllNetworkStateSnapshot which should be pluralized
Address API review feedback, ConnectivityManager#getAllNetworkStateSnapshot
should be pluralized so rename the method to getAllNetworkStateSnapshots

(cherry picked from ag/14221105)
Bug: 183972554
Test: make, FrameworksNetTests
      FrameworksServicesTests
Merged-In: Ic18d17d05984fa2466c962c7843c0ef7183ce77c
Change-Id: Ic18d17d05984fa2466c962c7843c0ef7183ce77c

Aaron Huang   commited 2021-04-22 17:45:22 +08:00
da103b3365
Merge "[VCN19] Rename get/setSubIds to get/setSubscriptionIds"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-04-22 04:43:26 +00:00
19a855be79
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
[VCN19] Rename get/setSubIds to get/setSubscriptionIds
Test: atest FrameworksNetTests FrameworksVcnTests
Fix: 185215036
Merged-In: I9d90df5fc13b36d2cdc4920b456dcc87fcd2b3a7
Change-Id: I9d90df5fc13b36d2cdc4920b456dcc87fcd2b3a7
  (cherry-picked from ag/14198665)

junyulai   commited 2021-04-19 17:41:01 +08:00
651928c310
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