Fixing crash when getActivity is null
> Also changing the default value of preferences to true Change-Id: I0a80d9b6b76d7210b12c952cf8e991a3eb327e5c
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user