Make footer preferences non-clickable by default
cherry-picked from ag/2301717 Both the footer preference and the TextView they contain were clickable, which confused some accessibility services. Bug: 62050563 Test: Verified that switch access no longer offers users the option of clicking on the footer for accessibility services and Magnification as well as in the Battery settings screen. Change-Id: I5cb13d6268466c690dd38f2b652422d2c3d813b4 Merged-In: I937340fda93f6a8097919e1f86d5d890487370bc
This commit is contained in:
@@ -50,11 +50,14 @@ public class FooterPreference extends Preference {
|
||||
super.onBindViewHolder(holder);
|
||||
TextView title = holder.itemView.findViewById(android.R.id.title);
|
||||
title.setMovementMethod(new LinkMovementMethod());
|
||||
title.setClickable(false);
|
||||
title.setLongClickable(false);
|
||||
}
|
||||
|
||||
private void init() {
|
||||
setIcon(R.drawable.ic_info_outline_24dp);
|
||||
setKey(KEY_FOOTER);
|
||||
setOrder(ORDER_FOOTER);
|
||||
setSelectable(false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user