Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ad17875 authored by Evan Chen's avatar Evan Chen
Browse files

Do not annouce Collapse/Expand if there are less or equal to 2 permissions in the list

Test: CTS
Fix: 278638141
Change-Id: Ia22ccb8972ddd980fbd15bc4aaa4709d611a94b2
parent d7fd5e78
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -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);