mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
reset the saved value at disabling the widget
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user