diff options
author | Elliot Sisteron <elliotsisteron@google.com> | 2023-06-08 10:36:53 +0000 |
---|---|---|
committer | Elliot Sisteron <elliotsisteron@google.com> | 2023-06-08 16:13:49 +0000 |
commit | faf20cf1ac1f2a19221ce84a0dc9d337f2dd598a (patch) | |
tree | d01b078f1974bbbb8f9f402c65be26775a4bbbd3 /PermissionController/src/com | |
parent | 12ee4e41001227322fa0859d6487a6e2b1848e7e (diff) | |
download | Permission-faf20cf1ac1f2a19221ce84a0dc9d337f2dd598a.tar.gz |
Further refactoring of SafetyCenterResourcesContext.
Stop making it implement ContextWrapper, that's error-prone
as it implies it has the Context from the resources APK as a base
when in fact the base is the context passed in; and methods are
overridden only partially.
Also increase test coverage.
Bug: 283100177
Test: atest CtsSafetyCenterTestCases
Relnote: N/A
Change-Id: I2925921de3de01633beacbbe713d46e9522f003b
Diffstat (limited to 'PermissionController/src/com')
-rw-r--r-- | PermissionController/src/com/android/permissioncontroller/safetycenter/service/SafetyCenterSearchIndexablesProvider.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/PermissionController/src/com/android/permissioncontroller/safetycenter/service/SafetyCenterSearchIndexablesProvider.kt b/PermissionController/src/com/android/permissioncontroller/safetycenter/service/SafetyCenterSearchIndexablesProvider.kt index 8e5e63452..463288c64 100644 --- a/PermissionController/src/com/android/permissioncontroller/safetycenter/service/SafetyCenterSearchIndexablesProvider.kt +++ b/PermissionController/src/com/android/permissioncontroller/safetycenter/service/SafetyCenterSearchIndexablesProvider.kt @@ -206,7 +206,7 @@ class SafetyCenterSearchIndexablesProvider : BaseSearchIndexablesProvider() { } } - private fun Context.getNotEmptyStringOrNull(resId: Int): String? = + private fun SafetyCenterResourcesContext.getNotEmptyStringOrNull(resId: Int): String? = if (resId != Resources.ID_NULL) { getString(resId).takeIf { it.isNotEmpty() } } else { |