Loading src/com/android/launcher3/folder/FolderPagedView.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,8 @@ import android.view.Gravity; import android.view.View; import android.view.View; import android.view.ViewDebug; import android.view.ViewDebug; import androidx.annotation.Nullable; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.CellLayout; import com.android.launcher3.CellLayout; Loading Loading @@ -230,11 +232,13 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli return textView; return textView; } } @Nullable @Override @Override public CellLayout getPageAt(int index) { public CellLayout getPageAt(int index) { return (CellLayout) getChildAt(index); return (CellLayout) getChildAt(index); } } @Nullable public CellLayout getCurrentCellLayout() { public CellLayout getCurrentCellLayout() { return getPageAt(getNextPage()); return getPageAt(getNextPage()); } } Loading Loading @@ -381,7 +385,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli } } private View getViewInCurrentPage(ToIntFunction<ShortcutAndWidgetContainer> rankProvider) { private View getViewInCurrentPage(ToIntFunction<ShortcutAndWidgetContainer> rankProvider) { if (getChildCount() < 1) { if (getChildCount() < 1 || getCurrentCellLayout() == null) { return null; return null; } } ShortcutAndWidgetContainer container = getCurrentCellLayout().getShortcutsAndWidgets(); ShortcutAndWidgetContainer container = getCurrentCellLayout().getShortcutsAndWidgets(); Loading Loading
src/com/android/launcher3/folder/FolderPagedView.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,8 @@ import android.view.Gravity; import android.view.View; import android.view.View; import android.view.ViewDebug; import android.view.ViewDebug; import androidx.annotation.Nullable; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.CellLayout; import com.android.launcher3.CellLayout; Loading Loading @@ -230,11 +232,13 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli return textView; return textView; } } @Nullable @Override @Override public CellLayout getPageAt(int index) { public CellLayout getPageAt(int index) { return (CellLayout) getChildAt(index); return (CellLayout) getChildAt(index); } } @Nullable public CellLayout getCurrentCellLayout() { public CellLayout getCurrentCellLayout() { return getPageAt(getNextPage()); return getPageAt(getNextPage()); } } Loading Loading @@ -381,7 +385,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli } } private View getViewInCurrentPage(ToIntFunction<ShortcutAndWidgetContainer> rankProvider) { private View getViewInCurrentPage(ToIntFunction<ShortcutAndWidgetContainer> rankProvider) { if (getChildCount() < 1) { if (getChildCount() < 1 || getCurrentCellLayout() == null) { return null; return null; } } ShortcutAndWidgetContainer container = getCurrentCellLayout().getShortcutsAndWidgets(); ShortcutAndWidgetContainer container = getCurrentCellLayout().getShortcutsAndWidgets(); Loading