diff --git a/app/lint-baseline.xml b/app/lint-baseline.xml
index c76a534fcd97..7b0553a0c29f 100644
--- a/app/lint-baseline.xml
+++ b/app/lint-baseline.xml
@@ -8,28 +8,6 @@
file="app"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -873,7 +708,7 @@
errorLine2=" ~~~~~~~~~~~~~">
@@ -884,7 +719,7 @@
errorLine2=" ~~~~~~~~~~~~~">
@@ -895,7 +730,7 @@
errorLine2=" ~~~~~~~~~~~~~">
@@ -906,7 +741,7 @@
errorLine2=" ~~~~~~~~~~~~~">
@@ -917,7 +752,7 @@
errorLine2=" ~~~~~~~~~~~~~">
@@ -972,7 +807,7 @@
errorLine2=" ^">
@@ -983,7 +818,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
@@ -994,7 +829,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
@@ -1005,7 +840,7 @@
errorLine2=" ~~~~~~~~">
@@ -1016,7 +851,7 @@
errorLine2=" ~~~~~~~">
@@ -1027,7 +862,7 @@
errorLine2=" ~~~~~~~~">
@@ -1137,7 +972,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1438,6 +1273,17 @@
column="5"/>
+
+
+
+
@@ -1588,7 +1434,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
@@ -1599,7 +1445,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -1610,7 +1456,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1660,7 +1506,7 @@
+ message="The following images appear both as density independent `.xml` files and as bitmap files: /Users/oracle/Projects/fenix/app/src/main/res/drawable-hdpi/ic_logo_wordmark_normal.png, /Users/rotbolt/AndroidStudioProjects/fenix/app/src/main/res/drawable-night/ic_logo_wordmark_normal.xml">
+ file="src/main/res/drawable-land-xxhdpi/sunrise.jpg"/>
-
-
-
-
-
-
-
-
+ message="Missing the following drawables in `drawable-mdpi`: amethyst.png, cerulean.png, fenix_search_widget.png, sunrise.jpg">
+ message="Missing the following drawables in `drawable-xhdpi`: amethyst.png, cerulean.png, fenix_search_widget.png, sunrise.jpg">
+ message="Missing the following drawables in `drawable-xxhdpi`: amethyst.png, cerulean.png, fenix_search_widget.png, sunrise.jpg">
@@ -1880,6 +1712,17 @@
column="6"/>
+
+
+
+
-
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6d64e7c01df0..437e25cbd56f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -6,7 +6,11 @@
-
+
diff --git a/app/src/main/java/org/mozilla/fenix/components/FxaServer.kt b/app/src/main/java/org/mozilla/fenix/components/FxaServer.kt
index b6f66cc7b47d..3347dc2a7e58 100644
--- a/app/src/main/java/org/mozilla/fenix/components/FxaServer.kt
+++ b/app/src/main/java/org/mozilla/fenix/components/FxaServer.kt
@@ -1,6 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
+
package org.mozilla.fenix.components
import android.content.Context
diff --git a/app/src/main/java/org/mozilla/fenix/components/tips/providers/MasterPasswordTipProvider.kt b/app/src/main/java/org/mozilla/fenix/components/tips/providers/MasterPasswordTipProvider.kt
index cfa54b7af01c..f54a5f25353a 100644
--- a/app/src/main/java/org/mozilla/fenix/components/tips/providers/MasterPasswordTipProvider.kt
+++ b/app/src/main/java/org/mozilla/fenix/components/tips/providers/MasterPasswordTipProvider.kt
@@ -4,6 +4,7 @@
package org.mozilla.fenix.components.tips.providers
+import android.annotation.SuppressLint
import android.content.Context
import android.text.Editable
import android.text.TextWatcher
@@ -71,6 +72,7 @@ class MasterPasswordTipProvider(
titleDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_login)
)
+ @SuppressLint("InflateParams")
private fun showMasterPasswordMigration() {
val dialogView = LayoutInflater.from(context).inflate(R.layout.mp_migration_dialog, null)
@@ -159,6 +161,7 @@ class MasterPasswordTipProvider(
}
}
+ @SuppressLint("InflateParams")
private fun showFailureDialog() {
val dialogView =
LayoutInflater.from(context).inflate(R.layout.mp_migration_done_dialog, null)
@@ -214,6 +217,7 @@ class MasterPasswordTipProvider(
}
}
+ @SuppressLint("InflateParams")
private fun showSuccessDialog() {
dismissMPTip()
diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
index 02fbcad883d9..eec52dfa4062 100644
--- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
+++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
@@ -868,6 +868,7 @@ class HomeFragment : Fragment() {
requireComponents.useCases.sessionUseCases.updateLastAccess()
}
+ @SuppressLint("InflateParams")
private fun recommendPrivateBrowsingShortcut() {
context?.let { context ->
val layout = LayoutInflater.from(context)
diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt
index 74faa1a2d267..f17e18640d6b 100644
--- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt
+++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt
@@ -4,6 +4,7 @@
package org.mozilla.fenix.home.sessioncontrol
+import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.widget.EditText
import androidx.annotation.VisibleForTesting
@@ -333,6 +334,7 @@ class DefaultSessionControlController(
)
}
+ @SuppressLint("InflateParams")
override fun handleRenameTopSiteClicked(topSite: TopSite) {
activity.let {
val customLayout =
diff --git a/app/src/main/java/org/mozilla/fenix/settings/DefaultBrowserPreference.kt b/app/src/main/java/org/mozilla/fenix/settings/DefaultBrowserPreference.kt
index c2ef16ebb98f..9f54cd78c720 100644
--- a/app/src/main/java/org/mozilla/fenix/settings/DefaultBrowserPreference.kt
+++ b/app/src/main/java/org/mozilla/fenix/settings/DefaultBrowserPreference.kt
@@ -6,9 +6,9 @@ package org.mozilla.fenix.settings
import android.content.Context
import android.util.AttributeSet
-import android.widget.Switch
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
+import com.google.android.material.switchmaterial.SwitchMaterial
import org.mozilla.fenix.R
import org.mozilla.fenix.utils.BrowsersCache
@@ -17,7 +17,7 @@ class DefaultBrowserPreference @JvmOverloads constructor(
attrs: AttributeSet? = null
) : Preference(context, attrs) {
- private var switchView: Switch? = null
+ private var switchView: SwitchMaterial? = null
init {
widgetLayoutResource = R.layout.preference_default_browser
@@ -25,7 +25,7 @@ class DefaultBrowserPreference @JvmOverloads constructor(
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
- switchView = holder.findViewById(R.id.switch_widget) as Switch
+ switchView = holder.findViewById(R.id.switch_widget) as SwitchMaterial
updateSwitch()
}
diff --git a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
index 3286e833c397..1571a1d93b29 100644
--- a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
+++ b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
@@ -227,6 +227,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
updateMakeDefaultBrowserPreference()
}
+ @SuppressLint("InflateParams")
@Suppress("ComplexMethod", "LongMethod")
override fun onPreferenceTreeClick(preference: Preference): Boolean {
// Hide the scrollbar so the animation looks smoother
diff --git a/app/src/main/java/org/mozilla/fenix/settings/search/AddSearchEngineFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/search/AddSearchEngineFragment.kt
index b721d93af74a..d9bccdb010a8 100644
--- a/app/src/main/java/org/mozilla/fenix/settings/search/AddSearchEngineFragment.kt
+++ b/app/src/main/java/org/mozilla/fenix/settings/search/AddSearchEngineFragment.kt
@@ -4,6 +4,7 @@
package org.mozilla.fenix.settings.search
+import android.annotation.SuppressLint
import android.content.res.Resources
import android.graphics.drawable.BitmapDrawable
import android.os.Bundle
@@ -238,6 +239,7 @@ class AddSearchEngineFragment :
toggleCustomForm(selectedIndex == -1)
}
+ @SuppressLint("InflateParams")
private fun makeCustomButton(layoutInflater: LayoutInflater): CustomSearchEngineRadioButtonBinding {
val wrapper = layoutInflater
.inflate(R.layout.custom_search_engine_radio_button, null) as ConstraintLayout
@@ -254,6 +256,7 @@ class AddSearchEngineFragment :
customSearchEngine.customSearchEnginesLearnMore.isEnabled = isEnabled
}
+ @SuppressLint("InflateParams")
private fun makeButtonFromSearchEngine(
engine: SearchEngine,
layoutInflater: LayoutInflater,
diff --git a/app/src/main/java/org/mozilla/fenix/utils/OnWifiChanged.java b/app/src/main/java/org/mozilla/fenix/utils/OnWifiChanged.java
index 208b37f69f14..4c8a384f25f4 100644
--- a/app/src/main/java/org/mozilla/fenix/utils/OnWifiChanged.java
+++ b/app/src/main/java/org/mozilla/fenix/utils/OnWifiChanged.java
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
package org.mozilla.fenix.utils;
/**
diff --git a/app/src/main/res/layout/activity_home.xml b/app/src/main/res/layout/activity_home.xml
index b91ab497c980..94dcd5aba3e4 100644
--- a/app/src/main/res/layout/activity_home.xml
+++ b/app/src/main/res/layout/activity_home.xml
@@ -18,7 +18,8 @@
android:layout_width="match_parent"
android:layout_height="56dp" />
-
+
-