Remove disruptive announcement when exiting folder

Accessibility announcement needs to be disabled when folder is closing

Test: Manual
Flag: EXEMPT bug fix
Fix: 383248901
Change-Id: Ie6077a1214c234946bc9fb59ce54dfa7107188bd
This commit is contained in:
Sihua Ma
2024-12-20 19:30:14 +00:00
parent 636aba5acb
commit 4cc729ebca
2 changed files with 17 additions and 0 deletions
@@ -100,6 +100,8 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
// animating or is open.
private boolean mViewsBound = false;
private boolean mCanAnnouncePageDescription;
public FolderPagedView(Context context, AttributeSet attrs) {
this(
context,
@@ -170,6 +172,19 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
mViewsBound = true;
}
void setCanAnnouncePageDescriptionForFolder(boolean canAnnounce) {
mCanAnnouncePageDescription = canAnnounce;
}
private boolean canAnnouncePageDescriptionForFolder() {
return mCanAnnouncePageDescription;
}
@Override
protected boolean canAnnouncePageDescription() {
return super.canAnnouncePageDescription() && canAnnouncePageDescriptionForFolder();
}
/**
* Removes all the icons from the folder
*/