reset the saved value at disabling the widget

This commit is contained in:
tibbi 2016-01-26 20:41:37 +01:00
parent c5c0913eb8
commit cf831b5268

View file

@ -196,6 +196,12 @@ public class MyWidgetProvider extends AppWidgetProvider implements Calculator {
resetSavedValue(context);
}
@Override
public void onDisabled(Context context) {
super.onDisabled(context);
resetSavedValue(context);
}
private void resetSavedValue(Context context) {
if (prefs == null)
prefs = initPrefs(context);