summaryrefslogtreecommitdiff
path: root/PermissionController/src
diff options
context:
space:
mode:
author Jay Thomas Sullivan <jaysullivan@google.com> 2025-02-04 17:43:53 -0800
committer Jay Sullivan <jaysullivan@google.com> 2025-02-04 18:33:16 -0800
commit8fca3c2df182af6e145cd6067a4a3bbafd4e2df3 (patch)
tree5171e9459e7b8310e8e139540a9576a510870d08 /PermissionController/src
parent79292285e688378a80ad8f91e4b24d53b5c581fc (diff)
Keep info icon shown when permission is fixed
Currently there is an issue on this screen that occurs when a permission is fixed: an "info" icon should, but does not, appear on the right side of the text "Enabled by admin" (or "Disabled by admin"). The root cause appears to be that, when the permission is fixed, the following sequence occurs: 1. On screen load the setAdminSupportDetail method is called, which actually does make the info icon visible (almost; see #2), because: - `mDetails.setExtraWidgetIconRes(info)` is called, which turns the icon into an info icon. - `mDetails.setOnSecondTargetClickListener(...)` is called, which results in the icon being visible (due to intentional logic in PermissionTwoTargetPreference). 2. But then just afterward, setDetail is called, which in this scenario invokes `mDetails.setOnSecondTargetClickListener(null)`, which results in actually hiding the icon. Upon comparing to LegacyAppPermissionFragment, it appears the call to `mDetails.set...Listener(null)` is the culprit, and that it probably should never have been added; removing it better matches the previous logic in LegacyAppPermissionFragment. Bug: 381455443 Relnote: N/A Test: manual test with CtsVerifier, test case [BYOD Managed Provisioning] -> [Permissions lockdown] Flag: com.android.permission.flags.app_permission_fragment_uses_preferences NO_IFTTT=this bug does not apply to LegacyAppPermissionFragment Change-Id: I46a0194a7be1b54e8d55aff7910e904bcfac8c96
Diffstat (limited to 'PermissionController/src')
-rw-r--r--PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v36/AppPermissionFragment.java1
1 files changed, 0 insertions, 1 deletions
diff --git a/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v36/AppPermissionFragment.java b/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v36/AppPermissionFragment.java
index 4fde26c9d..fc25c0f85 100644
--- a/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v36/AppPermissionFragment.java
+++ b/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v36/AppPermissionFragment.java
@@ -560,7 +560,6 @@ public class AppPermissionFragment extends SettingsWithLargeHeader
mDetails.setSummary(getPreferenceManager().getContext().getString(
detailResIds.getFirst(), detailResIds.getSecond()));
} else {
- mDetails.setOnSecondTargetClickListener(null);
mDetails.setSummary(getPreferenceManager().getContext().getString(
detailResIds.getFirst()));
}