Refactor LauncherAccessibilityDelegate so it can be used outside of Launcher
Bug: 198438631 Test: used talkback on launcher Change-Id: I991320184ad93816c4ba21fb8fcfe12202bfae25
This commit is contained in:
1 parent
329d07d91d
commit
bdb0dd8cfb
7 files changed
+233
-183
No files matched your search
@@ -71,12 +71,12 @@ public class ShortcutMenuAccessibilityDelegate extends LauncherAccessibilityDele
|
||||
if (screenId == -1) {
|
||||
return false;
|
||||
}
|
||||
mLauncher.getStateManager().goToState(NORMAL, true, forSuccessCallback(() -> {
|
||||
mLauncher.getModelWriter().addItemToDatabase(info,
|
||||
mContext.getStateManager().goToState(NORMAL, true, forSuccessCallback(() -> {
|
||||
mContext.getModelWriter().addItemToDatabase(info,
|
||||
LauncherSettings.Favorites.CONTAINER_DESKTOP,
|
||||
screenId, coordinates[0], coordinates[1]);
|
||||
mLauncher.bindItems(Collections.singletonList(info), true);
|
||||
AbstractFloatingView.closeAllOpenViews(mLauncher);
|
||||
mContext.bindItems(Collections.singletonList(info), true);
|
||||
AbstractFloatingView.closeAllOpenViews(mContext);
|
||||
announceConfirmation(R.string.item_added_to_workspace);
|
||||
}));
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user