mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Merge branch '1654-notification-channel-unavailable' into 'master'
Fail gracefully when ACTION_CHANNEL_NOTIFICATION_SETTINGS is not available Closes #1654 See merge request briar/briar!1192
This commit is contained in:
@@ -495,7 +495,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;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
<string name="fix">Fix</string>
|
||||
<string name="help">Help</string>
|
||||
<string name="sorry">Sorry</string>
|
||||
<string name="error_start_activity">Unavailable on your system</string>
|
||||
|
||||
<!-- Contacts and Private Conversations-->
|
||||
<string name="no_contacts">No contacts to show</string>
|
||||
|
||||
Reference in New Issue
Block a user