1
0
Fork 0

Issue #2381: Add feature-media component and enable notification for recording devices.

master
Sebastian Kaspari 2019-06-05 15:02:47 +02:00
parent ff2dd2d61e
commit b2d81aba43
3 changed files with 7 additions and 0 deletions

View File

@ -304,6 +304,7 @@ dependencies {
implementation Deps.mozilla_feature_customtabs
implementation Deps.mozilla_feature_downloads
implementation Deps.mozilla_feature_intent
implementation Deps.mozilla_feature_media
implementation Deps.mozilla_feature_prompts
implementation Deps.mozilla_feature_qr
implementation Deps.mozilla_feature_session

View File

@ -24,6 +24,7 @@ import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy.Companion.SAFE_BROWSING_ALL
import mozilla.components.concept.engine.mediaquery.PreferredColorScheme
import mozilla.components.concept.fetch.Client
import mozilla.components.feature.media.RecordingDevicesNotificationFeature
import mozilla.components.feature.session.HistoryDelegate
import mozilla.components.lib.crash.handler.CrashHandlerService
import org.mozilla.fenix.AppRequestInterceptor
@ -105,6 +106,10 @@ class Core(private val context: Context) {
// Install the "icons" WebExtension to automatically load icons for every visited website.
icons.install(engine, sessionManager)
// Show an ongoing notification when recording devices (camera, microphone) are used by web content
RecordingDevicesNotificationFeature(context, sessionManager)
.enable()
// Restore the previous state.
GlobalScope.launch(Dispatchers.Main) {
withContext(Dispatchers.IO) {

View File

@ -102,6 +102,7 @@ object Deps {
const val mozilla_feature_contextmenu = "org.mozilla.components:feature-contextmenu:${Versions.mozilla_android_components}"
const val mozilla_feature_customtabs = "org.mozilla.components:feature-customtabs:${Versions.mozilla_android_components}"
const val mozilla_feature_intent = "org.mozilla.components:feature-intent:${Versions.mozilla_android_components}"
const val mozilla_feature_media = "org.mozilla.components:feature-media:${Versions.mozilla_android_components}"
const val mozilla_feature_qr = "org.mozilla.components:feature-qr:${Versions.mozilla_android_components}"
const val mozilla_feature_search = "org.mozilla.components:feature-search:${Versions.mozilla_android_components}"
const val mozilla_feature_session = "org.mozilla.components:feature-session:${Versions.mozilla_android_components}"