diff options
author | 2025-03-05 02:41:44 -0800 | |
---|---|---|
committer | 2025-03-05 02:44:49 -0800 | |
commit | 2b7b92dfae902e5a3ae29701c2cc4f670d0029c4 (patch) | |
tree | 8ee9b68a265d0959a3bafc9361ce353230b2c2c8 | |
parent | 09252b932b810b2d382444c0038736e1a0f39aaa (diff) |
Fix other call sites of SafetyCenterTouchTarget.
Bug: 399872661
Test: atest SafetyCenterSubpagesTest && atest SafetyCenterActivityTest
Flag: com.android.permission.flags.fix_safety_center_touch_target
Relnote: Touch target accessibility fix for Safety Center
Change-Id: I4e9f10eb8562b5a9ecbf68e5349eccf790eed0d6
-rw-r--r-- | PermissionController/src/com/android/permissioncontroller/safetycenter/ui/SafetyCenterTouchTarget.kt | 4 | ||||
-rw-r--r-- | flags/flags.aconfig | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/SafetyCenterTouchTarget.kt b/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/SafetyCenterTouchTarget.kt index 44d055d5e..ccfa8f867 100644 --- a/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/SafetyCenterTouchTarget.kt +++ b/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/SafetyCenterTouchTarget.kt @@ -22,6 +22,7 @@ import android.view.TouchDelegate import android.view.View import androidx.annotation.DimenRes import androidx.annotation.RequiresApi +import com.android.permission.flags.Flags /** Class to configure touch targets for Safety Center. */ @RequiresApi(Build.VERSION_CODES.TIRAMISU) @@ -43,8 +44,7 @@ object SafetyCenterTouchTarget { @DimenRes minTouchTargetSizeResource: Int, useWidthHeightFix: Boolean, ) { - // TODO: b/399872661 - Look into fixing all call sites and remove this boolean. - if (useWidthHeightFix) { + if (useWidthHeightFix || Flags.fixSafetyCenterTouchTarget()) { configureSizeUsingBothWidthAndHeight(view, minTouchTargetSizeResource) } else { configureSizeUsingWidthOnly(view, minTouchTargetSizeResource) diff --git a/flags/flags.aconfig b/flags/flags.aconfig index 866d27d43..99a50ab7d 100644 --- a/flags/flags.aconfig +++ b/flags/flags.aconfig @@ -165,3 +165,12 @@ flag { bug: "388234667" is_fixed_read_only: true } + +flag { + name: "fix_safety_center_touch_target" + is_exported: true + namespace: "permissions" + description: "This flag fixes an issue with the SafetyCenterTouchTarget code" + bug: "399872661" + is_fixed_read_only: true +} |