fixable message removed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user