Merge "Do not annouce Collapse/Expand if there are less or equal to 2 permissions in the list" into udc-dev am: 0bd4117a76

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22973017

Change-Id: I75beb9ba75721a44b9f0d7aede3848e5de9c2071
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Evan Chen
2023-05-02 21:21:17 +00:00
committed by Automerger Merge Worker

View File

@@ -123,12 +123,11 @@ class PermissionListAdapter extends RecyclerView.Adapter<PermissionListAdapter.V
viewHolder.mExpandButton.setTag(R.drawable.btn_expand_more); viewHolder.mExpandButton.setTag(R.drawable.btn_expand_more);
} }
setAccessibility(view, viewType,
AccessibilityNodeInfo.ACTION_CLICK, R.string.permission_expand, 0);
// Add expand buttons if the permissions are more than PERMISSION_SIZE in this list also // Add expand buttons if the permissions are more than PERMISSION_SIZE in this list also
// make the summary invisible by default. // make the summary invisible by default.
if (mPermissions.size() > PERMISSION_SIZE) { if (mPermissions.size() > PERMISSION_SIZE) {
setAccessibility(view, viewType,
AccessibilityNodeInfo.ACTION_CLICK, R.string.permission_expand, 0);
viewHolder.mPermissionSummary.setVisibility(View.GONE); viewHolder.mPermissionSummary.setVisibility(View.GONE);