Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3d8c958 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Null check in accessibility delegate

bug: 21338696
Change-Id: I00d67e53e03e33b26a8eadb669b60fec47553f26
parent 8522c80b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -219,9 +219,13 @@ public class LauncherAccessibilityDelegate extends AccessibilityDelegate {
    }

    private ArrayList<Integer> getSupportedResizeActions(View host, LauncherAppWidgetInfo info) {
        AppWidgetProviderInfo providerInfo = ((LauncherAppWidgetHostView) host).getAppWidgetInfo();
        ArrayList<Integer> actions = new ArrayList<>();

        AppWidgetProviderInfo providerInfo = ((LauncherAppWidgetHostView) host).getAppWidgetInfo();
        if (providerInfo == null) {
            return actions;
        }

        CellLayout layout = (CellLayout) host.getParent().getParent();
        if ((providerInfo.resizeMode & AppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0) {
            if (layout.isRegionVacant(info.cellX + info.spanX, info.cellY, 1, info.spanY) ||