mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
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:
@@ -680,6 +680,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
closeOpenFolder(openFolder);
|
||||
|
||||
mContent.bindItems(items);
|
||||
mContent.setCanAnnouncePageDescriptionForFolder(true);
|
||||
centerAboutIcon();
|
||||
mItemsInvalidated = true;
|
||||
updateTextViewFocus();
|
||||
@@ -813,6 +814,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
@Override
|
||||
protected void handleClose(boolean animate) {
|
||||
mIsOpen = false;
|
||||
mContent.setCanAnnouncePageDescriptionForFolder(false);
|
||||
|
||||
if (!animate && mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
|
||||
mCurrentAnimator.cancel();
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user