reset the saved value at disabling the widget
This commit is contained in:
parent
c5c0913eb8
commit
cf831b5268
|
@ -196,6 +196,12 @@ public class MyWidgetProvider extends AppWidgetProvider implements Calculator {
|
||||||
resetSavedValue(context);
|
resetSavedValue(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisabled(Context context) {
|
||||||
|
super.onDisabled(context);
|
||||||
|
resetSavedValue(context);
|
||||||
|
}
|
||||||
|
|
||||||
private void resetSavedValue(Context context) {
|
private void resetSavedValue(Context context) {
|
||||||
if (prefs == null)
|
if (prefs == null)
|
||||||
prefs = initPrefs(context);
|
prefs = initPrefs(context);
|
||||||
|
|
Loading…
Reference in New Issue