Commit graph android_packages_modules_Co.../framework
Message SHA1
Merge "Update mobile data preference getter/setter" am: a035d3a77c am: a7d1ee6f5e am: b6527ca6aa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702486

Change-Id: Ib55aaba8c8afc8a3152d83932bf345277bda35f9

Paul Hu   authored and   Automerger Merge Worker   commited 2021-05-13 14:53:21 +00:00
940854d668
Update mobile data preference getter/setter
To satisfy OEM's requests, setting mobile data preference
should be by uid. Thus, update the getter/setter to
return/accept set of uids that need to apply mobile data
preference.

Bug: 171872461
Test: atest FrameworksNetTests
Change-Id: Id44efd2a6d820867f4405426c91e65b9ef155898

paulhu   authored and   Paul Hu   commited 2021-05-13 10:35:29 +00:00
344c11661f
Merge "Move net unit tests to packages/Connectivity" into sc-dev
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2021-05-13 09:09:35 +00:00
20f6b445a9
Merge "Add RESTRICTED_ALLOWED_APPS setting" am: e6d2b4663e am: 7023fe8242 am: 7c3e361c2d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689208

Change-Id: I59c9ff9a64eac6b3367169450ca2c063ef34ff3c

Paul Hu   authored and   Automerger Merge Worker   commited 2021-05-13 06:36:18 +00:00
ec3209227c
Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Ignore-AOSP-First: needs per-branch move for merge conflicts
Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Remi NGUYEN VAN   commited 2021-05-13 05:55:44 +00:00
678277cc03
Add RESTRICTED_ALLOWED_APPS setting
This setting is OEM upstream requirement for third party apps
using restricted networks.

Bug: 185149952
Test: atests FrameworksNetTests
Change-Id: I5e16b46cf2935f38ee1e516bb8b85fa487cf9f61

paulhu   commited 2021-05-13 10:09:31 +08:00
69afcd51db
Merge changes from topic "transportinfo-explicit-redaction" into sc-dev
* changes:
  Immediately redact VcnTransportInfo.
  Do not automatically redact TransportInfo objects.

Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2021-05-12 22:46:36 +00:00
c7b7320f9d
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" am: 6e80f1c182 am: 5fdbf4d6de am: a6b91aafee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702489

Change-Id: Ib8ee3109ba5525ce1b1c6c2bd5ebcdc0b48a5319

Chalard Jean   authored and   Automerger Merge Worker   commited 2021-05-12 14:44:30 +00:00
18a5fac66a
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" am: cf514f511d am: ee28d79784 am: 32cee1bf1b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620459

Change-Id: I8417a8af1202c01803c61ff54363b45960af6965

David Su   authored and   Automerger Merge Worker   commited 2021-05-11 17:04:48 +00:00
b8e4a7b1e7
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
Merge "Move to renamed NDK symbol AFileDescriptor_getFd" into sc-dev
Orion Hodson   authored and   Android (Google) Code Review   commited 2021-05-11 14:31:42 +00:00
276e973b32
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
Do not automatically redact TransportInfo objects.
Currently, NetworkCapabilities always redacts the TransportInfo
objects it contains whenever a defensive copy is made. This makes
it impossible to make a defensive copy on a TransportInfo
parcelled from another process without redacting it.

Stop redacting by default; instead rely on ConnectivityService
explicitly calling NetworkCapabilities' redacting constructor
when it returns a NetworkCapabilities object to an app via a
callback or synchronous call. This is currently done by
- createWithLocationInfoSanitizedIfNecessaryWhenParceled, which
  is called from callCallbackForRequest, getNetworkCapabilities,
  and getDefaultNetworkCapabilitiesForUser.
- getNetworkCapabilitiesWithoutUids, which is used when sending
  ConnectivityDiagnosticsManager callbacks. In this method,
  unconditionally redact all information, which is what the code
  did previously due to the default redaction setting for empty
  NetworkCapabilities objects being REDACT_ALL.

Bug: 183938194
Test: atest NetworkCapabilitiesTest
Test: atest FrameworksNetTests CtsNetTestCases HostsideVpnTests
Change-Id: I3108ee94cb0930958e071ba678c3554525b0db82

Lorenzo Colitti   commited 2021-05-11 22:47:03 +09:00
5026b3ea93
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
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-08 01:48:01 +09:00
1df16c6f8f
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" am: 59d89299c9 am: 622e129d00 am: efca123280
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1690668

Change-Id: I0c41878350ffe4015fe9e6034651f50366503dfe

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-05-03 04:06:34 +00:00
2e3d79675b
Merge "Add doc to getNetworkCapabilities"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-05-03 03:16:24 +00:00
59d89299c9
Move to renamed NDK symbol AFileDescriptor_getFd
Bug: 185256332
Test: TH
Change-Id: Ic13f1d9832d5ae5b6ae4b96323025d9b695fdaf9

Orion Hodson   commited 2021-04-30 17:48:03 +01:00
a1a2ccb8d7
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
Remove EXTRA_PROXY_INFO.
This has been deprecated since M because it very error-prone, and
there are documented replacements.

Test: m
Bug: 171872228
Change-Id: Ide9846a26fc440b3ec5b4e4b444a046e738de3d6

Lorenzo Colitti   commited 2021-04-27 20:01:22 +09:00
9c0095c9e7
Merge "Address API review feedback"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-04-26 00:22:27 +00:00
5e2a729668
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

lucaslin   commited 2021-04-23 21:03:39 +08:00
57ee606244
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
Merge "Address API review feedback" into sc-dev
Chiachang Wang   authored and   Android (Google) Code Review   commited 2021-04-23 00:30:51 +00:00
6f7ac6860e
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" am: ed05115dca am: b91719b526 am: 662285d428
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683015

Change-Id: I6ecdb60e530807c8a93f2709784cf1b5814a2178

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-21 15:21:59 +00:00
7d6e4fb193
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" am: f78aabbf82 am: db0c8c32b1 am: 7663d1760d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1681465

Change-Id: I9eb3c2543787a91f211be5eb7b92b66fe696489f

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-04-21 09:19:13 +00:00
9eea7b3d09
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
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
Test: atest FrameworksMockingServicesTests
Change-Id: I5e8c4bed8bda40d507afa894c359b5e24ee5d868

Chiachang Wang   commited 2021-04-20 09:30:59 +00:00
c7d203dfcb
Merge "Rename getAllNetworkStateSnapshot which should be pluralized" into sc-dev
Aaron Huang   authored and   Android (Google) Code Review   commited 2021-04-19 16:42:58 +00:00
7f852c082d
[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
Rename getAllNetworkStateSnapshot which should be pluralized
Address API review feedback, ConnectivityManager#getAllNetworkStateSnapshot
should be pluralized so rename the method to getAllNetworkStateSnapshots

Bug: 183972554
Test: make, FrameworksNetTests
      FrameworksServicesTests
Change-Id: Ic18d17d05984fa2466c962c7843c0ef7183ce77c

Aaron Huang   commited 2021-04-17 14:08:49 +08:00
ab615e5c03
Merge "[VCN20] Change requestBackgroundNetwork argument order"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-04-16 16:04:31 +00:00
c8499660b2
Merge "[VCN19] Rename get/setSubIds to get/setSubscriptionIds" into sc-dev
Junyu Lai   authored and   Android (Google) Code Review   commited 2021-04-16 15:59:16 +00:00
05614b419a
Merge "Don't expose raw IBinder APIs." am: 6f68764bf2 am: c0c07c1b57 am: 15f9321d90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: Ic45558c739cfb065e5c9d6fb5ebf485ceb9a630f

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-04-16 08:48:41 +00:00
5caa63278d