Small fix

This commit is contained in:
M66B 2019-02-14 12:47:02 +00:00
parent 041f2ca3d4
commit 572607a76b
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ public class ServiceTileSynchronize extends TileService implements SharedPrefere
private void update() { private void update() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean enabled = prefs.getBoolean("enabled", false); boolean enabled = prefs.getBoolean("enabled", true);
Log.i("Update tile synchronize=" + enabled); Log.i("Update tile synchronize=" + enabled);
Tile tile = getQsTile(); Tile tile = getQsTile();
@ -66,7 +66,7 @@ public class ServiceTileSynchronize extends TileService implements SharedPrefere
Log.i("Click tile synchronize"); Log.i("Click tile synchronize");
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean enabled = !prefs.getBoolean("enabled", false); boolean enabled = !prefs.getBoolean("enabled", true);
prefs.edit().putBoolean("enabled", enabled).apply(); prefs.edit().putBoolean("enabled", enabled).apply();
ServiceSynchronize.reload(this, "tile=" + enabled); ServiceSynchronize.reload(this, "tile=" + enabled);
} }