fixable message removed

This commit is contained in:
Solovyev_S
2013-07-01 11:31:06 +04:00
parent cd2f43bb43
commit 5518a38f16
4 changed files with 0 additions and 26 deletions

View File

@@ -46,31 +46,8 @@ public class CalculatorOnscreenStartActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Android.isComponentEnabled(this, CalculatorOnscreenStartActivity.class)) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (!CalculatorPreferences.OnscreenCalculator.removeIconDialogShown.getPreference(prefs)) {
FixableMessagesDialog.showDialog(Arrays.asList(new FixableMessage(getString(R.string.cpp_onscreen_remove_icon_message), MessageType.warning, new RemoveIconFixableError(this))), this, false);
CalculatorPreferences.OnscreenCalculator.removeIconDialogShown.putPreference(prefs, true);
}
}
CalculatorOnscreenService.showOnscreenView(this);
this.finish();
}
public static class RemoveIconFixableError extends AbstractFixableError {
public RemoveIconFixableError(@Nonnull Context context) {
super(context.getString(R.string.cpp_onscreen_remove_icon_button_text));
}
@Override
public void fix() {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(App.getApplication());
CalculatorPreferences.OnscreenCalculator.showAppIcon.putPreference(prefs, false);
}
}
}