mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-13 12:31:12 +01:00
Catch IllegalArgumentException from startActivity
This commit is contained in:
parent
6ca055bb25
commit
46c9c4b80e
1 changed files with 17 additions and 15 deletions
|
|
@ -736,7 +736,9 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||
stylingIntent.setClassName("com.termux.styling", "com.termux.styling.TermuxStyleActivity");
|
||||
try {
|
||||
startActivity(stylingIntent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
} catch (ActivityNotFoundException | IllegalArgumentException e) {
|
||||
// The startActivity() call is not documented to throw IllegalArgumentException.
|
||||
// However, crash reporting shows that it sometimes does, so catch it here.
|
||||
new AlertDialog.Builder(this).setMessage(R.string.styling_not_installed)
|
||||
.setPositiveButton(R.string.styling_install, new android.content.DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue