Show notification to disable Incognito Mode when it's enabled (#4976)

* Show notification to disable Incognito Mode when it's enabled

* Finish ReaderActivity and BrowseSourceController when incognito is disabled

* CLeanup strings

* Only register DisableIncognitoReceiver when needed
This commit is contained in:
Ivan Iskandar
2021-05-01 09:36:54 +07:00
committed by GitHub
parent 908c9bc624
commit cb203ef02c
7 changed files with 101 additions and 6 deletions

View File

@@ -68,6 +68,12 @@ object Notifications {
const val CHANNEL_CRASH_LOGS = "crash_logs_channel"
const val ID_CRASH_LOGS = -601
/**
* Notification channel used for Incognito Mode
*/
const val CHANNEL_INCOGNITO_MODE = "incognito_mode_channel"
const val ID_INCOGNITO_MODE = -701
private val deprecatedChannels = listOf(
"downloader_channel",
"backup_restore_complete_channel"
@@ -154,6 +160,11 @@ object Notifications {
CHANNEL_CRASH_LOGS,
context.getString(R.string.channel_crash_logs),
NotificationManager.IMPORTANCE_HIGH
),
NotificationChannel(
CHANNEL_INCOGNITO_MODE,
context.getString(R.string.pref_incognito_mode),
NotificationManager.IMPORTANCE_LOW
)
).forEach(context.notificationManager::createNotificationChannel)