mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
[android] fail gracefully when ACTION_CHANNEL_NOTIFICATION_SETTINGS is not available
This commit is contained in:
@@ -489,7 +489,13 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
||||
Intent intent = new Intent(ACTION_CHANNEL_NOTIFICATION_SETTINGS)
|
||||
.putExtra(EXTRA_APP_PACKAGE, packageName)
|
||||
.putExtra(EXTRA_CHANNEL_ID, channelId);
|
||||
startActivity(intent);
|
||||
Context ctx = requireContext();
|
||||
if (intent.resolveActivity(ctx.getPackageManager()) != null) {
|
||||
startActivity(intent);
|
||||
} else {
|
||||
Toast.makeText(ctx, R.string.error_start_activity, LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user