summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
author Evan Laird <evanlaird@google.com> 2024-04-07 15:02:23 -0400
committer Evan Laird <evanlaird@google.com> 2024-04-16 17:52:58 +0000
commit65e73e304c3c35c46503098139fadebc0224e333 (patch)
tree34a3b6aa81d6bb65da93401106ada480a47f0a6b /packages/Shell/src
parentafe50c04c1ee12d054f1d5db8c8c580da71ec9a0 (diff)
[Mobile] Wrap AccessibilityContentDescriptions in a static getter
The content descriptions are mapped to level by their position in the PHONE_SIGNAL_STRENGTH array, and thus are susceptible to out of bounds index exceptions. This change adds accessor methods to AccessibilityContentDescriptions so that they can be checked (it's the responsibility of the caller to check against a 0 return value which will throw if trying to get the resource). We also make the content description nullable and handle the resid=0 case. Test: MobileIconViewModelTest Bug: 328547883 Flag: NONE (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6e67f7d49206325e9f0fd0189b8b3a1c5a2094a8) Merged-In: Ifa55ad8184a5337390d9fa245311b4e9513c0233 Change-Id: Ifa55ad8184a5337390d9fa245311b4e9513c0233
Diffstat (limited to 'packages/Shell/src')
0 files changed, 0 insertions, 0 deletions