summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextView.java
diff options
context:
space:
mode:
authorSergey Nikolaienkov <sergeynv@google.com>2022-01-12 08:56:11 +0100
committerSergey Nikolaienkov <sergeynv@google.com>2022-01-14 09:13:45 +0000
commit11ec828ecd8a7bed8ae8cdca7fd1221f50826a6a (patch)
tree3e8a7994b6abca3167a18cd45bd74cff1fe5be8f /core/java/android/widget/TextView.java
parentbac69433f662ee892e3a354d600c30f006e24ecc (diff)
Make IOnAssociationsChangedListener.onAssociationsChanged() blocking
Make IOnAssociationsChangedListener.onAssociationsChanged() blocking (not "oneway") to make sure that the clients of the addOnAssociationsChangedListener() API (@SystemAPI guarded by a "signature" permission) are able to prevent race conditions that may arise if their own clients (applications) effectively get notified about the changes before system services do. This is safe for 2 reasons: 1. The addOnAssociationsChangedListener() API is only available to the system components (guarded by a "signature" permission). See android.permission.MANAGE_COMPANION_DEVICES. 2. On the Java side addOnAssociationsChangedListener() in CDM takes an Executor, and the proxy implementation of onAssociationsChanged() simply "posts" a job to it. See CompanionDeviceManager.OnAssociationsChangedListenerProxy class. Bug: 214016641 Test: atest --iterations 10 CtsCompanionDeviceManagerCoreTestCases:AssociationsChangedListenerTest Test: atest CtsCompanionDeviceManagerCoreTestCases Test: atest CtsCompanionDeviceManagerUiAutomationTestCases Test: atest CtsOsTestCases:CompanionDeviceManagerTest Change-Id: I7c664e9b9c848f8f0291ff46a56ff47bae7db346
Diffstat (limited to 'core/java/android/widget/TextView.java')
0 files changed, 0 insertions, 0 deletions