summaryrefslogtreecommitdiff
path: root/libs/androidfw/LocaleDataTables.cpp
diff options
context:
space:
mode:
author Lee Shombert <shombert@google.com> 2024-12-30 14:02:14 -0800
committer Lee Shombert <shombert@google.com> 2025-01-02 10:09:09 -0800
commitc72b88f3a0a4b823b5b94058cb2876806f5fdab7 (patch)
tree6fa3a5367fcf7a20f11746c0a19b3147c96e8e57 /libs/androidfw/LocaleDataTables.cpp
parent6b4d2a3c309cb0781f80efb9b5d202f900192d83 (diff)
Retry property set failures
SystemProperties.set() is not a reliable method, for reasons that are unknown. This change adds the utility class SystemPropertySetter with a static setWithRetry() method. There are two overloads: one which takes the maximum number of retries and the delay between retries, and one which uses new system constants. Clients should use the new method if set() failures are fatal. Note that some failures cannot be recovered by retrying. SELinux denials are one example. However, such errors are almost always coding errors and not operational errors, and so should be discovered during development. The code, along with the constants, is ported from PropertyInvalidatedCache, where it has been use successfully for several years. The new method is used in AudioService and in PIC. The new methods are not system APIs and do not have CTS tests. Flag: EXEMPT bug-fix Bug: 383751329 Test: atest * CtsVirtualDevicesAudioTestCases * android.media.audio.cts.AudioFocusTest * android.app.appops.cts.AppOpsLoggingTest Change-Id: Ifb8e2bf42e582cf77c7c74d3e3dfb7cd4abb7710
Diffstat (limited to 'libs/androidfw/LocaleDataTables.cpp')
0 files changed, 0 insertions, 0 deletions