From dff054847adcc28e937740c90c6af16b36c815c3 Mon Sep 17 00:00:00 2001 From: tzugen Date: Wed, 19 May 2021 18:58:12 +0200 Subject: [PATCH] Regenerate lint baseline Removes 238 fixed issues Adds 177 previously unlisted issues --- ultrasonic/lint-baseline.xml | 3507 +++++++++++++++++----------------- 1 file changed, 1771 insertions(+), 1736 deletions(-) diff --git a/ultrasonic/lint-baseline.xml b/ultrasonic/lint-baseline.xml index 8347a5e7..c80cca17 100644 --- a/ultrasonic/lint-baseline.xml +++ b/ultrasonic/lint-baseline.xml @@ -1,114 +1,15 @@ - + + id="ScopedStorage" + message="WRITE_EXTERNAL_STORAGE no longer provides write access when targeting Android 10, unless you use `requestLegacyExternalStorage`" + errorLine1=" <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + file="src/main/AndroidManifest.xml" + line="9" + column="36"/> - - - - - - - - @@ -162,7 +41,7 @@ errorLine2=" ~~~~~~~~~~~"> @@ -173,7 +52,7 @@ errorLine2=" ~~~~~~~~~~~"> @@ -184,7 +63,7 @@ errorLine2=" ~~~~~~~~~~~"> @@ -195,7 +74,7 @@ errorLine2=" ~~~~~~~~~~~"> @@ -206,98 +85,10 @@ errorLine2=" ~~~~~~~~~~~"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -316,10 +107,31 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -694,10 +260,109 @@ errorLine2=" ^"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -716,7 +381,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -727,7 +392,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -738,24 +403,101 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + errorLine1=" Random random = new java.security.SecureRandom();" + errorLine2=" ~~~~~~~~~~~~"> + file="src/main/java/org/moire/ultrasonic/service/OfflineMusicService.java" + line="653" + column="37"/> + message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" + errorLine1=" webView.getSettings().setJavaScriptEnabled(true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + file="src/main/java/org/moire/ultrasonic/fragment/AboutFragment.java" + line="51" + column="9"/> + + + + + + + + - - - - - - - - @@ -829,17 +579,6 @@ file="src/main/res/drawable-xhdpi-v14"/> - - - - @@ -858,7 +597,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> @@ -869,32 +608,10 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - - - - - - - - @@ -913,85 +630,19 @@ errorLine2=" ~~~~~~~~~~~~~~~"> + message="Do not place Android context classes in static fields; this is a memory leak" + errorLine1=" private static SeekBar progressBar; // TODO: Refactor this to not be static" + errorLine2=" ~~~~~~"> - - - - - - - - - - - - - - - - - - - - - - - - + file="src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java" + line="103" + column="13"/> @@ -1016,9 +667,20 @@ column="2"/> + + + + + message="Possible overdraw: Root element paints background `?android:attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/NoActionBar`)" + errorLine1=" a:background="?android:attr/selectableItemBackground"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="UnusedResources" + message="The resource `R.drawable.btn_bg` appears to be unused" + errorLine1=" <item android:drawable="@color/ics_opaque" android:state_pressed="true"/>" + errorLine2="^"> + file="src/main/res/drawable/btn_bg.xml" + line="14" + column="1"/> + + + + - - - - - - - - - - - - + message="The resource `R.drawable.line` appears to be unused" + errorLine1="<shape xmlns:android="http://schemas.android.com/apk/res/android"" + errorLine2="^"> + file="src/main/res/drawable/line.xml" + line="2" + column="1"/> - - - - - - - - - - - - - + message="The resource `R.drawable.menu_arrow` appears to be unused" + errorLine1="<vector xmlns:android="http://schemas.android.com/apk/res/android"" + errorLine2="^"> + file="src/main/res/drawable/menu_arrow.xml" + line="1" + column="1"/> + message="The resource `R.string.main_shuffle` appears to be unused" + errorLine1=" <string name="main.shuffle">Shuffle Play</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + file="src/main/res/values/strings.xml" + line="109" + column="13"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1242,7 +1005,11 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + + + + + + + + + + + + + + + + + @@ -1285,7 +1119,11 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1328,7 +1642,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -1339,7 +1653,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -1350,7 +1664,11 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + + @@ -1393,7 +1723,11 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + @@ -1436,39 +1778,55 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + + @@ -1479,39 +1837,51 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + + + @@ -1522,52 +1892,77 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + message="The resource `R.plurals.select_album_donate_dialog_n_trial_days_left` appears to be unused" + errorLine1=" <plurals name="select_album_donate_dialog_n_trial_days_left">" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + file="src/main/res/values/strings.xml" + line="490" + column="14"/> + + + + + + + + + + message="The resource `R.drawable.thumb` appears to be unused" + errorLine1="<shape xmlns:android="http://schemas.android.com/apk/res/android"" + errorLine2="^"> + file="src/main/res/drawable/thumb.xml" + line="2" + column="1"/> + message="The resource `R.drawable.thumb_drawable` appears to be unused" + errorLine1="<selector xmlns:android="http://schemas.android.com/apk/res/android">" + errorLine2="^"> - - - - + file="src/main/res/drawable/thumb_drawable.xml" + line="2" + column="1"/> @@ -1598,7 +1993,40 @@ errorLine1=" <string name="util.no_time">-:--</string>" errorLine2=" ^"> + + + + + + + + + + + + @@ -1610,29 +2038,7 @@ errorLine2=" ^"> - - - - - - - - @@ -1643,7 +2049,29 @@ errorLine2=" ^"> + + + + + + + + @@ -1654,7 +2082,7 @@ errorLine2=" ^"> @@ -1665,7 +2093,7 @@ errorLine2=" ^"> @@ -1676,100 +2104,26 @@ errorLine2=" ^"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + message="The following unrelated icon files have identical contents: list_pressed_holo_dark.9.png, list_pressed_holo_light.9.png"> + + + + @@ -1843,7 +2197,7 @@ errorLine2=" ~~~~~~~~~"> @@ -1854,63 +2208,74 @@ errorLine2=" ^"> + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" getView().setOnTouchListener((v, event) -> handleOnTouch(event));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + file="src/main/java/org/moire/ultrasonic/fragment/NowPlayingFragment.java" + line="132" + column="42"/> + errorLine1=" albumArtImageView.setOnTouchListener(new View.OnTouchListener()" + errorLine2=" ^"> - - - - + file="src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java" + line="241" + column="9"/> + errorLine1=" public boolean onTouch(View view, MotionEvent me)" + errorLine2=" ~~~~~~~"> + file="src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java" + line="244" + column="28"/> + message="Custom view ``VisualizerView`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" visualizerView.setOnTouchListener(new View.OnTouchListener()" + errorLine2=" ^"> + file="src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java" + line="531" + column="21"/> + + + + + + + + @@ -1942,7 +2307,7 @@ errorLine2=" ~~~~~~~~~"> @@ -1953,7 +2318,7 @@ errorLine2=" ~~~~~~~~~"> @@ -1964,76 +2329,87 @@ errorLine2=" ~~~~~~~~~"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - @@ -2249,18 +2625,7 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> - - - - @@ -2271,8 +2636,8 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2282,7 +2647,7 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2293,8 +2658,8 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2304,7 +2669,7 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2315,8 +2680,8 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2326,7 +2691,7 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2337,8 +2702,8 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2348,11 +2713,22 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2591,7 +2813,18 @@ errorLine2=" ~~~~~~~~~"> + + + + @@ -2601,8 +2834,8 @@ errorLine1=" <ImageView" errorLine2=" ~~~~~~~~~"> @@ -2628,6 +2861,17 @@ column="6"/> + + + + @@ -2646,7 +2890,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2657,7 +2901,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2668,7 +2912,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2679,7 +2923,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2690,7 +2934,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2701,7 +2945,7 @@ errorLine2=" ~~~~~~~~~"> @@ -2749,39 +2993,6 @@ column="10"/> - - - - - - - - - - - - + message="Hardcoded string "A", should use `@string` resource" + errorLine1=" a:text="A"" + errorLine2=" ~~~~~~~~~~"> @@ -2903,6 +3114,17 @@ column="13"/> + + + + + + + + + + + + + message="When you define `paddingRight` you should probably also define `paddingLeft` for right-to-left symmetry" + errorLine1=" a:paddingRight="3dip"" + errorLine2=" ~~~~~~~~~~~~~~"> + line="73" + column="9"/> + + + + + + + + + errorLine1=" a:paddingRight="3dip" />" + errorLine2=" ~~~~~~~~~~~~~~"> + file="src/main/res/layout/album_list_item_legacy.xml" + line="49" + column="9"/> + message="When you define `paddingStart` you should probably also define `paddingEnd` for right-to-left symmetry" + errorLine1=" a:paddingStart="16dp"" + errorLine2=" ~~~~~~~~~~~~~~"> + file="src/main/res/layout/navigation_header.xml" + line="35" + column="13"/> + + + + + + + + - - - - - - - - @@ -3148,11 +3414,11 @@ + errorLine1=" a:paddingLeft="4dp"/>" + errorLine2=" ~~~~~~~~~~~~~"> @@ -3163,7 +3429,7 @@ errorLine2=" ~~~~~~~~~~~~~"> @@ -3174,18 +3440,7 @@ errorLine2=" ~~~~~~~~~~~~~"> - - - - @@ -3261,7 +3516,7 @@ errorLine1=" a:paddingLeft="6dp"" errorLine2=" ~~~~~~~~~~~~~"> @@ -3284,7 +3539,7 @@ errorLine2=" ~~~~~~~~~~~~~~"> @@ -3295,18 +3550,18 @@ errorLine2=" ~~~~~~~~~~~~~"> + message="When you define `paddingRight` you should probably also define `paddingLeft` for right-to-left symmetry" + errorLine1=" a:paddingRight="4dip"/>" + errorLine2=" ~~~~~~~~~~~~~~"> @@ -3317,18 +3572,7 @@ errorLine2=" ~~~~~~~~~~~~~~"> - - - - @@ -3357,67 +3601,67 @@ + errorLine1=" a:layout_gravity="left|center_vertical"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + file="src/main/res/layout/album_list_item_legacy.xml" + line="12" + column="27"/> + errorLine1=" a:paddingLeft="3dip" />" + errorLine2=" ~~~~~~~~~~~~~"> + file="src/main/res/layout/album_list_item_legacy.xml" + line="13" + column="9"/> + errorLine1=" a:layout_gravity="left|center_vertical"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + file="src/main/res/layout/album_list_item_legacy.xml" + line="20" + column="27"/> + errorLine1=" a:paddingLeft="6dip"" + errorLine2=" ~~~~~~~~~~~~~"> + + + + + column="9"/> + errorLine1=" a:paddingRight="3dip" />" + errorLine2=" ~~~~~~~~~~~~~~"> - - - - + file="src/main/res/layout/album_list_item_legacy.xml" + line="49" + column="9"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + message="Consider adding `a:layout_alignParentStart="true"` to better support right-to-left layouts" + errorLine1=" a:layout_alignParentLeft="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4131,7 +4056,7 @@ errorLine2=" ~~~~"> @@ -4142,18 +4067,150 @@ errorLine2=" ~~~~~~~~~~~~"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4170,12 +4227,12 @@ + message="Consider adding `a:paddingStart="4dp"` to better support right-to-left layouts" + errorLine1=" a:paddingLeft="4dp"/>" + errorLine2=" ~~~~~~~~~~~~~"> @@ -4186,7 +4243,7 @@ errorLine2=" ~~~~~~~~~~~~~"> @@ -4197,18 +4254,7 @@ errorLine2=" ~~~~~~~~~~~~~"> - - - - @@ -4372,7 +4418,7 @@ errorLine1=" a:paddingLeft="6dp"" errorLine2=" ~~~~~~~~~~~~~"> @@ -4383,8 +4429,8 @@ errorLine1=" a:layout_marginLeft="10dip"" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -4394,8 +4440,8 @@ errorLine1=" a:layout_marginLeft="10dip"" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -4432,6 +4478,17 @@ column="13"/> + + + + @@ -4450,7 +4507,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> @@ -4461,7 +4518,7 @@ errorLine2=" ~~~~~~~~~~~~~"> @@ -4472,7 +4529,7 @@ errorLine2=" ~~~~~~~~~~~~~~"> @@ -4483,7 +4540,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> @@ -4494,7 +4551,7 @@ errorLine2=" ~~~~~~~~~~~~~~"> @@ -4505,7 +4562,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> @@ -4516,7 +4573,7 @@ errorLine2=" ~~~~~~~~~~~~~"> @@ -4527,7 +4584,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> @@ -4538,7 +4595,7 @@ errorLine2=" ~~~~~~~~~~~~~"> @@ -4549,18 +4606,18 @@ errorLine2=" ~~~~~~~~~~~~~~"> + message="Consider adding `a:paddingEnd="4dip"` to better support right-to-left layouts" + errorLine1=" a:paddingRight="4dip"/>" + errorLine2=" ~~~~~~~~~~~~~~"> @@ -4571,7 +4628,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> @@ -4582,29 +4639,7 @@ errorLine2=" ~~~~~~~~~~~~~~"> - - - - - - - -