mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of a valid context Bug: 33032833 Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
This commit is contained in:
@@ -22,7 +22,7 @@ public class ToggleWeightWatcher extends Activity {
|
||||
show = !show;
|
||||
sp.edit().putBoolean(TestingUtils.SHOW_WEIGHT_WATCHER, show).apply();
|
||||
|
||||
Launcher launcher = (Launcher) LauncherAppState.getInstance().getModel().getCallback();
|
||||
Launcher launcher = (Launcher) LauncherAppState.getInstance(this).getModel().getCallback();
|
||||
if (launcher != null && launcher.mWeightWatcher != null) {
|
||||
launcher.mWeightWatcher.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user