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

Commit 5ae82081 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing crash when getActivity is null

> Also changing the default value of preferences to true

Change-Id: I0a80d9b6b76d7210b12c952cf8e991a3eb327e5c
parent 745bad9d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -77,8 +77,8 @@ public class SettingsActivity extends Activity {
                @Override
                protected Boolean doInBackground(Void... params) {
                    Bundle extras = new Bundle();
                    extras.putBoolean(LauncherSettings.Settings.EXTRA_DEFAULT_VALUE, false);
                    Bundle value = getActivity().getContentResolver().call(
                    extras.putBoolean(LauncherSettings.Settings.EXTRA_DEFAULT_VALUE, true);
                    Bundle value = pref.getContext().getContentResolver().call(
                            LauncherSettings.Settings.CONTENT_URI,
                            LauncherSettings.Settings.METHOD_GET_BOOLEAN,
                            pref.getKey(), extras);