Caching the uninstall disabled state for each userHandle

> Removing static access to varios drop targets
> Creating a cache at UI level with 5sec timeout

Bug: 67104426
Change-Id: Ide6e2e0c01606f9b5fb9281f95dc009873c18fb9
This commit is contained in:
Sunny Goyal
2017-10-24 14:54:30 -07:00
parent be93f264d7
commit 0236d0b0ba
6 changed files with 125 additions and 82 deletions

View File

@@ -201,6 +201,10 @@ public abstract class ButtonDropTarget extends TextView
protected abstract boolean supportsDrop(ItemInfo info);
public boolean supportsAccessibilityDrop(ItemInfo info) {
return supportsDrop(info);
}
@Override
public boolean isDropEnabled() {
return mActive && (mAccessibleDrag ||
@@ -241,9 +245,13 @@ public abstract class ButtonDropTarget extends TextView
DragLayer.ANIMATION_END_DISAPPEAR, null);
}
public abstract int getAccessibilityAction();
@Override
public void prepareAccessibilityDrop() { }
public abstract void onAccessibilityDrop(View view, ItemInfo item);
public abstract void completeDrop(DragObject d);
@Override