summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-08-02 08:08:37 +0200
committerAlbin <albin@mullvad.net>2023-08-02 08:08:45 +0200
commita91a17eda172de33d6ab544f5da711b259d25322 (patch)
treed51275e449f781ade99b49e1a331765bc9e7b28f
parentac4d1e34e7547619eef7d735003c78206b65fa9a (diff)
downloadmullvadvpn-a91a17eda172de33d6ab544f5da711b259d25322.tar.xz
mullvadvpn-a91a17eda172de33d6ab544f5da711b259d25322.zip
Update lint baseline
-rw-r--r--android/app/lint-baseline.xml88
1 files changed, 11 insertions, 77 deletions
diff --git a/android/app/lint-baseline.xml b/android/app/lint-baseline.xml
index f09b8f0d4e..47d84f2ef2 100644
--- a/android/app/lint-baseline.xml
+++ b/android/app/lint-baseline.xml
@@ -3,6 +3,17 @@
<issue
id="MissingSuperCall"
+ message="Overriding method should call `super.onDismiss`"
+ errorLine1=" override fun onDismiss(dialogInterface: DialogInterface) {"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConfirmNoEmailDialogFragment.kt"
+ line="61"
+ column="18"/>
+ </issue>
+
+ <issue
+ id="MissingSuperCall"
message="Overriding method should call `super.onActivityResult`"
errorLine1=" override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -79,17 +90,6 @@
</issue>
<issue
- id="ApplySharedPref"
- message="Consider using `apply()` instead; `commit` writes its data to persistent storage immediately, whereas `apply` will handle it in the background"
- errorLine1=" getSharedPreferences(&quot;tunnel_state&quot;, MODE_PRIVATE).edit().clear().commit()"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt"
- line="107"
- column="75"/>
- </issue>
-
- <issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `toUpperCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
errorLine1=" input.replace(index, index + 1, character.toString().toUpperCase())"
@@ -290,17 +290,6 @@
<issue
id="UseCompatLoadingForDrawables"
message="Use `ResourcesCompat.getDrawable()`"
- errorLine1=" setBackground(resources.getDrawable(R.drawable.cell_switch_background, null))"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CellSwitch.kt"
- line="170"
- column="23"/>
- </issue>
-
- <issue
- id="UseCompatLoadingForDrawables"
- message="Use `ResourcesCompat.getDrawable()`"
errorLine1=" private val errorImage = resources.getDrawable(R.drawable.icon_notification_error, null)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -443,17 +432,6 @@
<issue
id="Overdraw"
- message="Possible overdraw: Root element paints background `@color/darkBlue` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
- errorLine1=" android:background=&quot;@color/darkBlue&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/account.xml"
- line="5"
- column="14"/>
- </issue>
-
- <issue
- id="Overdraw"
message="Possible overdraw: Root element paints background `?android:attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?android:attr/selectableItemBackground&quot;>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -486,28 +464,6 @@
</issue>
<issue
- id="RedundantNamespace"
- message="This namespace declaration is redundant"
- errorLine1=" &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/information_view.xml"
- line="2"
- column="56"/>
- </issue>
-
- <issue
- id="UnusedNamespace"
- message="Unused namespace declaration xmlns:android; already declared on the root element"
- errorLine1=" &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/information_view.xml"
- line="2"
- column="56"/>
- </issue>
-
- <issue
id="TextFields"
message="This text field does not specify an `inputType`"
errorLine1=" &lt;EditText android:id=&quot;@+id/login_input&quot;"
@@ -596,17 +552,6 @@
</issue>
<issue
- id="ClickableViewAccessibility"
- message="Custom view `CellSwitch` overrides `onTouchEvent` but not `performClick`"
- errorLine1=" override fun onTouchEvent(event: MotionEvent): Boolean {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CellSwitch.kt"
- line="180"
- column="18"/>
- </issue>
-
- <issue
id="ContentDescription"
message="Missing `contentDescription` attribute on image"
errorLine1=" &lt;ImageButton android:id=&quot;@+id/remove&quot;"
@@ -860,17 +805,6 @@
</issue>
<issue
- id="SetTextI18n"
- message="Do not concatenate text displayed with `setText`. Use resource string with placeholders."
- errorLine1=" informationDisplay.text = information.substring(0, maxLength) + &quot;...&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt"
- line="176"
- column="43"/>
- </issue>
-
- <issue
id="RtlEnabled"
message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest">
<location