Commit graph android_packages_modules_Co.../nearby
Message SHA1
Merge "Log CHRE NanoApp ID in hexadecimal format." into main
Chris Sabotta   authored and   Android (Google) Code Review   commited 2025-09-09 11:34:50 -07:00
af5ca897dd
Log CHRE NanoApp ID in hexadecimal format.
Flag: EXEMPT trivial formatting fix
Bug: 443286901
Test: presubmits
Change-Id: I2834ef3e8fa5d10b5e35008c022788092c223479

Chris Sabotta   commited 2025-09-05 12:02:25 -07:00
0879234e61
Convert uses of @hide to block tag
In most places the `@hide` doctag is treated as a block tag on its own
line. However, there are a few places where it is treated as an inline
doctag, e,g. `{@hide}`, and some places where it looks like a block
tag but is inline in the text, e.g. `Some text. @hide`. Dealing with
all the types increases the complexity of Metalava and makes it
slightly slower.

This change replaces the non-block tag forms with a block tag.

Flag: EXEMPT change the form of @hide does not change the API or behavior
Bug: 429965593
Test: m checkapi
Change-Id: I4ffe44a329dbcb7f0a7bd61af16c3bd99cacdac4

Paul Duffin   commited 2025-08-29 21:19:30 +00:00
6eaa841657
Revert "Introduce BLE advertiser wrapper for unit tests."
This reverts commit e7a349bec4.

Reason for revert: broke the build in b/435385483.

Low-Coverage-Reason: This change reverted the previous broken change and will not change testing coverage.

Change-Id: Ifcef4eca52f7a952127ad628627afa3d24248bf4

Chen Wang   commited 2025-07-31 14:49:58 -07:00
89cdb62c32
Introduce BLE advertiser wrapper for unit tests.
This removes Nearby unittest dependences on BLE hardware and get rid of
flaky tests periodically reported from release testing.

Bug: 430923101

Test: atest NearbyUnitTests
Flag: EXEMPT mainline

Change-Id: If5527a47efa7513c463b50ec5529c8c9eae74300

Chen Wang   commited 2025-07-29 20:02:54 +00:00
e7a349bec4
Replace .toList() with .collect() am: 725078a6bd am: 6586d080f6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3473841

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

Cole Faust   authored and   Automerger Merge Worker   commited 2025-02-03 17:40:50 -08:00
1441db0378
Replace .toList() with .collect()
.toList() was only introduced to android in api level 34, which is newer than
this module's min_sdk_version. Replace it with .collect().

This was found while updating android lint.

Flag: EXEMPT refactor
Bug: 394096385
Test: Presubmits
Change-Id: I472bff7749aebb21bd8681ecf4235ce7a6cfc7de

Cole Faust   commited 2025-02-03 14:18:40 -08:00
725078a6bd
Merge "CredentialElement uses Parcel#createByteArray to read the bytes." into main
Steven Moreland   authored and   Android (Google) Code Review   commited 2025-01-21 15:41:00 -08:00
e787d0f730
[Nearby]Fix sometimes can't stop the previous advertising
Change-Id: I5d9e77ebc837d33ac07f9fc408afe6cacefb6547

zheya   commited 2024-12-26 10:47:50 +08:00
7354a4aa55
CredentialElement uses Parcel#createByteArray to read the bytes.
This avoids allocating a size which is read in from another process, which can cause OOM conditions and a crash.

Bug: 370353559
Change-Id: Iff9d4c8f63ba44ae64414d5143bfbb69b9966132
Test: TH

Steven Moreland   commited 2024-12-18 17:19:10 -08:00
335aac7c49
Use @SdkSuppress in BluetoothFinder tests, now that Build.VERSION_CODES.VANILLA_ICE_CREAM is avilable. am: 79f907d195
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3409619

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

Yahav Nussbaum   authored and   Automerger Merge Worker   commited 2024-12-12 11:00:14 -08:00
c2dd1fd125
Use @SdkSuppress in BluetoothFinder tests, now that Build.VERSION_CODES.VANILLA_ICE_CREAM is avilable.
Change-Id: Ie3c2d440fc948f9238565fade8ed5c6463f08783

Yahav Nussbaum   commited 2024-12-12 05:28:01 -08:00
79f907d195
Merge "Add WRITE_ALLOWLISTED_DEVICE_CONFIG perm when modifying DeviceConfig" into main am: 5380288dd7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3363808

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

Michael Groover   authored and   Automerger Merge Worker   commited 2024-11-19 17:40:56 +00:00
e68acbb469
Add WRITE_ALLOWLISTED_DEVICE_CONFIG perm when modifying DeviceConfig
Android 16 introduces restrictions on the DeviceConfig flags that
can be modified by the shell user by removing the WRITE_DEVICE_CONFIG
permission from this user and replacing it with the
WRITE_ALLOWLISTED_DEVICE_CONFIG permission; with this permission,
only those flags that have been allowlisted can be modified. This
commit adds the ALLOWLISTED permission to any test that explicitly
adopts the shell permission identity with the WRITE_DEVICE_CONFIG
permission; the WRITE_DEVICE_CONFIG permission is not removed to
ensure tests do not break when run on previous platform releases
without the ALLOWLISTED permission.

Bug: 364083026
Flag: TEST_ONLY
Test: Manually ran all modified tests
Change-Id: Iad68063550f99f3dc78ac2f0483dad98a8a93f2e

Michael Groover   commited 2024-11-18 23:28:24 -06:00
a3882a238b
Merge 24Q4 (ab/12406339) into aosp-main-future
Bug: 370570306
Merged-In: I1db0b57c43836690e32bcf7143afcbaa3d6ec0f1
Change-Id: Icc2e359a5cbfa2ae53228c4af1312e49219a4469

Xin Li   commited 2024-11-13 09:46:53 -08:00
9cb2ee067b
[nearby]Remove out of date APIs for Fast Pair.
The APIs were not deleted to support the CTS before R5 test. Now that CTS R5 (without calling the APIs) is rolled out, we can remove these APIs.

Test: -m
Fix: 286137024
Bug: 376002171
Change-Id: I0812792b445a30a9cd366b41515dd39b981ef5d3

Xinyi Zhou   commited 2024-10-29 21:20:02 +00:00
2dc574bf1b
Add persist.bluetooth.finder.supported property
Bug: 365462615
Test: Covered by existing tests

Change-Id: I4389295c8b43d70356582388f5a6bf82bb3e47b2

Yahav Nussbaum   commited 2024-09-23 09:41:36 +00:00
95d26ae188
Merge "Make java_sdk_library dependencies explicit" into main am: 430a8ad33c am: f912eae4e8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3250852

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

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-09-10 19:32:43 +00:00
ee8bbac3e5
Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a

Jihoon Kang   commited 2024-09-10 00:01:31 +00:00
8401b6a9f0
Merge aosp-24Q3-ts-dev
Bug: 358400644
Merged-In: I651dae8c9daac24b195196c03b54e69a757de8a7
Change-Id: I8ff51de4c7197f84efe5985f0004c6f004349797

Xin Li   commited 2024-08-16 10:15:19 -07:00
4bf36180fb
Use java_aconfig_library for nearby and thread flags
Connectivity repo now can use java_aconfig_library since this target is
available on all downstream branches.

Bug: 345121279
Test: TH
Change-Id: I6d267ddac89731a8efbef2ee98a3baa1df754ff5

Motomu Utsumi   commited 2024-08-16 16:59:08 +09:00
dbb82c0581
Remove unused priviliged signature permission am: 25a5eb9c2b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2972592

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

Xinyi Zhou   authored and   Automerger Merge Worker   commited 2024-07-26 19:25:02 +00:00
6daa77f953
Baseline Lint FlaggedApi violations
The Lint FlaggedApi checks are currently configured as warnings. Add
existing violations to baselines files to prepare for turning the
FlaggedApi checks into errors.

Bug: 303434307
Test: treehugger
Flag: EXEMPT not possible to flag baseline changes
Merged-In: I990ce57cd5cdac44ee8b93565b45aa15790ad697
Change-Id: I990ce57cd5cdac44ee8b93565b45aa15790ad697

MÃ¥rten Kongstad   commited 2024-06-20 09:05:51 +02:00
4ece737f4f
NearbyManagerTest: Put static classRule as public
Bug: 345117020
Fix: 345117020
Flag: TEST_ONLY
Test: atest NearbyManagerTest
Change-Id: I37bf29c1c025b361eec2a4e397a3004767920c7f

William Escande   commited 2024-06-06 17:02:53 -07:00
d44bd8bc80
Bluetooth: Use enableRule instead of BTAdapterUtils
The BTAdapterUtils were known to be flaky.
We recently fixed it and updating the usage.

In this case it looks like it is preferable to use the Enable rule

Bug: 339585576
Test: atest CtsPermissionUiTestCases
Test: atest CtsBluetoothTestCases
Test: atest CtsNearbyFastPairTestCases
Flag: TEST_ONLY
Change-Id: Ic81c62ae8c99207880cc14ff3c7f83128bb9f75b

William Escande   commited 2024-05-14 00:43:15 +00:00
a128f82763
Test BluetoothFinderManager for SDK at least V
Bug: 327721277
Test: atest NearbyUnitTests
Change-Id: I0ea89eeafd49783e3f8501c1c930733358f67cdf

Yahav Nussbaum   commited 2024-03-02 22:11:44 +00:00
5d76735249
Merge "Connect to IBluetoothFinder and use it" into main
Yahav Nussbaum   authored and   Gerrit Code Review   commited 2024-03-01 05:13:50 +00:00
35f1b57a43
Connect to IBluetoothFinder and use it
Bug: 325088217
Test: atest NearbyUnitTests
Change-Id: I3650da59c86ef83d9c08926f422a37773edc4af8

Yahav Nussbaum   commited 2024-02-29 21:11:09 +00:00
cd6c6822c8
Move Nearby flags to common and add specify it in java_sdk_library
Bug: 324993608
Test: TH
Change-Id: I1dc79353e9bae3d977db88e572e871cd459fc7fc

Yahav Nussbaum   commited 2024-02-22 06:49:15 +00:00
259be7bd4e
Remove unused priviliged signature permission
Change-Id: I11aba292e15301dd2d68bb7dfd20d6ae715f1f79
Fix:319155991
Fix:319046559

Xinyi Zhou   commited 2024-02-22 01:28:45 +00:00
25a5eb9c2b
Flag declaration file for Nearby
Using the same container value as other flags in Connectivity

Bug: 324993608
Test: TH
Change-Id: I6c8bbb4401ced54207ed352ce08c5930de4d6ab1

Yahav Nussbaum   commited 2024-02-14 17:14:58 +00:00
0ea00dd7c8
Merge changes I57b37ea7,I00772535 into main
* changes:
  Introduce Powered Off Finding API
  Add Powered Off Finding operations to NearbyService

Yahav Nussbaum   authored and   Gerrit Code Review   commited 2024-02-13 14:34:22 +00:00
c412fd3987
Introduce Powered Off Finding API
Bug: 307898240
Test: atest CtsNearbyFastPairTestCases
Test: atest NearbyIntegrationPrivilegedTests
Test: atest NearbyIntegrationUntrustedTests
Change-Id: I57b37ea796c0791d72fec931f731a0143e816dac

Yahav Nussbaum   commited 2024-02-13 09:23:00 +00:00
c712a571dc
Add Powered Off Finding operations to NearbyService
Interface only change, without actual use of the HAL API.

Bug: 307898240
Test: atest NearbyUnitTests
Change-Id: I00772535a8f9247794ff59e465ed2b5af19576b4

Yahav Nussbaum   commited 2024-02-06 16:41:36 +00:00
2122a9c58e
[DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
Baseline NewApi issues
NewApi is a lint check that you don't call framework methods that were
introduced in versions later than your min_sdk_version. We want to
make this an error, so we're baselineing all existing issues.

This cl was generated automatically, by taking all the NewApi issues
from the reference baselines, and all the non-NewApi issues from the
existing checked in baselines.

Bug: 268261262
Test: Presubmits
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4ecdedda379e4e9040eb87b01dc3d8efb89be810)
Merged-In: I0393f24f101876abc458ca139eefdb279dcb2b03
Change-Id: I0393f24f101876abc458ca139eefdb279dcb2b03

Cole Faust   authored and   Android Build Cherrypicker Worker   commited 2024-01-25 02:41:58 +00:00
be30b3e96e
Uptesting is moving folks to /external/robolectric from /external/robolectric-shadows
This commented out line references the old robolectric ("Robolectric_all-target") which is being replaced by Robolectric_all-target_upstream

Bug: 314757990
Test: none, this is simply removing a commented out dep.
Flag: NA
Change-Id: I25eed6cef457bada06289656745ca5b5286bb467

Rex Hoffman   commited 2024-01-02 17:31:37 +00:00
242899b8a4
Merge "[nearby] Add note in README" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-12-28 22:24:31 +00:00
62297ae653
Merge "List baseline_filename on modules that are implititly using it" into main
Cole Faust   authored and   Gerrit Code Review   commited 2023-12-21 21:33:01 +00:00
2e7920c075
List baseline_filename on modules that are implititly using it
lintable modules currently pick up files named "lint-baseline.xml" to use as the
lint baseline implicitly. This is confusing because you could end up using the
baseline files in more modules than intended. Lint also has a feature where it
requests you remove unnecessary findings from the baseline file, so something
could be necessary for one module, but unnecessary for another that accidentally
picked up the baseline.

We're removing the implicit detection of the baseline file, which requires
all modules using it to list the baseline file explicitly.

Bug: 272769514
Test: Presubmits
Change-Id: If873a4ea20d73bb6268d83589c4fb3ebe54af664

Cole Faust   commited 2023-12-20 11:57:07 -08:00
a52ecf0c5c
[nearby] Add note in README
Test: -m
Change-Id: I69bc788c127f442704870a8181ddb998cfea9a77

Xinyi Zhou   commited 2023-12-19 15:40:54 -08:00
b2bcbe07c9
[nearby] Update README for AOSP compiling binary
Test: -m and load on device
Change-Id: Ib54d4cd14c2ec0739d96593e183f6e1be9682e67

Xinyi Zhou   commited 2023-12-19 19:53:02 +00:00
fea003bd5b
Add mcts tag to MainlineCTS networking test modules which is used for build all the mainline CTS tests.
Bug: 316436957

Change-Id: I0e7ab773075fb0dfd154dde45a710d1c1823c914

Tongbo Liu   commited 2023-12-19 11:03:50 +00:00
199357ba68
[nearby] Fix test failure
Test: -m
Fix: 303338703
Ignore-AOSP-First: nearby not in aosp yet
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f6fdf4cf7bc9cd9d50e91d7895e11f684a49a5db)
Merged-In: I7048917f5345f55364626901b533fee3d3856bf7
Change-Id: I7048917f5345f55364626901b533fee3d3856bf7

Xinyi Zhou   commited 2023-12-13 20:24:19 +00:00
e450df6981
Exclude user build devices for the test
Fix: 313884732
Ignore-AOSP-First: nearby_not_in_aosp_yet
Test: -m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:523eeb3c87bd8f6d353d439120545566f94aaf4c)
Merged-In: Iaaca422cb105c00ded1d84b40afd745abcd651b7
Change-Id: Iaaca422cb105c00ded1d84b40afd745abcd651b7

Xinyi Zhou   commited 2023-12-13 05:48:48 +00:00
d1625679fb
[nearby] Add nearby_enable_ble_in_init flag
Bug: 312430336
Ignore-AOSP-First: nearby_not_in_aosp_yet
Test: -m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fc084ea87ce18275c788c21ba9018636dfdff5e0)
Merged-In: I5bafa8a85d4f2169fcdef73e2d9f21534553ff72
Change-Id: I5bafa8a85d4f2169fcdef73e2d9f21534553ff72

Xinyi Zhou   commited 2023-12-13 05:46:26 +00:00
f83d4df182
Revert "[nearby] Add disable logic"
This reverts commit 3f5aea69f9.

Reason for revert: Caused crash

Fix: 312430336
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4ed63b1873841a37f3ebbef5ff5072a253fa6186)
Merged-In: Id664a6cba297674d8edeb0af700df1e96baaf70e
Change-Id: Id664a6cba297674d8edeb0af700df1e96baaf70e

Xinyi Zhou   commited 2023-12-13 05:40:04 +00:00
11234fe8c1
[nearby] Add disable logic
Also moves enableBLE logic from init to when there is at least one
client

Test: -m
Bug: 294906731
Ignore-AOSP-First: nearby_not_in_aosp_yet
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f5aea69f9f36097b407822b0cc177c0df51f061)
Merged-In: I24ca7581d60afee484d14f66a411344ce132425a
Change-Id: I24ca7581d60afee484d14f66a411344ce132425a

Xinyi Zhou   commited 2023-12-13 05:32:21 +00:00
164969d600
[nearby] Log changes
Test: -m
Ignore-AOSP-First: nearby_not_in_aosp_yet
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2a4cadec922725cf89992103f6ade337d5a8ec86)
Merged-In: I11a03bd3bf40cd7cd6f0ac892f040c9eb3ce822c
Change-Id: I11a03bd3bf40cd7cd6f0ac892f040c9eb3ce822c

Xinyi Zhou   commited 2023-12-13 05:28:33 +00:00
4dfc089531
[nearby] Sync discoveryTimestamp field name
Test: -m
Bug: 306043245
Ignore-AOSP-First: nearby_not_in_aosp_yet
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d6acb0655f4fa619bd0ff7a6e7a1a76959db29d9)
Merged-In: I96e03660dbd49f361a436276d62473504f88d657
Change-Id: I96e03660dbd49f361a436276d62473504f88d657

Xinyi Zhou   commited 2023-12-13 05:27:57 +00:00
64e14583cc