Activity: HACK: catch errors in onCreateOptionsMenu()

This method throws some non critical errors in the Open Sudoku app.
Catch them for now until we fixed the root cause.
This commit is contained in:
Julian Winkler 2025-02-18 18:56:19 +01:00
parent f20bb6cb1c
commit b911d73eb3

View file

@ -428,7 +428,13 @@ public class Activity extends ContextThemeWrapper implements Window.Callback, La
@Override
public boolean onCreatePanelMenu(int featureId, Menu menu) {
if (featureId == Window.FEATURE_OPTIONS_PANEL) {
return onCreateOptionsMenu(menu);
// HACK: catch non critical error occuring in Open Sudoku app
try {
return onCreateOptionsMenu(menu);
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
return false;
}