For #18553 Revert "Target Android 11"

This reverts commit 0e8dc616
pull/420/head
Arturo Mejia 3 years ago
parent 975f97df46
commit 07c15d3131

@ -58,7 +58,8 @@ android {
def deepLinkSchemeValue = "fenix-dev"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = [
"deepLinkScheme": deepLinkSchemeValue
"deepLinkScheme": deepLinkSchemeValue,
"requestLegacyExternalStorage": true
]
// Build flag for "Mozilla Online" variants. See `Config.isMozillaOnline`.
@ -93,13 +94,19 @@ android {
applicationIdSuffix ".fenix.debug"
resValue "bool", "IS_DEBUG", "true"
pseudoLocalesEnabled true
def deepLinkSchemeValue = "fenix-dev"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = [
"deepLinkScheme": deepLinkSchemeValue,
"requestLegacyExternalStorage": false
]
}
nightly releaseTemplate >> {
applicationIdSuffix ".fenix"
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true"
def deepLinkSchemeValue = "fenix-nightly"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = ["deepLinkScheme": deepLinkSchemeValue]
manifestPlaceholders = ["deepLinkScheme": deepLinkSchemeValue, "requestLegacyExternalStorage": false]
}
beta releaseTemplate >> {
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true"
@ -115,7 +122,8 @@ android {
// - https://issuetracker.google.com/issues/36924841
// - https://issuetracker.google.com/issues/36905922
"sharedUserId": "org.mozilla.firefox.sharedID",
"deepLinkScheme": deepLinkSchemeValue
"deepLinkScheme": deepLinkSchemeValue,
"requestLegacyExternalStorage": true
]
}
release releaseTemplate >> {
@ -132,7 +140,8 @@ android {
// - https://issuetracker.google.com/issues/36924841
// - https://issuetracker.google.com/issues/36905922
"sharedUserId": "org.mozilla.firefox.sharedID",
"deepLinkScheme": deepLinkSchemeValue
"deepLinkScheme": deepLinkSchemeValue,
"requestLegacyExternalStorage": true
]
}
}

@ -27,6 +27,7 @@
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="${requestLegacyExternalStorage}"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/NormalTheme"

@ -29,8 +29,6 @@ import mozilla.components.concept.base.crash.Breadcrumb
)
fun Activity.enterToImmersiveMode() {
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17804
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION

@ -13,8 +13,7 @@ import android.content.Intent
import android.graphics.Color
import android.graphics.Typeface
import android.graphics.drawable.ColorDrawable
import android.os.Build.VERSION
import android.os.Build.VERSION_CODES
import android.os.Build
import android.os.Bundle
import android.speech.RecognizerIntent
import android.text.style.StyleSpan
@ -90,8 +89,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
// https://github.com/mozilla-mobile/fenix/issues/14279
// To prevent GeckoView from resizing we're going to change the softInputMode to not adjust
// the size of the window.
if (VERSION.SDK_INT < VERSION_CODES.R)
requireActivity().window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
requireActivity().window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
// Refocus the toolbar editing and show keyboard if the QR fragment isn't showing
if (childFragmentManager.findFragmentByTag(QR_FRAGMENT_TAG) == null) {
toolbarView.view.edit.focus()
@ -102,10 +100,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
super.onStop()
// https://github.com/mozilla-mobile/fenix/issues/14279
// Let's reset back to the default behavior after we're done searching
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17805
@Suppress("DEPRECATION")
if (VERSION.SDK_INT < VERSION_CODES.R)
requireActivity().window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
requireActivity().window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
}
override fun onCreate(savedInstanceState: Bundle?) {
@ -349,7 +344,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
private fun updateAccessibilityTraversalOrder() {
val searchWrapperId = search_wrapper.id
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP_MR1) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
qr_scan_button.accessibilityTraversalAfter = searchWrapperId
search_engines_shortcut_button.accessibilityTraversalAfter = searchWrapperId
fill_link_from_clipboard.accessibilityTraversalAfter = searchWrapperId

@ -59,12 +59,12 @@ class PerformanceActivityLifecycleCallbacks(
}
}
override fun onActivityStarted(activity: Activity) {}
override fun onActivityStopped(activity: Activity) {}
override fun onActivityResumed(activity: Activity) {}
override fun onActivityPaused(activity: Activity) {}
override fun onActivitySaveInstanceState(activity: Activity, bundle: Bundle) {}
override fun onActivityDestroyed(activity: Activity) {}
override fun onActivityStarted(activity: Activity?) {}
override fun onActivityStopped(activity: Activity?) {}
override fun onActivityResumed(activity: Activity?) {}
override fun onActivityPaused(activity: Activity?) {}
override fun onActivitySaveInstanceState(activity: Activity?, bundle: Bundle?) {}
override fun onActivityDestroyed(activity: Activity?) {}
companion object {
/**

@ -44,23 +44,23 @@ class VisibilityLifecycleCallback(private val activityManager: ActivityManager?)
return false
}
override fun onActivityStarted(activity: Activity) {
override fun onActivityStarted(activity: Activity?) {
activitiesInStartedState++
}
override fun onActivityStopped(activity: Activity) {
override fun onActivityStopped(activity: Activity?) {
activitiesInStartedState--
}
override fun onActivityResumed(activity: Activity) {}
override fun onActivityResumed(activity: Activity?) {}
override fun onActivityPaused(activity: Activity) {}
override fun onActivityPaused(activity: Activity?) {}
override fun onActivityCreated(activity: Activity, bundle: Bundle?) {}
override fun onActivityCreated(activity: Activity?, bundle: Bundle?) {}
override fun onActivitySaveInstanceState(activity: Activity, bundle: Bundle) {}
override fun onActivitySaveInstanceState(activity: Activity?, bundle: Bundle?) {}
override fun onActivityDestroyed(activity: Activity) {}
override fun onActivityDestroyed(activity: Activity?) {}
companion object {
/**

@ -130,11 +130,11 @@ class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat() {
AlertDialog.Builder(requireContext()).apply {
setMessage(R.string.confirm_clear_permissions_site)
setTitle(R.string.clear_permissions)
setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _ ->
setPositiveButton(android.R.string.yes) { dialog: DialogInterface, _ ->
clearSitePermissions()
dialog.dismiss()
}
setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _ ->
setNegativeButton(android.R.string.no) { dialog: DialogInterface, _ ->
dialog.cancel()
}
}.show()

@ -95,11 +95,11 @@ class SitePermissionsExceptionsFragment :
AlertDialog.Builder(requireContext()).apply {
setMessage(R.string.confirm_clear_permissions_on_all_sites)
setTitle(R.string.clear_permissions)
setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _ ->
setPositiveButton(android.R.string.yes) { dialog: DialogInterface, _ ->
deleteAllSitePermissions()
dialog.dismiss()
}
setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _ ->
setNegativeButton(android.R.string.no) { dialog: DialogInterface, _ ->
dialog.cancel()
}
}.show()

@ -159,11 +159,11 @@ class SitePermissionsManageExceptionsPhoneFeatureFragment : Fragment() {
AlertDialog.Builder(requireContext()).apply {
setMessage(R.string.confirm_clear_permission_site)
setTitle(R.string.clear_permission)
setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _ ->
setPositiveButton(android.R.string.yes) { dialog: DialogInterface, _ ->
clearPermissions()
dialog.dismiss()
}
setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _ ->
setNegativeButton(android.R.string.no) { dialog: DialogInterface, _ ->
dialog.cancel()
}
}.show()

@ -47,8 +47,8 @@ class ShareViewModel(application: Application) : AndroidViewModel(application) {
@VisibleForTesting
internal val networkCallback = object : ConnectivityManager.NetworkCallback() {
override fun onLost(network: Network) = reloadDevices(network)
override fun onAvailable(network: Network) = reloadDevices(network)
override fun onLost(network: Network?) = reloadDevices(network)
override fun onAvailable(network: Network?) = reloadDevices(network)
private fun reloadDevices(network: Network?) {
viewModelScope.launch(ioDispatcher) {

@ -245,16 +245,12 @@ class TabTrayDialogFragment : AppCompatDialogFragment(), UserInteractionHandler
}
view.tabLayout.setOnApplyWindowInsetsListener { v, insets ->
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17807
@Suppress("DEPRECATION")
v.updatePadding(
left = insets.left(),
right = insets.right(),
bottom = insets.bottom()
)
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17807
@Suppress("DEPRECATION")
tabTrayView.view.tab_wrapper.updatePadding(
bottom = insets.bottom()
)

@ -76,8 +76,7 @@ abstract class ThemeManager {
private fun updateLightSystemBars(window: Window, context: Context) {
if (SDK_INT >= Build.VERSION_CODES.M) {
window.statusBarColor = context.getColorFromAttr(android.R.attr.statusBarColor)
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17808
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility =
window.decorView.systemUiVisibility or SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
} else {
@ -86,8 +85,6 @@ abstract class ThemeManager {
if (SDK_INT >= Build.VERSION_CODES.O) {
// API level can display handle light navigation bar color
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17808
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility =
window.decorView.systemUiVisibility or SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
updateNavigationBar(window, context)
@ -96,16 +93,12 @@ abstract class ThemeManager {
private fun clearLightSystemBars(window: Window) {
if (SDK_INT >= Build.VERSION_CODES.M) {
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17808
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv()
}
if (SDK_INT >= Build.VERSION_CODES.O) {
// API level can display handle light navigation bar color
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17808
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
}

@ -34,12 +34,12 @@ class WifiConnectionMonitor(app: Application) {
private var isRegistered = false
private val frameworkListener = object : ConnectivityManager.NetworkCallback() {
override fun onLost(network: Network) {
override fun onLost(network: Network?) {
notifyListeners(false)
lastKnownStateWasAvailable = false
}
override fun onAvailable(network: Network) {
override fun onAvailable(network: Network?) {
notifyListeners(true)
lastKnownStateWasAvailable = true
}

@ -18,8 +18,6 @@ import org.robolectric.Shadows.shadowOf
@RunWith(FenixRobolectricTestRunner::class)
class ActivityTest {
// This will be addressed on https://github.com/mozilla-mobile/fenix/issues/17804
@Suppress("DEPRECATION")
@Test
fun testEnterImmersiveMode() {
val activity = Robolectric.buildActivity(Activity::class.java).create().get()

@ -13,9 +13,9 @@ import java.util.Locale
object Config {
// Synchronized build configuration for all modules
const val compileSdkVersion = 30
const val compileSdkVersion = 29
const val minSdkVersion = 21
const val targetSdkVersion = 30
const val targetSdkVersion = 29
@JvmStatic
private fun generateDebugVersionName(): String {

Loading…
Cancel
Save