Loading src/com/android/launcher3/Launcher.java +4 −3 Original line number Diff line number Diff line Loading @@ -1402,8 +1402,9 @@ public class Launcher extends StatefulActivity<LauncherState> * @param info The data structure describing the shortcut. * @return A View inflated from layoutResId. */ public View createShortcut(ViewGroup parent, WorkspaceItemInfo info) { BubbleTextView favorite = (BubbleTextView) LayoutInflater.from(parent.getContext()) public View createShortcut(@Nullable ViewGroup parent, WorkspaceItemInfo info) { BubbleTextView favorite = (BubbleTextView) LayoutInflater.from(parent != null ? parent.getContext() : this) .inflate(R.layout.app_icon, parent, false); favorite.applyFromWorkspaceItem(info); favorite.setOnClickListener(getItemOnClickListener()); Loading src/com/android/launcher3/folder/LauncherDelegate.java +0 −3 Original line number Diff line number Diff line Loading @@ -94,9 +94,6 @@ public class LauncherDelegate { // folder CellLayout cellLayout = mLauncher.getCellLayout(info.container, mLauncher.getCellPosMapper().mapModelToPresenter(info).screenId); if (cellLayout == null) { return; } finalItem = info.contents.remove(0); newIcon = mLauncher.createShortcut(cellLayout, finalItem); mLauncher.getModelWriter().addOrMoveItemInDatabase(finalItem, Loading Loading
src/com/android/launcher3/Launcher.java +4 −3 Original line number Diff line number Diff line Loading @@ -1402,8 +1402,9 @@ public class Launcher extends StatefulActivity<LauncherState> * @param info The data structure describing the shortcut. * @return A View inflated from layoutResId. */ public View createShortcut(ViewGroup parent, WorkspaceItemInfo info) { BubbleTextView favorite = (BubbleTextView) LayoutInflater.from(parent.getContext()) public View createShortcut(@Nullable ViewGroup parent, WorkspaceItemInfo info) { BubbleTextView favorite = (BubbleTextView) LayoutInflater.from(parent != null ? parent.getContext() : this) .inflate(R.layout.app_icon, parent, false); favorite.applyFromWorkspaceItem(info); favorite.setOnClickListener(getItemOnClickListener()); Loading
src/com/android/launcher3/folder/LauncherDelegate.java +0 −3 Original line number Diff line number Diff line Loading @@ -94,9 +94,6 @@ public class LauncherDelegate { // folder CellLayout cellLayout = mLauncher.getCellLayout(info.container, mLauncher.getCellPosMapper().mapModelToPresenter(info).screenId); if (cellLayout == null) { return; } finalItem = info.contents.remove(0); newIcon = mLauncher.createShortcut(cellLayout, finalItem); mLauncher.getModelWriter().addOrMoveItemInDatabase(finalItem, Loading