mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Code cleanup.
This commit is contained in:
@@ -65,7 +65,6 @@ import javax.inject.Inject;
|
|||||||
import static android.app.Notification.DEFAULT_LIGHTS;
|
import static android.app.Notification.DEFAULT_LIGHTS;
|
||||||
import static android.app.Notification.DEFAULT_SOUND;
|
import static android.app.Notification.DEFAULT_SOUND;
|
||||||
import static android.app.Notification.DEFAULT_VIBRATE;
|
import static android.app.Notification.DEFAULT_VIBRATE;
|
||||||
import static android.app.Notification.VISIBILITY_SECRET;
|
|
||||||
import static android.app.NotificationManager.IMPORTANCE_DEFAULT;
|
import static android.app.NotificationManager.IMPORTANCE_DEFAULT;
|
||||||
import static android.app.NotificationManager.IMPORTANCE_LOW;
|
import static android.app.NotificationManager.IMPORTANCE_LOW;
|
||||||
import static android.content.Context.NOTIFICATION_SERVICE;
|
import static android.content.Context.NOTIFICATION_SERVICE;
|
||||||
@@ -75,6 +74,7 @@ import static android.os.Build.VERSION.SDK_INT;
|
|||||||
import static android.support.v4.app.NotificationCompat.CATEGORY_MESSAGE;
|
import static android.support.v4.app.NotificationCompat.CATEGORY_MESSAGE;
|
||||||
import static android.support.v4.app.NotificationCompat.CATEGORY_SOCIAL;
|
import static android.support.v4.app.NotificationCompat.CATEGORY_SOCIAL;
|
||||||
import static android.support.v4.app.NotificationCompat.PRIORITY_LOW;
|
import static android.support.v4.app.NotificationCompat.PRIORITY_LOW;
|
||||||
|
import static android.support.v4.app.NotificationCompat.VISIBILITY_SECRET;
|
||||||
import static java.util.logging.Level.WARNING;
|
import static java.util.logging.Level.WARNING;
|
||||||
import static org.briarproject.bramble.util.LogUtils.logException;
|
import static org.briarproject.bramble.util.LogUtils.logException;
|
||||||
import static org.briarproject.briar.android.activity.BriarActivity.GROUP_ID;
|
import static org.briarproject.briar.android.activity.BriarActivity.GROUP_ID;
|
||||||
@@ -623,13 +623,12 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
|
|||||||
public void showSignInNotification() {
|
public void showSignInNotification() {
|
||||||
if (blockSignInReminder) return;
|
if (blockSignInReminder) return;
|
||||||
if (SDK_INT >= 26) {
|
if (SDK_INT >= 26) {
|
||||||
|
String title = appContext
|
||||||
|
.getString(R.string.reminder_notification_channel_title);
|
||||||
NotificationChannel channel =
|
NotificationChannel channel =
|
||||||
new NotificationChannel(REMINDER_CHANNEL_ID, appContext
|
new NotificationChannel(REMINDER_CHANNEL_ID, title,
|
||||||
.getString(
|
|
||||||
R.string.reminder_notification_channel_title),
|
|
||||||
IMPORTANCE_LOW);
|
IMPORTANCE_LOW);
|
||||||
channel.setLockscreenVisibility(
|
channel.setLockscreenVisibility(VISIBILITY_SECRET);
|
||||||
NotificationCompat.VISIBILITY_SECRET);
|
|
||||||
notificationManager.createNotificationChannel(channel);
|
notificationManager.createNotificationChannel(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user