mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
am d21301e6: Cancelling the stateannouncer when entering button drop target
* commit 'd21301e674377ecd72bd14f32b52c68fabcfd3be': Cancelling the stateannouncer when entering button drop target
This commit is contained in:
@@ -127,6 +127,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