Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE in DepthController #3371

Merged
merged 6 commits into from Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -48,6 +48,7 @@
import com.patrykmichalik.opto.domain.Preference;
import com.patrykmichalik.opto.core.PreferenceExtensionsKt;

import app.lawnchair.LawnchairApp;
import app.lawnchair.preferences.BasePreferenceManager;
import app.lawnchair.preferences.PreferenceManager;
import app.lawnchair.preferences2.PreferenceManager2;
Expand Down Expand Up @@ -174,7 +175,9 @@ public void run() {

public DepthController(Launcher l) {
mLauncher = l;
Preference<Boolean, Boolean, ?> depthPref = PreferenceManager2.getInstance(l).getWallpaperDepthEffect();
// TODO: No need to use app context here after merging Android 13 branch.
// https://cs.android.com/android/platform/superproject/+/master:packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java;drc=eef0b1640bbc8c26c824836271a71b929726e895;l=175
Preference<Boolean, Boolean, ?> depthPref = PreferenceManager2.getInstance(LawnchairApp.getInstance()).getWallpaperDepthEffect();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mEnableDepth = PreferenceExtensionsKt.firstBlocking(depthPref);
}

Expand Down