Commit graph android_packages_modules_Co.../framework-t
Message SHA1
Revert "Add back getFastPairScanEnabled and setFastPairScanEnabled System API"
This reverts commit 4af0e0f784.

Reason for revert: not support the feature anymore

Test: -m
Change-Id: I26c1f1dd5f36ecb6c1386ccf6ec84118fd93017d

Xinyi Zhou   commited 2023-02-14 20:16:56 +00:00
960d69d821
Revert "Revert "Remove Fast Pair system APIs.""
This reverts commit f6f8c64989.

Reason for revert: not pass PWG review

Change-Id: Ie6c7536c45d53cc4da31811a19fff6ee23852eef
Bug: 239750900

Chun Zhang   commited 2023-02-14 16:24:37 +00:00
4aad023afb
[API] Add “ERROR_” prefix for consistency with others
Test: -m
Fix: 268195420
Ignore-AOSP-First: nearby_not_in_aosp_yet
Change-Id: Ia9b58c8d134669de36094254270547629a92192a

Xinyi Zhou   commited 2023-02-12 06:22:51 +00:00
75200b1999
Merge "Tempates with different subscriber ID should be not equal" am: 2a69e41772 am: d7bab82b9c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2422785

Change-Id: Ica5009ec31b3400422453247786cf56f22a83a4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Aaron Huang   authored and   Automerger Merge Worker   commited 2023-02-10 09:10:49 +00:00
7ec1dc69e5
Merge "Tempates with different subscriber ID should be not equal"
Aaron Huang   authored and   Gerrit Code Review   commited 2023-02-10 08:06:07 +00:00
2a69e41772
Tempates with different subscriber ID should be not equal
mSubscriberId was removed from NetworkTemplate and equals/hashCode
does not check the mMatchSubscriberIds. This will cause tempates
with different subscriber ID matching that are equal now. Thus
adding the check for mMatchSubscriberIds to fix it.

Bug: 267968247
Test: FrameworksNetTests:NetworkTemplateTest
Change-Id: I2956bf4c8cf2c4d73ebe102d53e755fbcc5d7642

Aaron Huang   commited 2023-02-10 08:04:53 +00:00
c9371d05fe
Merge "Moves all compatibility flags to ConnectivityCompatChanges.java" am: 985534c95b am: ca4ab86275
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2428795

Change-Id: I28c75a9aa435a8fb8d9d13b8dd13164ef17857bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Yuyang Huang   authored and   Automerger Merge Worker   commited 2023-02-10 02:55:46 +00:00
711c453fd4
Moves all compatibility flags to ConnectivityCompatChanges.java
ConnectivityCompatChanges.java becomes the centralized place for all the
CompatChanges used in the Connectivity module. By putting all the
CompatChanges here, we are able to manage them under a single
platform_compat_config.

Bug: 268440216
Test: atest FrameworksNetTests
Change-Id: I3e17af545718073d7d1c96e27298e7790563fd33

Yuyang Huang   commited 2023-02-09 19:51:37 +09:00
90a2cbdd8d
Merge "Rename onResolveStopped to onResolutionStopped" am: e3e9f5622b am: 7fde5f49e4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2405718

Change-Id: Ibd68cebb5926a15ac17c9953955e973534ff93ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2023-02-06 12:08:54 +00:00
fbabe92853
[API] Add more error codes
go/presence_api_u

Test: -m
Ignore-AOSP-First: nearby_not_in_aosp_yet
Fix: 265353983
Change-Id: I0c1fd8ff72c0f52189330a471b5ff5865a3446b4

Xinyi Zhou   commited 2023-02-03 23:07:21 +00:00
5f5f292cf6
[API] Add offloadOnly API
go/presence_api_u

Test: -m
Ignore-AOSP-First: nearby_not_in_aosp_yet
Bug: 265353983
Change-Id: Ib423285439ec62949ae59487081164b44f1580a6

Xinyi Zhou   commited 2023-02-01 15:11:06 -08:00
8fe45419d0
[API] Upadate queryOffloadCapability API
go/presence_api_u

Test: -m
Ignore-AOSP-First: nearby_not_in_aosp_yet
Bug: 265353983
Change-Id: Ic7e95cf0f65c3eb60d8b08d402ac56783821bac1

Xinyi Zhou   commited 2023-02-01 14:59:08 -08:00
e73c76f9c3
Rename onResolveStopped to onResolutionStopped
Rename the method onResolveStopped(NsdServiceInfo) to
onResolutionStopped(NsdServiceInfo) for consistency as API
review feedback.

Bug: 266811051
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I788b5903ecaf78a9aa960dd3b7413a22f171c72f

Paul Hu   commited 2023-01-30 08:53:15 +00:00
b2c0f3407f
Merge "New API to listen service update" am: 93587f609b am: d6cb8c860e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2369709

Change-Id: Id3beede74d6e60d4d4182e7da6da07084ca5cc06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2023-01-19 16:30:25 +00:00
247e8cefb1
New API to listen service update
Currently, the resolution is a one shot query, it only notifies
the first finding service information. There is no way to listen
the service update. Thus, add a new API that can register a
callback to listen to the service updates continuously.

Bug: 245369943
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I0e9d92b9028375feb3e344ab6c4acb515c5b2be9

Paul Hu   authored and   Remi NGUYEN VAN   commited 2023-01-19 20:16:03 +09:00
18aecccc9d
Merge "New API to stop service resolution" am: fd02056713 am: b5ae95a4d1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2369237

Change-Id: I76c20d5cfd96027c1f20c3011b78fd3546865855
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2023-01-19 02:51:06 +00:00
113d648e76
Merge "[API] Add Offload Callback API"
Xinyi Zhou   authored and   Android (Google) Code Review   commited 2023-01-18 21:25:58 +00:00
7ada57515a
New API to stop service resolution
Resolve service may take long time due to network issue or
using wrong service information, but users are not able to stop
it. They can only wait for the callback of resolveService to end,
which sometimes takes a long time. Thus, add the new API that
users can stop the service resolution.

Bug: 245369943
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I6b6183c8c73f8db981b9afa51fbc73bf886d9ed3

Paul Hu   commited 2023-01-18 10:10:25 +00:00
b58deb706c
Merge "Implement service resolved callback" am: 38f5d4661b am: e0910d37c6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2242853

Change-Id: I1e5875f32e9298e393b7d4f1796f38b9be6a6672
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2023-01-18 02:28:41 +00:00
dd102b8075
Merge "Implement service resolved callback"
Paul Hu   authored and   Gerrit Code Review   commited 2023-01-18 01:43:28 +00:00
38f5d4661b
Merge changes I298816ac,I3f41b4fe,Ibd782029 am: f71485f351 am: 32b836d627 am: 303f025667
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2238117

Change-Id: I2fb912ad00b81b7800fa5516bd3e29fed43089a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2023-01-17 17:44:51 +00:00
8a6a59eb54
Merge changes I298816ac,I3f41b4fe,Ibd782029
* changes:
  Implement service lost callback
  Implement service found callback
  Use MdnsDiscoveryManager for discovery

Paul Hu   authored and   Gerrit Code Review   commited 2023-01-17 15:51:54 +00:00
f71485f351
Implement service resolved callback
Service resolved should be notified when receive the
onServiceFound callbacks from MdnsServiceBrowserListener

Bug: 254166302
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I681720065084bf3449c5b1ab44cd4ed6a659dcdb

Paul Hu   commited 2023-01-17 23:25:08 +08:00
75069ed47e
Implement service found callback
Service found should be notified when receives the
onServiceNameDiscovered callbacks from
MdnsServiceBrowserListener.

Bug: 254166302
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I3f41b4fe85cd85ad356fa764663187a88914412c

Paul Hu   commited 2023-01-17 20:07:22 +08:00
019621e070
Use MdnsDiscoveryManager for discovery
Register/Unregister the listener to/from MdnsDiscoveryManager
when discovery started/stopped.

Bug: 254166302
Test: atest FrameworksNetTests CtsNetTestsCases
Change-Id: Ibd782029826ac5856c608165928cd942e46dd9a4

Paul Hu   commited 2023-01-17 19:16:50 +08:00
23fa202478
Merge "Remove *_WILDCARD constants from NetworkTemplate" am: 2500069488 am: 6c821202b7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2228859

Change-Id: If1edbc52438d95e3ec90a129ce00e127aef6f942
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Aaron Huang   authored and   Automerger Merge Worker   commited 2023-01-16 08:58:49 +00:00
154234a9a8
Merge "Remove mSubscriberId from NetworkTemplate" am: 99348b1664 am: 6e93a9025b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2241058

Change-Id: I76f848d4ed0c952a362ead0786aa1fc27f0319fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Aaron Huang   authored and   Automerger Merge Worker   commited 2023-01-16 08:58:24 +00:00
8091f030f2
Merge "Remove *_WILDCARD constants from NetworkTemplate"
Aaron Huang   authored and   Gerrit Code Review   commited 2023-01-16 07:56:09 +00:00
2500069488
Merge "Remove mSubscriberId from NetworkTemplate"
Aaron Huang   authored and   Gerrit Code Review   commited 2023-01-16 07:55:26 +00:00
99348b1664
Merge "[API] Add onError API"
Xinyi Zhou   authored and   Android (Google) Code Review   commited 2023-01-13 19:15:33 +00:00
db8608825b
Merge "fix argument to CloseGuard.open()" am: c95f0d8abf am: 4268348a59
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2379468

Change-Id: Id0571fd332602536a00a5c4b73b9da5b8a846491
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2023-01-13 13:09:30 +00:00
1cb94f1903
Merge "fix argument to CloseGuard.open()"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-01-13 12:12:20 +00:00
c95f0d8abf
[API] Add Offload Callback API
go/presence_api_u

Test: -m
Ignore-AOSP-First: nearby_not_in_aosp_yet
Bug: 265353983
Change-Id: Ie00a1bd5bcdf42d7b4678a3ffbaf18ebfbe735e6

Xinyi Zhou   commited 2023-01-12 21:44:59 -08:00
b90b2015db
[API] Add onError API
go/presence_api_u

Test: Unit test
Ignore-AOSP-First: nearby_not_in_aosp_yet
Fix: 263907284
Change-Id: I87df0b4592b32f241eb7d22405357bc039766cb8

Xinyi Zhou   commited 2023-01-11 15:41:45 -08:00
9afce39c43
Merge "Expose APIs to migrate IpSecTransform" am: 19aa23db7e am: bd3a05ce90 am: 0d066bd27e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2264321

Change-Id: I1d53fd8eb673dd483a93eae8aa07a59b44c35627
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Yan Yan   authored and   Automerger Merge Worker   commited 2023-01-11 21:02:27 +00:00
e30102f29c
Merge "Expose APIs to migrate IpSecTransform"
Yan Yan   authored and   Gerrit Code Review   commited 2023-01-11 18:52:59 +00:00
19aa23db7e
Expose APIs to migrate IpSecTransform
This commit exposes APIs to migrate a tunnel mode transform to
new source/destination addresses, as required by MOBIKE.

By calling the exposed API, the caller only caches the new
address in the transform. To complete the migration, caller
MUST apply the tranform to the appropriate tunnel.

This API design is mainly based on the kernel interface and use
cases. The Linux kernel requires Android to provide both the
IpSecTransform and the IpSecTunnelInterface to perform the
migration. And in most cases those two instances are managed
by different entities: IpSecTranform is managed by the key
exchange protocol (e.g. IKE) and IpSecTunnelInterface is managed by
the security tunnel provider (e.g. VPN, VCN, and IWLAN). Thus the
migration process has been designed to have two steps where the
key exchange protocol negotiates and caches the new address,
passes out the updated transform, and the security tunnel
provider applies the transform to a tunnel.

Another benefit of this API is it can also apply to the case
where the network peer does not support MOBIKE and thus cannot
update the existing transforms. In this case, the key exchange
protocol can create a new transform and give it to the security
tunnel provider, and the tunnel provider can still call "apply"
to perform migration without needing to know the details of the
transform update process.

Bug: 169171001
Test: atest FrameworksNetTests, IpSecManagerTunnelTest
Change-Id: I0658cdb09fb31f7e0fb9d0b07f37c2b72b6e705f

Yan Yan   commited 2023-01-10 19:09:05 +00:00
81c2160a63
Merge "fix argument to CloseGuard.open()" am: 33b2163412 am: fc42b88845 am: 87c49db3b3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2379328

Change-Id: I96034af29eef93ed35fa7635b91c923dab10aded
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2023-01-07 11:38:04 +00:00
f903b92274
fix argument to CloseGuard.open()
Based on documentation, String parameter to CloseGuard.open() should be the name of the method to close the resource (in this case Resource.close()).

As currently written, the debug output from warnIfOpen() will be "Resource failed to call constructor."

Bug: 131838407
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I25f005a7944bf3995ae6dc4c021ed1034f2187dd

Maciej Żenczykowski   commited 2023-01-07 10:03:47 +00:00
401122894d
fix argument to CloseGuard.open()
Based on documentation, String parameter to CloseGuard.open() should be the name of the method to close the resource (in this case Resource.close()).

As currently written, the debug output from warnIfOpen() will be "Resource failed to call constructor."

Bug: 131838407
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9b8a71f9076712014bb883bbde5e5fbdb018b2d5

Maciej Żenczykowski   commited 2023-01-07 01:00:18 +00:00
223b5cc371
Merge "Remove mSubscriberIdMatchRule from NetworkTemplate" am: b97fbbf5e0 am: 1972c16a3d am: 4683405502
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2241257

Change-Id: Ie6353221a77c93f84b94dcb8fa1a3863a8f32c9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Aaron Huang   authored and   Automerger Merge Worker   commited 2023-01-03 03:58:42 +00:00
77d9195186
Remove *_WILDCARD constants from NetworkTemplate
NetworkTemplate was moved into mainline module and
provide Builder for external users to build template.
MATCH_MOBILE_WILDCARD and MATCH_WIFI_WILDCARD are not
exposed so currently the usage of these two constants
only in module. This change is to remove the constants.

After removing the constants, two methods matchesWifi
and matchesMobile are changed to adapt the original
matches[Wifi|Mobile]Wildcard behavior.

Bug: 238843364
Test: FrameworksNetTests
Change-Id: I9e156b504ce4eb903b39279e443fad27bc921186

Aaron Huang   commited 2022-12-28 18:49:37 +08:00
ece181997c
Remove mSubscriberId from NetworkTemplate
Currently NetworkTemplate provides Builder for users to build a
template and it supports multiple subscriber ids. The mSubscriberId
is a local variable in current design so it can be removed from
NetworkTemplate and also can be removed from the parameter of a
constructor as long as the constructor is not annotated with
@UnsupportedAppUsage.

Bug: 238843364
Test: build, FrameworksNetTests
      CtsNetTestCases
Change-Id: Ic6a695e1c1719111bf26ba905a38673952a24736

Aaron Huang   commited 2022-12-28 12:09:21 +08:00
ee23c03121
Remove mSubscriberIdMatchRule from NetworkTemplate
Currently, mSubscriberIdMatchRule is only used in NetworkTemplate
and it depends on if mMatchSubscriberIds is empty or not. Thus,
remove it since is not really necessary and replace it with
checking matchSubscriberIds if needed.

Bug: 238843364
Test: build, FrameworksNetTests
      CtsNetTestCases
Change-Id: Ic66d2ff2826846778b004bb15a4718a62fa1f470

Aaron Huang   commited 2022-12-28 12:09:09 +08:00
4854d055bb
Merge changes I3dd45b29,Ic177015f am: 67c7cd81a7 am: e55d007efe am: 0ed7c5fd7e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2264261

Change-Id: Iebebbfe0838e5808a81c97d381af4d23ac6f5b6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Yan Yan   authored and   Automerger Merge Worker   commited 2022-12-22 21:34:46 +00:00
0ec2189b81
Require IPSEC_TUNNEL_MIGRATION feature flag to migrate transforms
Bug: 169169973
Test: atest IpSecServiceParameterizedTest (new tests added)
Change-Id: I3dd45b29163cd1e0cdbef08cb8aabdb629cf73bc

Yan Yan   commited 2022-12-21 23:12:48 +00:00
a48dcd9d1f
Support IPsec transform migration
This commit adds methods to support migrating tunnel mode
IpSecTransform to new source/destination addresses.

Bug: 169171001
Test: atest FrameworksNetTests (new tests added)
Change-Id: Ic177015fba5b62d3f73009633118109d3631086f

Yan Yan   commited 2022-12-21 23:12:35 +00:00
e114b38f07
Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage" am: 841b1f33d5 am: 8b889cccc9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2324993

Change-Id: Icc1d4bb74c653e8dab62c104f0982fe3c8ae4afe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-12-02 12:25:35 +00:00
e882a30d94
Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 11:27:27 +00:00
841b1f33d5
Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage
Currently, NET_CAPABILITY_TEMPORARILY_NOT_METERED traffic is
counted as unmetered data usage, and "mobile data usage"
settings screen shows metered data usage which means it doesn't
include TEMPORARILY_NOT_METERED traffic. However, some carriers
show TEMPORARILY_NOT_METERED data usage in customer's bill which
would be confusing if the data usage in the device shows different
results. Thus, revert the change to avoid confusing.

Bug: 183776809
Test: FrameworksNetTests
Change-Id: I4ef25095462adf30b1ecf82134996739f167930d

Aaron Huang   commited 2022-12-02 16:04:55 +08:00
c5a05d1d8f