Copione merged onto master
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
9aeebf261c
|
@ -8,7 +8,13 @@
|
||||||
Let's just ignore issues in the Sentry code since that is a third-party dependency anyways. -->
|
Let's just ignore issues in the Sentry code since that is a third-party dependency anyways. -->
|
||||||
<ignore path="**/sentry*.jar" />
|
<ignore path="**/sentry*.jar" />
|
||||||
</issue>
|
</issue>
|
||||||
|
<!-- Lints that don't apply to our translation process -->
|
||||||
<issue id="MissingTranslation" severity="ignore" />
|
<issue id="MissingTranslation" severity="ignore" />
|
||||||
|
<issue id="PluralsCandidate" severity="ignore" />
|
||||||
|
<issue id="StringFormatCount" severity="ignore" />
|
||||||
|
<issue id="TypographyEllipsis" severity="ignore" />
|
||||||
<issue id="ExtraTranslation" severity="warning" />
|
<issue id="ExtraTranslation" severity="warning" />
|
||||||
|
<!-- Lints that are disabled by default -->
|
||||||
|
<issue id="ConvertToWebp" severity="warning" />
|
||||||
</lint>
|
</lint>
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@ import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import mozilla.components.browser.search.SearchEngine
|
import mozilla.components.browser.search.SearchEngine
|
||||||
import mozilla.components.browser.session.Session
|
|
||||||
import mozilla.components.browser.session.SessionManager
|
import mozilla.components.browser.session.SessionManager
|
||||||
|
import mozilla.components.browser.state.state.SessionState
|
||||||
import mozilla.components.browser.state.state.WebExtensionState
|
import mozilla.components.browser.state.state.WebExtensionState
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.browser.tabstray.BrowserTabsTray
|
import mozilla.components.browser.tabstray.BrowserTabsTray
|
||||||
|
@ -545,7 +545,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
||||||
components.useCases.searchUseCases.newTabSearch
|
components.useCases.searchUseCases.newTabSearch
|
||||||
.invoke(
|
.invoke(
|
||||||
searchTerms,
|
searchTerms,
|
||||||
Session.Source.USER_ENTERED,
|
SessionState.Source.USER_ENTERED,
|
||||||
true,
|
true,
|
||||||
mode.isPrivate,
|
mode.isPrivate,
|
||||||
searchEngine = engine
|
searchEngine = engine
|
||||||
|
|
|
@ -808,7 +808,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
|
||||||
protected open fun removeSessionIfNeeded(): Boolean {
|
protected open fun removeSessionIfNeeded(): Boolean {
|
||||||
getSessionById()?.let { session ->
|
getSessionById()?.let { session ->
|
||||||
val sessionManager = requireComponents.core.sessionManager
|
val sessionManager = requireComponents.core.sessionManager
|
||||||
return if (session.source == Session.Source.ACTION_VIEW) {
|
return if (session.source == SessionState.Source.ACTION_VIEW) {
|
||||||
activity?.finish()
|
activity?.finish()
|
||||||
sessionManager.remove(session)
|
sessionManager.remove(session)
|
||||||
true
|
true
|
||||||
|
|
|
@ -11,9 +11,9 @@ import androidx.annotation.VisibleForTesting
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import mozilla.components.browser.session.Session
|
import mozilla.components.browser.session.Session
|
||||||
import mozilla.components.browser.session.Session.Source
|
|
||||||
import mozilla.components.browser.session.SessionManager
|
import mozilla.components.browser.session.SessionManager
|
||||||
import mozilla.components.browser.state.state.CustomTabConfig
|
import mozilla.components.browser.state.state.CustomTabConfig
|
||||||
|
import mozilla.components.browser.state.state.SessionState
|
||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.concept.engine.manifest.WebAppManifest
|
import mozilla.components.concept.engine.manifest.WebAppManifest
|
||||||
import mozilla.components.concept.engine.manifest.WebAppManifestParser
|
import mozilla.components.concept.engine.manifest.WebAppManifestParser
|
||||||
|
@ -60,7 +60,7 @@ class FennecWebAppIntentProcessor(
|
||||||
return if (!url.isNullOrEmpty() && matches(intent)) {
|
return if (!url.isNullOrEmpty() && matches(intent)) {
|
||||||
val webAppManifest = runBlocking { loadManifest(safeIntent, url) }
|
val webAppManifest = runBlocking { loadManifest(safeIntent, url) }
|
||||||
|
|
||||||
val session = Session(url, private = false, source = Source.HOME_SCREEN)
|
val session = Session(url, private = false, source = SessionState.Source.HOME_SCREEN)
|
||||||
session.webAppManifest = webAppManifest
|
session.webAppManifest = webAppManifest
|
||||||
session.customTabConfig =
|
session.customTabConfig =
|
||||||
webAppManifest?.toCustomTabConfig() ?: createFallbackCustomTabConfig()
|
webAppManifest?.toCustomTabConfig() ?: createFallbackCustomTabConfig()
|
||||||
|
|
|
@ -9,6 +9,7 @@ import android.content.Intent.ACTION_VIEW
|
||||||
import androidx.annotation.VisibleForTesting
|
import androidx.annotation.VisibleForTesting
|
||||||
import mozilla.components.browser.session.Session
|
import mozilla.components.browser.session.Session
|
||||||
import mozilla.components.browser.session.SessionManager
|
import mozilla.components.browser.session.SessionManager
|
||||||
|
import mozilla.components.browser.state.state.SessionState
|
||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.feature.intent.ext.putSessionId
|
import mozilla.components.feature.intent.ext.putSessionId
|
||||||
import mozilla.components.feature.intent.processing.IntentProcessor
|
import mozilla.components.feature.intent.processing.IntentProcessor
|
||||||
|
@ -40,7 +41,7 @@ class FennecBookmarkShortcutsIntentProcessor(
|
||||||
val url = safeIntent.dataString
|
val url = safeIntent.dataString
|
||||||
|
|
||||||
return if (!url.isNullOrEmpty() && matches(intent)) {
|
return if (!url.isNullOrEmpty() && matches(intent)) {
|
||||||
val session = Session(url, private = false, source = Session.Source.HOME_SCREEN)
|
val session = Session(url, private = false, source = SessionState.Source.HOME_SCREEN)
|
||||||
|
|
||||||
sessionManager.add(session, selected = true)
|
sessionManager.add(session, selected = true)
|
||||||
loadUrlUseCase(url, session, EngineSession.LoadUrlFlags.external())
|
loadUrlUseCase(url, session, EngineSession.LoadUrlFlags.external())
|
||||||
|
|
|
@ -12,7 +12,8 @@ import android.graphics.Color
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Build.VERSION.SDK_INT
|
import android.os.Build.VERSION.SDK_INT
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.View
|
import android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||||
|
import android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import androidx.annotation.StyleRes
|
import androidx.annotation.StyleRes
|
||||||
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
||||||
|
@ -77,7 +78,7 @@ abstract class ThemeManager {
|
||||||
window.statusBarColor = context.getColorFromAttr(android.R.attr.statusBarColor)
|
window.statusBarColor = context.getColorFromAttr(android.R.attr.statusBarColor)
|
||||||
|
|
||||||
window.decorView.systemUiVisibility =
|
window.decorView.systemUiVisibility =
|
||||||
window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
window.decorView.systemUiVisibility or SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||||
} else {
|
} else {
|
||||||
window.statusBarColor = Color.BLACK
|
window.statusBarColor = Color.BLACK
|
||||||
}
|
}
|
||||||
|
@ -85,7 +86,7 @@ abstract class ThemeManager {
|
||||||
if (SDK_INT >= Build.VERSION_CODES.O) {
|
if (SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
// API level can display handle light navigation bar color
|
// API level can display handle light navigation bar color
|
||||||
window.decorView.systemUiVisibility =
|
window.decorView.systemUiVisibility =
|
||||||
window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
window.decorView.systemUiVisibility or SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||||
updateNavigationBar(window, context)
|
updateNavigationBar(window, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,8 +94,13 @@ abstract class ThemeManager {
|
||||||
private fun clearLightSystemBars(window: Window) {
|
private fun clearLightSystemBars(window: Window) {
|
||||||
if (SDK_INT >= Build.VERSION_CODES.M) {
|
if (SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
|
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
|
||||||
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() and
|
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv()
|
||||||
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
|
}
|
||||||
|
|
||||||
|
if (SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
// API level can display handle light navigation bar color
|
||||||
|
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
|
||||||
|
SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent">
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -48,8 +47,8 @@
|
||||||
android:paddingBottom="@dimen/radio_button_preference_vertical" />
|
android:paddingBottom="@dimen/radio_button_preference_vertical" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
<include layout="@layout/layout_clear_permission_button" />
|
<include layout="@layout/layout_clear_permission_button"/>
|
||||||
<include layout="@layout/component_permissions_blocked_by_android" />
|
<include layout="@layout/component_permissions_blocked_by_android"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -15,6 +15,7 @@ import io.mockk.verifyAll
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import mozilla.components.browser.session.Session
|
import mozilla.components.browser.session.Session
|
||||||
import mozilla.components.browser.session.SessionManager
|
import mozilla.components.browser.session.SessionManager
|
||||||
|
import mozilla.components.browser.state.state.SessionState
|
||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.feature.intent.ext.getSessionId
|
import mozilla.components.feature.intent.ext.getSessionId
|
||||||
import mozilla.components.feature.session.SessionUseCases
|
import mozilla.components.feature.session.SessionUseCases
|
||||||
|
@ -56,7 +57,7 @@ class FennecBookmarkShortcutsIntentProcessorTest {
|
||||||
val fennecShortcutsIntent = Intent(ACTION_FENNEC_HOMESCREEN_SHORTCUT)
|
val fennecShortcutsIntent = Intent(ACTION_FENNEC_HOMESCREEN_SHORTCUT)
|
||||||
val testUrl = "http://mozilla.org"
|
val testUrl = "http://mozilla.org"
|
||||||
fennecShortcutsIntent.data = Uri.parse(testUrl)
|
fennecShortcutsIntent.data = Uri.parse(testUrl)
|
||||||
val expectedSession = Session(testUrl, private = false, source = Session.Source.HOME_SCREEN)
|
val expectedSession = Session(testUrl, private = false, source = SessionState.Source.HOME_SCREEN)
|
||||||
|
|
||||||
val wasIntentProcessed = processor.process(fennecShortcutsIntent)
|
val wasIntentProcessed = processor.process(fennecShortcutsIntent)
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
object AndroidComponents {
|
object AndroidComponents {
|
||||||
const val VERSION = "51.0.20200717130954"
|
const val VERSION = "51.0.20200718130042"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue