mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Cancelling the stateannouncer when entering button drop target
Change-Id: Ia10298e1d4862fc5f46894fa6d934207d6e9c117
This commit is contained in:
@@ -124,6 +124,9 @@ public abstract class ButtonDropTarget extends TextView
|
||||
mDrawable.setColorFilter(new ColorMatrixColorFilter(mCurrentFilter));
|
||||
setTextColor(mHoverColor);
|
||||
}
|
||||
if (d.stateAnnouncer != null) {
|
||||
d.stateAnnouncer.cancel();
|
||||
}
|
||||
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ public class DragViewStateAnnouncer implements Runnable {
|
||||
mTargetView.postDelayed(this, TIMEOUT_SEND_ACCESSIBILITY_EVENT);
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
mTargetView.removeCallbacks(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
mTargetView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
||||
|
||||
Reference in New Issue
Block a user