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

Commit 93958301 authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

[Toast] Disable decorator updates if background drawables are used.

These lines cause an NPE when using Toast after toggling the flag.

Bug: 268470113
Test: manual
Change-Id: I3b2b162cde37fe780580872e015672c0c9339e4f
parent fcb6a5fc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -439,9 +439,11 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
            return;
        }

        if (!FeatureFlags.ENABLE_SEARCH_RESULT_BACKGROUND_DRAWABLES.get()) {
            RecyclerView.ItemDecoration decoration = getMainAdapterProvider().getDecorator();
            getSearchRecyclerView().removeItemDecoration(decoration);
            getSearchRecyclerView().addItemDecoration(decoration);
        }

        // replaceAppsRVcontainer() needs to use both mUsingTabs value to remove the old view AND
        // showTabs value to create new view. Hence the mUsingTabs new value assignment MUST happen