Commit 4eb90523 authored by Roger Yang's avatar Roger Yang
Browse files

Close #5795: Support viewport-fit descriptor via onMetaViewportFitChange

parent 892e1de5
......@@ -5,6 +5,8 @@
package mozilla.components.browser.engine.gecko
import android.annotation.SuppressLint
import android.os.Build
import android.view.WindowManager
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
......@@ -681,6 +683,18 @@ class GeckoEngineSession(
notifyObservers { onWebAppManifestLoaded(parsed.manifest) }
}
}
override fun onMetaViewportFitChange(session: GeckoSession, viewportFit: String) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
val layoutInDisplayCutoutMode = when (viewportFit) {
"cover" -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
"contain" -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
else -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT
}
notifyObservers { onMetaViewportFitChanged(layoutInDisplayCutoutMode) }
}
}
}
private fun createContentBlockingDelegate() = object : ContentBlocking.Delegate {
......
......@@ -7,6 +7,7 @@ package mozilla.components.browser.engine.gecko
import android.content.Intent
import android.os.Handler
import android.os.Message
import android.view.WindowManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runBlockingTest
......@@ -52,6 +53,7 @@ import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.anyList
import org.mockito.ArgumentMatchers.anyString
import org.mockito.Mockito.never
import org.mockito.Mockito.reset
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
import org.mockito.Mockito.verifyZeroInteractions
......@@ -1748,6 +1750,33 @@ class GeckoEngineSessionTest {
verify(geckoSession).exitFullScreen()
}
@Test
fun viewportFitChangeTranslateValuesCorrectly() {
val engineSession = GeckoEngineSession(mock(),
geckoSessionProvider = geckoSessionProvider)
val observer: EngineSession.Observer = mock()
// Verify the call to the observer.
engineSession.register(observer)
captureDelegates()
contentDelegate.value.onMetaViewportFitChange(geckoSession, "test")
verify(observer).onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT)
reset(observer)
contentDelegate.value.onMetaViewportFitChange(geckoSession, "auto")
verify(observer).onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT)
reset(observer)
contentDelegate.value.onMetaViewportFitChange(geckoSession, "cover")
verify(observer).onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES)
reset(observer)
contentDelegate.value.onMetaViewportFitChange(geckoSession, "contain")
verify(observer).onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER)
reset(observer)
}
@Test
fun clearData() {
val engineSession = GeckoEngineSession(runtime, geckoSessionProvider = geckoSessionProvider)
......
......@@ -17,6 +17,7 @@ import mozilla.components.browser.session.ext.toTabSessionState
import mozilla.components.browser.state.action.ContentAction.AddFindResultAction
import mozilla.components.browser.state.action.ContentAction.ClearFindResultsAction
import mozilla.components.browser.state.action.ContentAction.ConsumeHitResultAction
import mozilla.components.browser.state.action.ContentAction.FullScreenChangedAction
import mozilla.components.browser.state.action.ContentAction.RemoveThumbnailAction
import mozilla.components.browser.state.action.ContentAction.UpdateHitResultAction
import mozilla.components.browser.state.action.ContentAction.UpdateLoadingStateAction
......@@ -26,6 +27,7 @@ import mozilla.components.browser.state.action.ContentAction.UpdateSecurityInfoA
import mozilla.components.browser.state.action.ContentAction.UpdateThumbnailAction
import mozilla.components.browser.state.action.ContentAction.UpdateTitleAction
import mozilla.components.browser.state.action.ContentAction.UpdateUrlAction
import mozilla.components.browser.state.action.ContentAction.ViewportFitChangedAction
import mozilla.components.browser.state.action.CustomTabListAction.RemoveCustomTabAction
import mozilla.components.browser.state.action.EngineAction
import mozilla.components.browser.state.action.TabListAction.AddTabAction
......@@ -98,6 +100,10 @@ class Session(
fun onFindResult(session: Session, result: FindResult) = Unit
fun onDesktopModeChanged(session: Session, enabled: Boolean) = Unit
fun onFullScreenChanged(session: Session, enabled: Boolean) = Unit
/**
* @param layoutInDisplayCutoutMode value of defined in https://developer.android.com/reference/android/view/WindowManager.LayoutParams#layoutInDisplayCutoutMode
*/
fun onMetaViewportFitChanged(session: Session, layoutInDisplayCutoutMode: Int) = Unit
fun onThumbnailChanged(session: Session, bitmap: Bitmap?) = Unit
fun onContentPermissionRequested(session: Session, permissionRequest: PermissionRequest): Boolean = false
fun onAppPermissionRequested(session: Session, permissionRequest: PermissionRequest): Boolean = false
......@@ -406,7 +412,17 @@ class Session(
* Exits fullscreen mode if it's in that state.
*/
var fullScreenMode: Boolean by Delegates.observable(false) { _, old, new ->
notifyObservers(old, new) { onFullScreenChanged(this@Session, new) }
if (notifyObservers(old, new) { onFullScreenChanged(this@Session, new) }) {
store?.syncDispatch(FullScreenChangedAction(id, new))
}
}
/**
* Display cutout mode state.
*/
var layoutInDisplayCutoutMode: Int by Delegates.observable(0) { _, _, new ->
notifyObservers { onMetaViewportFitChanged(this@Session, new) }
store?.syncDispatch(ViewportFitChangedAction(id, new))
}
/**
......
......@@ -208,6 +208,10 @@ internal class EngineObserver(
session.fullScreenMode = enabled
}
override fun onMetaViewportFitChanged(layoutInDisplayCutoutMode: Int) {
session.layoutInDisplayCutoutMode = layoutInDisplayCutoutMode
}
override fun onThumbnailChange(bitmap: Bitmap?) {
session.thumbnail = bitmap
}
......
......@@ -5,6 +5,7 @@
package mozilla.components.browser.session
import android.graphics.Bitmap
import android.view.WindowManager
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.async
......@@ -673,6 +674,21 @@ class SessionTest {
verify(observer, never()).onFullScreenChanged(session, false)
}
@Test
fun `observer is notified on meta viewport fit change`() {
val observer = mock(Session.Observer::class.java)
val session = Session("https://www.mozilla.org")
session.register(observer)
session.layoutInDisplayCutoutMode =
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT
verify(observer).onMetaViewportFitChanged(session,
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT)
reset(observer)
session.unregister(observer)
session.layoutInDisplayCutoutMode = 123
verify(observer, never()).onMetaViewportFitChanged(session, 123)
}
@Test
fun `observer is notified on on thumbnail changed `() {
val observer = mock(Session.Observer::class.java)
......
......@@ -5,6 +5,7 @@
package mozilla.components.browser.session.engine
import android.graphics.Bitmap
import android.view.WindowManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import mozilla.components.browser.session.Session
import mozilla.components.browser.session.SessionManager
......@@ -392,6 +393,24 @@ class EngineObserverTest {
assertEquals(false, session.fullScreenMode)
}
@Test
fun engineObserverNotifiesMetaViewportFitChange() {
val session = Session("https://www.mozilla.org")
val observer = EngineObserver(session)
observer.onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT)
assertEquals(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT,
session.layoutInDisplayCutoutMode)
observer.onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES)
assertEquals(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES,
session.layoutInDisplayCutoutMode)
observer.onMetaViewportFitChanged(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER)
assertEquals(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER,
session.layoutInDisplayCutoutMode)
observer.onMetaViewportFitChanged(123)
assertEquals(123, session.layoutInDisplayCutoutMode)
}
@Test
fun `Engine observer notified when thumbnail is assigned`() {
val session = Session("https://www.mozilla.org")
......
......@@ -246,6 +246,19 @@ sealed class ContentAction : BrowserAction() {
* Removes the [SearchRequest] of the [ContentState] with the given [sessionId].
*/
data class ConsumeSearchRequestAction(val sessionId: String) : ContentAction()
/**
* Updates the [fullScreenEnabled] with the given [sessionId].
*/
data class FullScreenChangedAction(val sessionId: String, val fullScreenEnabled: Boolean) : ContentAction()
/**
* Updates the [layoutInDisplayCutoutMode] with the given [sessionId].
*
* @property sessionId the ID of the session
* @property layoutInDisplayCutoutMode value of defined in https://developer.android.com/reference/android/view/WindowManager.LayoutParams#layoutInDisplayCutoutMode
*/
data class ViewportFitChangedAction(val sessionId: String, val layoutInDisplayCutoutMode: Int) : ContentAction()
}
/**
......
......@@ -99,6 +99,12 @@ internal object ContentStateReducer {
is ContentAction.ConsumeSearchRequestAction -> updateContentState(state, action.sessionId) {
it.copy(searchRequest = null)
}
is ContentAction.FullScreenChangedAction -> updateContentState(state, action.sessionId) {
it.copy(fullScreen = action.fullScreenEnabled)
}
is ContentAction.ViewportFitChangedAction -> updateContentState(state, action.sessionId) {
it.copy(layoutInDisplayCutoutMode = action.layoutInDisplayCutoutMode)
}
}
}
}
......
......@@ -33,6 +33,8 @@ import mozilla.components.concept.engine.window.WindowRequest
* @property findResults the list of results of the latest "find in page" operation.
* @property windowRequest the last received [WindowRequest].
* @property searchRequest the last received [SearchRequest]
* @property fullScreen true if the page is full screen, false if not.
* @property layoutInDisplayCutoutMode the display layout cutout mode state.
*/
data class ContentState(
val url: String,
......@@ -49,5 +51,7 @@ data class ContentState(
val promptRequest: PromptRequest? = null,
val findResults: List<FindResultState> = emptyList(),
val windowRequest: WindowRequest? = null,
val searchRequest: SearchRequest? = null
val searchRequest: SearchRequest? = null,
val fullScreen: Boolean = false,
val layoutInDisplayCutoutMode: Int = 0
)
......@@ -54,6 +54,11 @@ abstract class EngineSession(
fun onFind(text: String) = Unit
fun onFindResult(activeMatchOrdinal: Int, numberOfMatches: Int, isDoneCounting: Boolean) = Unit
fun onFullScreenChange(enabled: Boolean) = Unit
/**
* @param layoutInDisplayCutoutMode value of defined in https://developer.android.com/reference/android/view/WindowManager.LayoutParams#layoutInDisplayCutoutMode
*/
fun onMetaViewportFitChanged(layoutInDisplayCutoutMode: Int) = Unit
fun onThumbnailChange(bitmap: Bitmap?) = Unit
fun onAppPermissionRequest(permissionRequest: PermissionRequest) = permissionRequest.reject()
fun onContentPermissionRequest(permissionRequest: PermissionRequest) = permissionRequest.reject()
......
......@@ -58,6 +58,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search") }
session.notifyInternalObservers { onFindResult(0, 1, true) }
session.notifyInternalObservers { onFullScreenChange(true) }
session.notifyInternalObservers { onMetaViewportFitChanged(1) }
session.notifyInternalObservers { onThumbnailChange(emptyBitmap) }
session.notifyInternalObservers { onContentPermissionRequest(permissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(permissionRequest) }
......@@ -84,6 +85,7 @@ class EngineSessionTest {
verify(observer).onFind("search")
verify(observer).onFindResult(0, 1, true)
verify(observer).onFullScreenChange(true)
verify(observer).onMetaViewportFitChanged(1)
verify(observer).onThumbnailChange(emptyBitmap)
verify(observer).onAppPermissionRequest(permissionRequest)
verify(observer).onContentPermissionRequest(permissionRequest)
......@@ -123,6 +125,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search") }
session.notifyInternalObservers { onFindResult(0, 1, true) }
session.notifyInternalObservers { onFullScreenChange(true) }
session.notifyInternalObservers { onMetaViewportFitChanged(1) }
session.notifyInternalObservers { onThumbnailChange(emptyBitmap) }
session.notifyInternalObservers { onContentPermissionRequest(permissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(permissionRequest) }
......@@ -147,6 +150,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search2") }
session.notifyInternalObservers { onFindResult(0, 1, false) }
session.notifyInternalObservers { onFullScreenChange(false) }
session.notifyInternalObservers { onMetaViewportFitChanged(2) }
session.notifyInternalObservers { onThumbnailChange(null) }
session.notifyInternalObservers { onContentPermissionRequest(otherPermissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(otherPermissionRequest) }
......@@ -169,6 +173,7 @@ class EngineSessionTest {
verify(observer).onFind("search")
verify(observer).onFindResult(0, 1, true)
verify(observer).onFullScreenChange(true)
verify(observer).onMetaViewportFitChanged(1)
verify(observer).onThumbnailChange(emptyBitmap)
verify(observer).onAppPermissionRequest(permissionRequest)
verify(observer).onContentPermissionRequest(permissionRequest)
......@@ -188,6 +193,7 @@ class EngineSessionTest {
verify(observer, never()).onFind("search2")
verify(observer, never()).onFindResult(0, 1, false)
verify(observer, never()).onFullScreenChange(false)
verify(observer, never()).onMetaViewportFitChanged(2)
verify(observer, never()).onThumbnailChange(null)
verify(observer, never()).onAppPermissionRequest(otherPermissionRequest)
verify(observer, never()).onContentPermissionRequest(otherPermissionRequest)
......@@ -227,6 +233,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search") }
session.notifyInternalObservers { onFindResult(0, 1, true) }
session.notifyInternalObservers { onFullScreenChange(true) }
session.notifyInternalObservers { onMetaViewportFitChanged(1) }
session.notifyInternalObservers { onThumbnailChange(emptyBitmap) }
session.notifyInternalObservers { onContentPermissionRequest(permissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(permissionRequest) }
......@@ -246,6 +253,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search2") }
session.notifyInternalObservers { onFindResult(0, 1, false) }
session.notifyInternalObservers { onFullScreenChange(false) }
session.notifyInternalObservers { onMetaViewportFitChanged(2) }
session.notifyInternalObservers { onThumbnailChange(null) }
session.notifyInternalObservers { onContentPermissionRequest(otherPermissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(otherPermissionRequest) }
......@@ -263,6 +271,7 @@ class EngineSessionTest {
verify(observer).onFind("search")
verify(observer).onFindResult(0, 1, true)
verify(observer).onFullScreenChange(true)
verify(observer).onMetaViewportFitChanged(1)
verify(observer).onThumbnailChange(emptyBitmap)
verify(observer).onAppPermissionRequest(permissionRequest)
verify(observer).onContentPermissionRequest(permissionRequest)
......@@ -279,6 +288,7 @@ class EngineSessionTest {
verify(observer, never()).onFind("search2")
verify(observer, never()).onFindResult(0, 1, false)
verify(observer, never()).onFullScreenChange(false)
verify(observer, never()).onMetaViewportFitChanged(2)
verify(observer, never()).onThumbnailChange(null)
verify(observer, never()).onAppPermissionRequest(otherPermissionRequest)
verify(observer, never()).onContentPermissionRequest(otherPermissionRequest)
......@@ -295,6 +305,7 @@ class EngineSessionTest {
verify(otherObserver, never()).onFind("search2")
verify(otherObserver, never()).onFindResult(0, 1, false)
verify(otherObserver, never()).onFullScreenChange(false)
verify(otherObserver, never()).onMetaViewportFitChanged(2)
verify(otherObserver, never()).onThumbnailChange(null)
verify(otherObserver, never()).onAppPermissionRequest(otherPermissionRequest)
verify(otherObserver, never()).onContentPermissionRequest(otherPermissionRequest)
......@@ -327,6 +338,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search") }
session.notifyInternalObservers { onFindResult(0, 1, true) }
session.notifyInternalObservers { onFullScreenChange(true) }
session.notifyInternalObservers { onMetaViewportFitChanged(1) }
session.notifyInternalObservers { onThumbnailChange(emptyBitmap) }
session.notifyInternalObservers { onContentPermissionRequest(permissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(permissionRequest) }
......@@ -346,6 +358,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search2") }
session.notifyInternalObservers { onFindResult(0, 1, false) }
session.notifyInternalObservers { onFullScreenChange(false) }
session.notifyInternalObservers { onMetaViewportFitChanged(2) }
session.notifyInternalObservers { onThumbnailChange(null) }
session.notifyInternalObservers { onContentPermissionRequest(otherPermissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(otherPermissionRequest) }
......@@ -363,6 +376,7 @@ class EngineSessionTest {
verify(observer).onFind("search")
verify(observer).onFindResult(0, 1, true)
verify(observer).onFullScreenChange(true)
verify(observer).onMetaViewportFitChanged(1)
verify(observer).onThumbnailChange(emptyBitmap)
verify(observer).onAppPermissionRequest(permissionRequest)
verify(observer).onContentPermissionRequest(permissionRequest)
......@@ -379,6 +393,7 @@ class EngineSessionTest {
verify(observer, never()).onFind("search2")
verify(observer, never()).onFindResult(0, 1, false)
verify(observer, never()).onFullScreenChange(false)
verify(observer, never()).onMetaViewportFitChanged(2)
verify(observer, never()).onThumbnailChange(null)
verify(observer, never()).onAppPermissionRequest(otherPermissionRequest)
verify(observer, never()).onContentPermissionRequest(otherPermissionRequest)
......@@ -410,6 +425,7 @@ class EngineSessionTest {
otherSession.notifyInternalObservers { onFind("search") }
otherSession.notifyInternalObservers { onFindResult(0, 1, true) }
otherSession.notifyInternalObservers { onFullScreenChange(true) }
otherSession.notifyInternalObservers { onMetaViewportFitChanged(1) }
otherSession.notifyInternalObservers { onThumbnailChange(emptyBitmap) }
otherSession.notifyInternalObservers { onContentPermissionRequest(permissionRequest) }
otherSession.notifyInternalObservers { onCancelContentPermissionRequest(permissionRequest) }
......@@ -426,6 +442,7 @@ class EngineSessionTest {
verify(observer, never()).onFind("search")
verify(observer, never()).onFindResult(0, 1, true)
verify(observer, never()).onFullScreenChange(true)
verify(observer, never()).onMetaViewportFitChanged(1)
verify(observer, never()).onThumbnailChange(emptyBitmap)
verify(observer, never()).onAppPermissionRequest(permissionRequest)
verify(observer, never()).onContentPermissionRequest(permissionRequest)
......@@ -443,6 +460,7 @@ class EngineSessionTest {
session.notifyInternalObservers { onFind("search") }
session.notifyInternalObservers { onFindResult(0, 1, true) }
session.notifyInternalObservers { onFullScreenChange(true) }
session.notifyInternalObservers { onMetaViewportFitChanged(1) }
session.notifyInternalObservers { onThumbnailChange(emptyBitmap) }
session.notifyInternalObservers { onContentPermissionRequest(permissionRequest) }
session.notifyInternalObservers { onCancelContentPermissionRequest(permissionRequest) }
......@@ -459,6 +477,7 @@ class EngineSessionTest {
verify(observer, times(1)).onFind("search")
verify(observer, times(1)).onFindResult(0, 1, true)
verify(observer, times(1)).onFullScreenChange(true)
verify(observer, times(1)).onMetaViewportFitChanged(1)
verify(observer, times(1)).onThumbnailChange(emptyBitmap)
verify(observer, times(1)).onAppPermissionRequest(permissionRequest)
verify(observer, times(1)).onContentPermissionRequest(permissionRequest)
......@@ -649,6 +668,7 @@ class EngineSessionTest {
defaultObserver.onLoadingStateChange(true)
defaultObserver.onThumbnailChange(spy(Bitmap::class.java))
defaultObserver.onFullScreenChange(true)
defaultObserver.onMetaViewportFitChanged(1)
defaultObserver.onAppPermissionRequest(mock(PermissionRequest::class.java))
defaultObserver.onContentPermissionRequest(mock(PermissionRequest::class.java))
defaultObserver.onCancelContentPermissionRequest(mock(PermissionRequest::class.java))
......
......@@ -17,6 +17,7 @@ open class FullScreenFeature(
sessionManager: SessionManager,
private val sessionUseCases: SessionUseCases,
private val sessionId: String? = null,
private val viewportFitChanged: (Int) -> Unit = {},
private val fullScreenChanged: (Boolean) -> Unit
) : SelectionAwareSessionObserver(sessionManager), LifecycleAwareFeature, UserInteractionHandler {
......@@ -28,6 +29,9 @@ open class FullScreenFeature(
}
override fun onFullScreenChanged(session: Session, enabled: Boolean) = fullScreenChanged(enabled)
override fun onMetaViewportFitChanged(session: Session, layoutInDisplayCutoutMode: Int) {
viewportFitChanged(layoutInDisplayCutoutMode)
}
/**
* To be called when the back button is pressed, so that only fullscreen mode closes.
......
......@@ -94,7 +94,7 @@ class FullScreenFeatureTest {
sessionUseCases: SessionUseCases,
sessionId: String? = null,
fullScreenChanged: (Boolean) -> Unit
) : FullScreenFeature(sessionManager, sessionUseCases, sessionId, fullScreenChanged) {
) : FullScreenFeature(sessionManager, sessionUseCases, sessionId, fullScreenChanged = fullScreenChanged) {
public override var activeSession: Session? = null
}
}
......@@ -325,6 +325,7 @@
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onFind(text: String)</ID>
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onFindResult(activeMatchOrdinal: Int, numberOfMatches: Int, isDoneCounting: Boolean)</ID>
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onFullScreenChange(enabled: Boolean)</ID>
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onMetaViewportFitChanged(layoutInDisplayCutoutMode: Int)</ID>
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onLoadingStateChange(loading: Boolean)</ID>
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onLocationChange(url: String)</ID>
<ID>UndocumentedPublicFunction:EngineSession.kt$EngineSession.Observer$fun onLongPress(hitResult: HitResult)</ID>
......@@ -495,6 +496,7 @@
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onDownload(session: Session, download: Download): Boolean</ID>
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onFindResult(session: Session, result: FindResult)</ID>
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onFullScreenChanged(session: Session, enabled: Boolean)</ID>
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onMetaViewportFitChanged(session: Session, layoutInDisplayCutoutMode: Int)</ID>
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onIconChanged(session: Session, icon: Bitmap?)</ID>
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onLoadRequest( session: Session, url: String, triggeredByRedirect: Boolean, triggeredByWebContent: Boolean )</ID>
<ID>UndocumentedPublicFunction:Session.kt$Session.Observer$fun onLaunchIntentRequest(session: Session, url: String, appIntent: Intent?)</ID>
......
......@@ -15,6 +15,9 @@ permalink: /changelog/
* **feature-media**
* Muted media will not start the media service anymore, causing no media notification to be shown and no audio focus getting requested.
* **feature-fullscreen**
* ⚠️ **This is a breaking change**: Added `viewportFitChanged` to support Android display cutouts.
# 38.0.0
* [Commits](https://github.com/mozilla-mobile/android-components/compare/v37.0.0...v38.0.0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment