diff --git a/build.gradle b/build.gradle index 883b3ebc..25ea3d17 100644 --- a/build.gradle +++ b/build.gradle @@ -4,16 +4,14 @@ buildscript { repositories { jcenter() + google() maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath gradlePlugins.androidTools classpath gradlePlugins.kotlin classpath gradlePlugins.ktlintGradle - classpath(gradlePlugins.detekt) { - exclude module: 'kotlin-compiler-embeddable' - exclude module: 'kotlin-stdlib' - } + classpath gradlePlugins.detekt classpath gradlePlugins.jacocoAndroid } } @@ -23,6 +21,7 @@ allprojects { buildscript { repositories { jcenter() + google() } } diff --git a/dependencies.gradle b/dependencies.gradle index 89a1869c..3692f2d1 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,20 +1,19 @@ ext.versions = [ minSdk : 14, - targetSdk : 22, - compileSdk : 22, - gradle : '4.3.1', + targetSdk : 23, + compileSdk : 27, + gradle : '4.4.1', - buildTools : "25.0.3", - androidTools : "2.3.3", - ktlint : "0.12.1", + androidTools : "3.0.1", + ktlint : "0.14.0", ktlintGradle : "2.3.0", - detekt : "1.0.0.RC5-4", + detekt : "1.0.0.RC6", jacoco : "0.7.9", jacocoAndroid : "0.1.2", - androidSupport : "22.2.1", + androidSupport : "23.4.0", - kotlin : "1.1.60", + kotlin : "1.2.10", retrofit : "2.1.0", jackson : "2.9.0", @@ -42,7 +41,7 @@ ext.androidSupport = [ ext.other = [ kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin", - kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin", + kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin", retrofit : "com.squareup.retrofit2:retrofit:$versions.retrofit", gsonConverter : "com.squareup.retrofit2:converter-gson:$versions.retrofit", jacksonConverter : "com.squareup.retrofit2:converter-jackson:$versions.retrofit", diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ed88a042..99340b4a 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 702c4b68..57c7d2d2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip diff --git a/library/build.gradle b/library/build.gradle index c375cbc8..b2e07832 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion versions.compileSdk - buildToolsVersion versions.buildTools defaultConfig { minSdkVersion versions.minSdk @@ -23,5 +22,5 @@ android { } dependencies { - compile androidSupport.support + api androidSupport.support } diff --git a/menudrawer/build.gradle b/menudrawer/build.gradle index cd6f4945..1979d8cd 100644 --- a/menudrawer/build.gradle +++ b/menudrawer/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion versions.compileSdk - buildToolsVersion versions.buildTools defaultConfig { minSdkVersion versions.minSdk diff --git a/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java b/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java index 0b7464fd..4185cfd3 100644 --- a/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java +++ b/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java @@ -19,7 +19,6 @@ package net.simonvt.menudrawer; import android.content.Context; import android.hardware.SensorManager; import android.os.Build; -import android.util.FloatMath; import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; @@ -371,7 +370,7 @@ class Scroller { float dx = (float) (mFinalX - mStartX); float dy = (float) (mFinalY - mStartY); - float hyp = FloatMath.sqrt(dx * dx + dy * dy); + float hyp = (float) Math.sqrt(dx * dx + dy * dy); float ndx = dx / hyp; float ndy = dy / hyp; @@ -388,7 +387,7 @@ class Scroller { mMode = FLING_MODE; mFinished = false; - float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); + float velocity = (float) Math.sqrt(velocityX * velocityX + velocityY * velocityY); mVelocity = velocity; final double l = Math.log(START_TENSION * velocity / ALPHA); diff --git a/pulltorefresh/build.gradle b/pulltorefresh/build.gradle index cd6f4945..1979d8cd 100644 --- a/pulltorefresh/build.gradle +++ b/pulltorefresh/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion versions.compileSdk - buildToolsVersion versions.buildTools defaultConfig { minSdkVersion versions.minSdk diff --git a/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java b/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java index 3f873de0..a008e424 100644 --- a/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java +++ b/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java @@ -21,7 +21,6 @@ import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Bundle; import android.util.AttributeSet; -import android.util.FloatMath; import android.webkit.WebChromeClient; import android.webkit.WebView; @@ -112,7 +111,7 @@ public class PullToRefreshWebView extends PullToRefreshBase<WebView> { @Override protected boolean isReadyForPullEnd() { - float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()); + float exactContentHeight = (float) Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()); return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight()); } @@ -158,7 +157,7 @@ public class PullToRefreshWebView extends PullToRefreshBase<WebView> { } private int getScrollRange() { - return (int) Math.max(0, FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()) + return (int) Math.max(0, Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()) - (getHeight() - getPaddingBottom() - getPaddingTop())); } } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIClientTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIClientTest.kt index 4ecd67ac..6d4dfffd 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIClientTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIClientTest.kt @@ -14,7 +14,7 @@ abstract class SubsonicAPIClientTest { @Before fun setUp() { - client = SubsonicAPIClient(mockWebServerRule.mockWebServer.url("/").toString(), USERNAME, PASSWORD, - CLIENT_VERSION, CLIENT_ID) + client = SubsonicAPIClient(mockWebServerRule.mockWebServer.url("/").toString(), + USERNAME, PASSWORD, CLIENT_VERSION, CLIENT_ID) } } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetAlbumTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetAlbumTest.kt index 14ad35ba..32793390 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetAlbumTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetAlbumTest.kt @@ -50,16 +50,18 @@ class SubsonicApiGetAlbumTest : SubsonicAPIClientTest() { year `should equal to` 2008 genre `should equal to` "Hard Rock" songList.size `should equal to` 15 - songList[0] `should equal` MusicDirectoryChild(id = "6491", parent = "6475", isDir = false, - title = "Rock 'n' Roll Train", album = "Black Ice", artist = "AC/DC", - track = 1, year = 2008, genre = "Hard Rock", coverArt = "6475", size = 7205451, - contentType = "audio/mpeg", suffix = "mp3", duration = 261, bitRate = 219, - path = "AC_DC/Black Ice/01 Rock 'n' Roll Train.mp3", isVideo = false, - playCount = 0, discNumber = 1, created = parseDate("2016-10-23T15:31:20.000Z"), + songList[0] `should equal` MusicDirectoryChild(id = "6491", parent = "6475", + isDir = false, title = "Rock 'n' Roll Train", album = "Black Ice", + artist = "AC/DC", track = 1, year = 2008, genre = "Hard Rock", + coverArt = "6475", size = 7205451, contentType = "audio/mpeg", suffix = "mp3", + duration = 261, bitRate = 219, + path = "AC_DC/Black Ice/01 Rock 'n' Roll Train.mp3", + isVideo = false, playCount = 0, discNumber = 1, + created = parseDate("2016-10-23T15:31:20.000Z"), albumId = "618", artistId = "362", type = "music") - songList[5] `should equal` MusicDirectoryChild(id = "6492", parent = "6475", isDir = false, - title = "Smash 'n' Grab", album = "Black Ice", artist = "AC/DC", track = 6, - year = 2008, genre = "Hard Rock", coverArt = "6475", size = 6697204, + songList[5] `should equal` MusicDirectoryChild(id = "6492", parent = "6475", + isDir = false, title = "Smash 'n' Grab", album = "Black Ice", artist = "AC/DC", + track = 6, year = 2008, genre = "Hard Rock", coverArt = "6475", size = 6697204, contentType = "audio/mpeg", suffix = "mp3", duration = 246, bitRate = 216, path = "AC_DC/Black Ice/06 Smash 'n' Grab.mp3", isVideo = false, playCount = 0, discNumber = 1, created = parseDate("2016-10-23T15:31:20.000Z"), diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetArtistsTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetArtistsTest.kt index ac23364d..100042c5 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetArtistsTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetArtistsTest.kt @@ -37,11 +37,14 @@ class SubsonicApiGetArtistsTest : SubsonicAPIClientTest() { indexList `should equal` listOf( Index(name = "A", artists = listOf( Artist(id = "362", name = "AC/DC", coverArt = "ar-362", albumCount = 2), - Artist(id = "254", name = "Acceptance", coverArt = "ar-254", albumCount = 1) + Artist(id = "254", name = "Acceptance", coverArt = "ar-254", + albumCount = 1) )), Index(name = "T", artists = listOf( - Artist(id = "516", name = "Tangerine Dream", coverArt = "ar-516", albumCount = 1), - Artist(id = "242", name = "Taproot", coverArt = "ar-242", albumCount = 2) + Artist(id = "516", name = "Tangerine Dream", coverArt = "ar-516", + albumCount = 1), + Artist(id = "242", name = "Taproot", coverArt = "ar-242", + albumCount = 2) )) ) } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetMusicDirectoryTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetMusicDirectoryTest.kt index b4deff6b..0801e673 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetMusicDirectoryTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetMusicDirectoryTest.kt @@ -50,19 +50,21 @@ class SubsonicApiGetMusicDirectoryTest : SubsonicAPIClientTest() { starred `should equal` null playCount `should equal to` 1 childList.size `should be` 2 - childList[0] `should equal` MusicDirectoryChild(id = "4844", parent = "4836", isDir = false, - title = "Crash", album = "12 Stones", artist = "12 Stones", track = 1, year = 2002, - genre = "Alternative Rock", coverArt = "4836", size = 5348318L, - contentType = "audio/mpeg", suffix = "mp3", duration = 222, bitRate = 192, - path = "12 Stones/12 Stones/01 Crash.mp3", isVideo = false, playCount = 0, - discNumber = 1, created = parseDate("2016-10-23T15:19:10.000Z"), + childList[0] `should equal` MusicDirectoryChild(id = "4844", parent = "4836", + isDir = false, title = "Crash", album = "12 Stones", artist = "12 Stones", + track = 1, year = 2002, genre = "Alternative Rock", coverArt = "4836", + size = 5348318L, contentType = "audio/mpeg", suffix = "mp3", duration = 222, + bitRate = 192, path = "12 Stones/12 Stones/01 Crash.mp3", isVideo = false, + playCount = 0, discNumber = 1, + created = parseDate("2016-10-23T15:19:10.000Z"), albumId = "454", artistId = "288", type = "music") - childList[1] `should equal` MusicDirectoryChild(id = "4845", parent = "4836", isDir = false, - title = "Broken", album = "12 Stones", artist = "12 Stones", track = 2, year = 2002, - genre = "Alternative Rock", coverArt = "4836", size = 4309043L, - contentType = "audio/mpeg", suffix = "mp3", duration = 179, bitRate = 192, - path = "12 Stones/12 Stones/02 Broken.mp3", isVideo = false, playCount = 0, - discNumber = 1, created = parseDate("2016-10-23T15:19:09.000Z"), + childList[1] `should equal` MusicDirectoryChild(id = "4845", parent = "4836", + isDir = false, title = "Broken", album = "12 Stones", artist = "12 Stones", + track = 2, year = 2002, genre = "Alternative Rock", coverArt = "4836", + size = 4309043L, contentType = "audio/mpeg", suffix = "mp3", duration = 179, + bitRate = 192, path = "12 Stones/12 Stones/02 Broken.mp3", isVideo = false, + playCount = 0, discNumber = 1, + created = parseDate("2016-10-23T15:19:09.000Z"), albumId = "454", artistId = "288", type = "music") } } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetPodcastsTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetPodcastsTest.kt index e5ead1e3..985425e4 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetPodcastsTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetPodcastsTest.kt @@ -33,13 +33,16 @@ class SubsonicApiGetPodcastsTest : SubsonicAPIClientTest() { id `should equal to` "2" url `should equal to` "http://feeds.codenewbie.org/cnpodcast.xml" title `should equal to` "CodeNewbie" - description `should equal to` "Stories and interviews from people on their coding journey." + description `should equal to` "Stories and interviews from people on their coding " + + "journey." coverArt `should equal to` "pod-2" - originalImageUrl `should equal to` "http://codenewbie.blubrry.com/wp-content/uploads/powerpress/220808.jpg" + originalImageUrl `should equal to` "http://codenewbie.blubrry.com/wp-content/uploads/" + + "powerpress/220808.jpg" status `should equal to` "completed" errorMessage `should equal to` "" episodeList.size `should equal to` 10 - episodeList[0] `should equal` MusicDirectoryChild(id = "148", parent = "9959", isDir = false, + episodeList[0] `should equal` MusicDirectoryChild(id = "148", parent = "9959", + isDir = false, title = "S1:EP3 – How to teach yourself computer science (Vaidehi Joshi)", album = "CodeNewbie", artist = "podcasts", coverArt = "9959", size = 38274221, contentType = "audio/mpeg", suffix = "mp3", @@ -56,7 +59,8 @@ class SubsonicApiGetPodcastsTest : SubsonicAPIClientTest() { "CodeNewbie basecs 100 Days of Code Conway's Game of Life Hexes and " + "Other Magical Numbers (Vaidehi's blog post) Bits, Bytes, Building " + "With Binary (Vaidehi's blog post) Rust", - status = "completed", publishDate = parseDate("2017-08-29T00:01:01.000Z")) + status = "completed", + publishDate = parseDate("2017-08-29T00:01:01.000Z")) } } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetSongsByGenreTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetSongsByGenreTest.kt index 2be1b688..c344c8b3 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetSongsByGenreTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetSongsByGenreTest.kt @@ -39,8 +39,10 @@ class SubsonicApiGetSongsByGenreTest : SubsonicAPIClientTest() { artist = "DJ Polyakov PPK Feat Kate Cameron", year = 2009, genre = "Trance", size = 26805932, contentType = "audio/mpeg", suffix = "mp3", duration = 670, bitRate = 320, - path = "DJ Polyakov PPK Feat Kate Cameron/668/00 My Heart (Vadim Zhukov Remix).mp3", - isVideo = false, playCount = 2, created = parseDate("2016-10-23T21:58:29.000Z"), + path = "DJ Polyakov PPK Feat Kate Cameron/668/00 My Heart (Vadim Zhukov " + + "Remix).mp3", + isVideo = false, playCount = 2, + created = parseDate("2016-10-23T21:58:29.000Z"), albumId = "5", artistId = "4", type = "music") } } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetVideosListTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetVideosListTest.kt index 1e4cb79c..ef3d71ab 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetVideosListTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiGetVideosListTest.kt @@ -27,11 +27,13 @@ class SubsonicApiGetVideosListTest : SubsonicAPIClientTest() { assertResponseSuccessful(response) with(response.body().videosList) { size `should equal to` 1 - this[0] `should equal` MusicDirectoryChild(id = "10402", parent = "10401", isDir = false, - title = "MVI_0512", album = "Incoming", size = 21889646, - contentType = "video/avi", suffix = "avi", transcodedContentType = "video/x-flv", - transcodedSuffix = "flv", path = "Incoming/MVI_0512.avi", isVideo = true, - playCount = 0, created = parseDate("2017-11-19T12:34:33.000Z"), type = "video") + this[0] `should equal` MusicDirectoryChild(id = "10402", parent = "10401", + isDir = false, title = "MVI_0512", album = "Incoming", size = 21889646, + contentType = "video/avi", suffix = "avi", + transcodedContentType = "video/x-flv", transcodedSuffix = "flv", + path = "Incoming/MVI_0512.avi", isVideo = true, + playCount = 0, created = parseDate("2017-11-19T12:34:33.000Z"), + type = "video") } } } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiJukeboxControlTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiJukeboxControlTest.kt index 29244674..d072a217 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiJukeboxControlTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiJukeboxControlTest.kt @@ -56,8 +56,8 @@ class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() { artist = "The Pretty Reckless", track = 2, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 11089627, contentType = "audio/mpeg", suffix = "mp3", duration = 277, bitRate = 320, - path = "The Pretty Reckless/Going to Hell/02 Going to Hell.mp3", isVideo = false, - playCount = 0, discNumber = 1, + path = "The Pretty Reckless/Going to Hell/02 Going to Hell.mp3", + isVideo = false, playCount = 0, discNumber = 1, created = parseDate("2016-10-23T21:30:41.000Z"), albumId = "388", artistId = "238", type = "music") } diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiPasswordTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiPasswordTest.kt index 0b6f23e3..1a10e6cb 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiPasswordTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiPasswordTest.kt @@ -10,8 +10,8 @@ import org.junit.Test class SubsonicApiPasswordTest : SubsonicAPIClientTest() { @Test fun `Should pass PasswordMD5Interceptor in query params for api version 1 13 0`() { - val clientV12 = SubsonicAPIClient(mockWebServerRule.mockWebServer.url("/").toString(), USERNAME, - PASSWORD, SubsonicAPIVersions.V1_14_0, CLIENT_ID) + val clientV12 = SubsonicAPIClient(mockWebServerRule.mockWebServer.url("/").toString(), + USERNAME, PASSWORD, SubsonicAPIVersions.V1_14_0, CLIENT_ID) mockWebServerRule.enqueueResponse("ping_ok.json") clientV12.api.ping().execute() @@ -25,8 +25,8 @@ class SubsonicApiPasswordTest : SubsonicAPIClientTest() { @Test fun `Should pass PasswordHexInterceptor in query params for api version 1 12 0`() { - val clientV11 = SubsonicAPIClient(mockWebServerRule.mockWebServer.url("/").toString(), USERNAME, - PASSWORD, SubsonicAPIVersions.V1_12_0, CLIENT_ID) + val clientV11 = SubsonicAPIClient(mockWebServerRule.mockWebServer.url("/").toString(), + USERNAME, PASSWORD, SubsonicAPIVersions.V1_12_0, CLIENT_ID) mockWebServerRule.enqueueResponse("ping_ok.json") clientV11.api.ping().execute() diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTest.kt index d3a9d69b..cd850480 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTest.kt @@ -39,7 +39,8 @@ class SubsonicApiSearchTest : SubsonicAPIClientTest() { track = 17, year = 2005, genre = "Rap", coverArt = "5766", size = 5607024, contentType = "audio/mpeg", suffix = "mp3", duration = 233, bitRate = 192, - path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels.mp3", + path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels" + + ".mp3", isVideo = false, playCount = 0, discNumber = 1, created = parseDate("2016-10-23T20:09:02.000Z"), albumId = "568", artistId = "505", type = "music") diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchThreeTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchThreeTest.kt index 21ee05f6..e9aca121 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchThreeTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchThreeTest.kt @@ -32,20 +32,23 @@ class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() { assertResponseSuccessful(response) with(response.body().searchResult) { artistList.size `should equal to` 1 - artistList[0] `should equal` Artist(id = "505", name = "The Prodigy", coverArt = "ar-505", - albumCount = 5) + artistList[0] `should equal` Artist(id = "505", name = "The Prodigy", + coverArt = "ar-505", albumCount = 5) albumList.size `should equal to` 1 - albumList[0] `should equal` Album(id = "855", name = "Always Outnumbered, Never Outgunned", + albumList[0] `should equal` Album(id = "855", + name = "Always Outnumbered, Never Outgunned", artist = "The Prodigy", artistId = "505", coverArt = "al-855", songCount = 12, duration = 3313, created = parseDate("2016-10-23T20:57:27.000Z"), year = 2004, genre = "Electronic") songList.size `should equal to` 1 - songList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766", isDir = false, + songList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766", + isDir = false, title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted", artist = "The Prodigy", track = 17, year = 2005, genre = "Rap", coverArt = "5766", size = 5607024, contentType = "audio/mpeg", suffix = "mp3", duration = 233, bitRate = 192, - path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels.mp3", + path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels" + + ".mp3", isVideo = false, playCount = 0, discNumber = 1, created = parseDate("2016-10-23T20:09:02.000Z"), albumId = "568", artistId = "505", type = "music") @@ -56,9 +59,10 @@ class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() { fun `Should pass query as request param`() { val query = "some-wip-query" - mockWebServerRule.assertRequestParam(responseResourceName = "search3_ok.json", apiRequest = { + mockWebServerRule.assertRequestParam(responseResourceName = "search3_ok.json", + expectedParam = "query=$query") { client.api.search3(query = query).execute() - }, expectedParam = "query=$query") + } } @Test diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTwoTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTwoTest.kt index 835ac77e..e572090f 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTwoTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicApiSearchTwoTest.kt @@ -33,18 +33,20 @@ class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() { artistList.size `should equal to` 1 artistList[0] `should equal` Artist(id = "522", name = "The Prodigy") albumList.size `should equal to` 1 - albumList[0] `should equal` MusicDirectoryChild(id = "8867", parent = "522", isDir = true, - title = "Always Outnumbered, Never Outgunned", + albumList[0] `should equal` MusicDirectoryChild(id = "8867", parent = "522", + isDir = true, title = "Always Outnumbered, Never Outgunned", album = "Always Outnumbered, Never Outgunned", artist = "The Prodigy", year = 2004, genre = "Electronic", coverArt = "8867", playCount = 0, created = parseDate("2016-10-23T20:57:27.000Z")) songList.size `should equal to` 1 - songList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766", isDir = false, + songList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766", + isDir = false, title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted", artist = "The Prodigy", track = 17, year = 2005, genre = "Rap", coverArt = "5766", size = 5607024, contentType = "audio/mpeg", suffix = "mp3", duration = 233, bitRate = 192, - path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels.mp3", + path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels" + + ".mp3", isVideo = false, playCount = 0, discNumber = 1, created = parseDate("2016-10-23T20:09:02.000Z"), albumId = "568", artistId = "505", type = "music") diff --git a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/VersionInterceptorTest.kt b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/VersionInterceptorTest.kt index c26abd4b..9b543fe9 100644 --- a/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/VersionInterceptorTest.kt +++ b/subsonic-api/src/integrationTest/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/VersionInterceptorTest.kt @@ -40,7 +40,8 @@ class VersionInterceptorTest : BaseInterceptorTest() { client.newCall(createRequest {}).execute() - (interceptor as VersionInterceptor).protocolVersion `should equal` SubsonicAPIVersions.V1_13_0 + (interceptor as VersionInterceptor) + .protocolVersion `should equal` SubsonicAPIVersions.V1_13_0 } @Test diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/ApiVersionCheckWrapper.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/ApiVersionCheckWrapper.kt index e97ecd07..3f7d998d 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/ApiVersionCheckWrapper.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/ApiVersionCheckWrapper.kt @@ -271,7 +271,9 @@ internal class ApiVersionCheckWrapper( return api.getBookmarks() } - override fun createBookmark(id: String, position: Long, comment: String?): Call<SubsonicResponse> { + override fun createBookmark(id: String, + position: Long, + comment: String?): Call<SubsonicResponse> { checkVersion(V1_9_0) return api.createBookmark(id, position, comment) } diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIDefinition.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIDefinition.kt index 85887348..e115ccb3 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIDefinition.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIDefinition.kt @@ -127,7 +127,8 @@ interface SubsonicAPIDefinition { @Query("comment") comment: String? = null, @Query("public") public: Boolean? = null, @Query("songIdToAdd") songIdsToAdd: List<String>? = null, - @Query("songIndexToRemove") songIndexesToRemove: List<Int>? = null): Call<SubsonicResponse> + @Query("songIndexToRemove") songIndexesToRemove: List<Int>? = null): + Call<SubsonicResponse> @GET("getPodcasts.view") fun getPodcasts(@Query("includeEpisodes") includeEpisodes: Boolean? = null, @@ -143,35 +144,39 @@ interface SubsonicAPIDefinition { @Query("submission") submission: Boolean? = null): Call<SubsonicResponse> @GET("getAlbumList.view") - fun getAlbumList(@Query("type") type: AlbumListType, - @Query("size") size: Int? = null, - @Query("offset") offset: Int? = null, - @Query("fromYear") fromYear: Int? = null, - @Query("toYear") toYear: Int? = null, - @Query("genre") genre: String? = null, - @Query("musicFolderId") musicFolderId: String? = null): Call<GetAlbumListResponse> + fun getAlbumList( + @Query("type") type: AlbumListType, + @Query("size") size: Int? = null, + @Query("offset") offset: Int? = null, + @Query("fromYear") fromYear: Int? = null, + @Query("toYear") toYear: Int? = null, + @Query("genre") genre: String? = null, + @Query("musicFolderId") musicFolderId: String? = null): Call<GetAlbumListResponse> @GET("getAlbumList2.view") - fun getAlbumList2(@Query("type") type: AlbumListType, - @Query("size") size: Int? = null, - @Query("offset") offset: Int? = null, - @Query("fromYear") fromYear: Int? = null, - @Query("toYear") toYear: Int? = null, - @Query("genre") genre: String? = null, - @Query("musicFolderId") musicFolderId: String? = null): Call<GetAlbumList2Response> + fun getAlbumList2( + @Query("type") type: AlbumListType, + @Query("size") size: Int? = null, + @Query("offset") offset: Int? = null, + @Query("fromYear") fromYear: Int? = null, + @Query("toYear") toYear: Int? = null, + @Query("genre") genre: String? = null, + @Query("musicFolderId") musicFolderId: String? = null): Call<GetAlbumList2Response> @GET("getRandomSongs.view") - fun getRandomSongs(@Query("size") size: Int? = null, - @Query("genre") genre: String? = null, - @Query("fromYear") fromYear: Int? = null, - @Query("toYear") toYear: Int? = null, - @Query("musicFolderId") musicFolderId: String? = null): Call<GetRandomSongsResponse> + fun getRandomSongs( + @Query("size") size: Int? = null, + @Query("genre") genre: String? = null, + @Query("fromYear") fromYear: Int? = null, + @Query("toYear") toYear: Int? = null, + @Query("musicFolderId") musicFolderId: String? = null): Call<GetRandomSongsResponse> @GET("getStarred.view") fun getStarred(@Query("musicFolderId") musicFolderId: String? = null): Call<GetStarredResponse> @GET("getStarred2.view") - fun getStarred2(@Query("musicFolderId") musicFolderId: String? = null): Call<GetStarredTwoResponse> + fun getStarred2( + @Query("musicFolderId") musicFolderId: String? = null): Call<GetStarredTwoResponse> @Streaming @GET("getCoverArt.view") diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIVersions.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIVersions.kt index 94f68e59..79ccb19b 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIVersions.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/SubsonicAPIVersions.kt @@ -55,7 +55,8 @@ enum class SubsonicAPIVersions(val subsonicVersions: String, val restApiVersion: } class SubsonicAPIVersionsDeserializer : JsonDeserializer<SubsonicAPIVersions>() { - override fun deserialize(p: JsonParser, ctxt: DeserializationContext?): SubsonicAPIVersions { + override fun deserialize(p: JsonParser, + ctxt: DeserializationContext?): SubsonicAPIVersions { if (p.currentName != "version") { throw JsonParseException(p, "Not valid token for API version!") } diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/RangeHeaderInterceptor.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/RangeHeaderInterceptor.kt index cbb5d031..1e9381b5 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/RangeHeaderInterceptor.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/interceptors/RangeHeaderInterceptor.kt @@ -36,6 +36,6 @@ internal class RangeHeaderInterceptor : Interceptor { // to avoid the thrashing effect seen when offset is combined with transcoding/downsampling // on the server. In that case, the server uses a long time before sending any data, // causing the client to time out. - private fun getReadTimeout(offset: Int) - = (SOCKET_READ_TIMEOUT_DOWNLOAD + offset * TIMEOUT_MILLIS_PER_OFFSET_BYTE).toInt() + private fun getReadTimeout(offset: Int) = + (SOCKET_READ_TIMEOUT_DOWNLOAD + offset * TIMEOUT_MILLIS_PER_OFFSET_BYTE).toInt() } diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/models/SearchResult.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/models/SearchResult.kt index 405feb13..1efade9a 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/models/SearchResult.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/models/SearchResult.kt @@ -2,6 +2,7 @@ package org.moire.ultrasonic.api.subsonic.models import com.fasterxml.jackson.annotation.JsonProperty -data class SearchResult(val offset: Int = 0, - val totalHits: Int = 0, - @JsonProperty("match") val matchList: List<MusicDirectoryChild> = emptyList()) +data class SearchResult( + val offset: Int = 0, + val totalHits: Int = 0, + @JsonProperty("match") val matchList: List<MusicDirectoryChild> = emptyList()) diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/GetPlaylistsResponse.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/GetPlaylistsResponse.kt index 8b31d438..a07c610d 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/GetPlaylistsResponse.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/GetPlaylistsResponse.kt @@ -16,4 +16,5 @@ class GetPlaylistsResponse(status: Status, get() = playlistsWrapper.playlistList } -private class PlaylistsWrapper(@JsonProperty("playlist") val playlistList: List<Playlist> = emptyList()) +private class PlaylistsWrapper( + @JsonProperty("playlist") val playlistList: List<Playlist> = emptyList()) diff --git a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/SearchTwoResponse.kt b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/SearchTwoResponse.kt index 32a90b41..b1a97164 100644 --- a/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/SearchTwoResponse.kt +++ b/subsonic-api/src/main/kotlin/org/moire/ultrasonic/api/subsonic/response/SearchTwoResponse.kt @@ -5,8 +5,9 @@ import org.moire.ultrasonic.api.subsonic.SubsonicAPIVersions import org.moire.ultrasonic.api.subsonic.SubsonicError import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult -class SearchTwoResponse(status: Status, - version: SubsonicAPIVersions, - error: SubsonicError?, - @JsonProperty("searchResult2") val searchResult: SearchTwoResult = SearchTwoResult()) +class SearchTwoResponse( + status: Status, + version: SubsonicAPIVersions, + error: SubsonicError?, + @JsonProperty("searchResult2") val searchResult: SearchTwoResult = SearchTwoResult()) : SubsonicResponse(status, version, error) diff --git a/ultrasonic/build.gradle b/ultrasonic/build.gradle index 0f7ee918..822c2243 100644 --- a/ultrasonic/build.gradle +++ b/ultrasonic/build.gradle @@ -5,7 +5,6 @@ apply from: "../gradle_scripts/code_quality.gradle" android { compileSdkVersion versions.compileSdk - buildToolsVersion versions.buildTools defaultConfig { applicationId "org.moire.ultrasonic" @@ -42,21 +41,21 @@ android { } dependencies { - compile project(':menudrawer') - compile project(':pulltorefresh') - compile project(':library') - compile project(':subsonic-api') + implementation project(':menudrawer') + implementation project(':pulltorefresh') + implementation project(':library') + implementation project(':subsonic-api') - compile androidSupport.support - compile androidSupport.design + implementation androidSupport.support + implementation androidSupport.design - compile other.kotlinStdlib + implementation other.kotlinStdlib - testCompile other.kotlinReflect - testCompile testing.junit - testCompile testing.kotlinJunit - testCompile testing.mockitoKotlin - testCompile testing.kluent + testImplementation other.kotlinReflect + testImplementation testing.junit + testImplementation testing.kotlinJunit + testImplementation testing.mockitoKotlin + testImplementation testing.kluent } // Excluding all non-kotlin classes diff --git a/ultrasonic/lint-baseline.xml b/ultrasonic/lint-baseline.xml index bdd2edb8..916b6f0c 100644 --- a/ultrasonic/lint-baseline.xml +++ b/ultrasonic/lint-baseline.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<issues format="4" by="lint 2.3.3"> +<issues format="4" by="lint 3.0.1"> <issue id="ScrollViewSize" @@ -30,7 +30,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="153" + line="151" column="3"/> </issue> @@ -41,7 +41,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="200" + line="198" column="3"/> </issue> @@ -52,7 +52,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="309" + line="307" column="3"/> </issue> @@ -63,7 +63,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="328" + line="326" column="3"/> </issue> @@ -74,7 +74,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="427" + line="416" column="4"/> </issue> @@ -85,7 +85,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1634" + line="1623" column="3"/> </issue> @@ -96,7 +96,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1642" + line="1631" column="3"/> </issue> @@ -107,7 +107,7 @@ errorLine2=" ~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1650" + line="1639" column="3"/> </issue> @@ -258,50 +258,6 @@ column="43"/> </issue> - <issue - id="DefaultLocale" - message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead" - errorLine1=" return String.format("indexes-%d.ser", Math.abs(s.hashCode()));" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/org/moire/ultrasonic/service/RESTMusicService.java" - line="288" - column="10"/> - </issue> - - <issue - id="DefaultLocale" - message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead" - errorLine1=" return String.format("indexes-%d.ser", Math.abs(s.hashCode()));" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/org/moire/ultrasonic/service/RESTMusicService.java" - line="335" - column="10"/> - </issue> - - <issue - id="DefaultLocale" - message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead" - errorLine1=" return String.format("musicFolders-%d.ser", Math.abs(s.hashCode()));" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/org/moire/ultrasonic/service/RESTMusicService.java" - line="351" - column="10"/> - </issue> - - <issue - id="DefaultLocale" - message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead" - errorLine1=" headers.add(new BasicHeader("Range", String.format("bytes=%d-", offset)));" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/org/moire/ultrasonic/service/RESTMusicService.java" - line="941" - column="41"/> - </issue> - <issue id="DefaultLocale" message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead" @@ -342,7 +298,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1477" + line="1466" column="11"/> </issue> @@ -353,7 +309,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1481" + line="1470" column="11"/> </issue> @@ -364,7 +320,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1485" + line="1474" column="11"/> </issue> @@ -375,103 +331,19 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1488" + line="1477" column="29"/> </issue> <issue - id="DefaultLocale" - message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead" - errorLine1=" else return minutes > 0 ? String.format("%d:%02d", minutes, seconds) : String.format("0:%02d", seconds);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="ShowToast" + message="Toast created but not shown: did you forget to call `show()` ?" + errorLine1=" toast = Toast.makeText(context, message, shortDuration ? Toast.LENGTH_SHORT : Toast.LENGTH_LONG);" + errorLine2=" ~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="1488" - column="74"/> - </issue> - - <issue - id="InlinedApi" - message="Field requires API level 17 (current min is 14): `android.view.View#LAYOUT_DIRECTION_RTL`" - errorLine1=" if (mSlideDrawable != null) mSlideDrawable.setIsRtl(layoutDirection == LAYOUT_DIRECTION_RTL);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/MenuDrawer.java" - line="882" - column="80"/> - </issue> - - <issue - id="InlinedApi" - message="Field requires API level 17 (current min is 14): `android.view.View#LAYOUT_DIRECTION_RTL`" - errorLine1=" mSlideDrawable.setIsRtl(ViewHelper.getLayoutDirection(this) == LAYOUT_DIRECTION_RTL);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/MenuDrawer.java" - line="1325" - column="72"/> - </issue> - - <issue - id="LocaleFolder" - message="The locale folder "`he`" should be called "`iw`" instead; see the `java.util.Locale` documentation"> - <location - file="src/main/res/values-he"/> - </issue> - - <issue - id="NewApi" - message="Call requires API level 21 (current min is 14): android.widget.AbsListView#setSelectionFromTop" - errorLine1=" setSelectionFromTop(movePos, top - padTop);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/mobeta/android/dslv/DragSortListView.java" - line="2936" - column="13"/> - </issue> - - <issue - id="OldTargetApi" - message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the `android.os.Build.VERSION_CODES` javadoc for details." - errorLine1=" <uses-sdk android:targetSdkVersion="7"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="6" - column="15"/> - </issue> - - <issue - id="OldTargetApi" - message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the `android.os.Build.VERSION_CODES` javadoc for details." - errorLine1=" <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="41"/> - </issue> - - <issue - id="OldTargetApi" - message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the `android.os.Build.VERSION_CODES` javadoc for details." - errorLine1=" <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="41"/> - </issue> - - <issue - id="SimpleDateFormat" - message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates." - errorLine1=" DateFormat parseDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/org/moire/ultrasonic/service/parser/PodcastEpisodeParser.java" - line="67" - column="38"/> + line="551" + column="12"/> </issue> <issue @@ -520,12 +392,12 @@ <issue id="WifiManagerPotentialLeak" - message="The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing `context` to `context.getApplicationContext()` " + message="The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing `context` to `context.getApplicationContext()`" errorLine1=" WifiManager wm = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/Util.java" - line="892" + line="881" column="34"/> </issue> @@ -558,7 +430,7 @@ errorLine2=" ~~~~"> <location file="src/main/java/org/moire/ultrasonic/service/JukeboxService.java" - line="466" + line="467" column="58"/> </issue> @@ -591,7 +463,7 @@ errorLine2=" ~~~~"> <location file="src/main/java/org/moire/ultrasonic/activity/SelectPlaylistActivity.java" - line="303" + line="304" column="75"/> </issue> @@ -602,7 +474,7 @@ errorLine2=" ~~~~"> <location file="src/main/java/org/moire/ultrasonic/activity/ShareActivity.java" - line="287" + line="288" column="73"/> </issue> @@ -610,33 +482,33 @@ id="LongLogTag" message="The logging tag can be at most 23 characters, was 31 (Exception in CacheCleaner.clean)" errorLine1=" Log.w("Exception in CacheCleaner.clean", ex);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/CacheCleaner.java" line="50" - column="4"/> + column="10"/> </issue> <issue id="LongLogTag" message="The logging tag can be at most 23 characters, was 36 (Exception in CacheCleaner.cleanSpace)" errorLine1=" Log.w("Exception in CacheCleaner.cleanSpace", ex);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/CacheCleaner.java" line="63" - column="4"/> + column="10"/> </issue> <issue id="LongLogTag" message="The logging tag can be at most 23 characters, was 40 (Exception in CacheCleaner.cleanPlaylists)" errorLine1=" Log.w("Exception in CacheCleaner.cleanPlaylists", ex);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/util/CacheCleaner.java" line="76" - column="4"/> + column="10"/> </issue> <issue @@ -651,587 +523,33 @@ </issue> <issue - id="GradleOverrides" - message="This `targetSdkVersion` value (`7`) is not used; it is always overridden by the value specified in the Gradle build script (`22`)" - errorLine1=" <uses-sdk android:targetSdkVersion="7"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="6" - column="15"/> - </issue> - - <issue - id="GradleOverrides" - message="This `minSdkVersion` value (`4`) is not used; it is always overridden by the value specified in the Gradle build script (`14`)" - errorLine1=" <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="15"/> - </issue> - - <issue - id="GradleOverrides" - message="This `minSdkVersion` value (`7`) is not used; it is always overridden by the value specified in the Gradle build script (`14`)" - errorLine1=" android:minSdkVersion="7" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="7"/> - </issue> - - <issue - id="GradleOverrides" - message="This `minSdkVersion` value (`7`) is not used; it is always overridden by the value specified in the Gradle build script (`14`)" - errorLine1=" <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="15"/> - </issue> - - <issue - id="GradleOverrides" - message="This `targetSdkVersion` value (`16`) is not used; it is always overridden by the value specified in the Gradle build script (`22`)" - errorLine1=" <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="41"/> - </issue> - - <issue - id="GradleOverrides" - message="This `targetSdkVersion` value (`16`) is not used; it is always overridden by the value specified in the Gradle build script (`22`)" - errorLine1=" <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/AndroidManifest.xml" - line="7" - column="41"/> - </issue> - - <issue - id="ParcelClassLoader" - message="Using the default class loader will not work if you are restoring your own classes. Consider using for example `readBundle(getClass().getClassLoader())` instead." - errorLine1=" mState = in.readBundle();" - errorLine2=" ~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/MenuDrawer.java" - line="1630" - column="25"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/album_list_item.xml" - line="30" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"/>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/album_list_item.xml" - line="38" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x1.xml" - line="44" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x1.xml" - line="62" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x2.xml" - line="46" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x2.xml" - line="63" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x2.xml" - line="80" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x3.xml" - line="47" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x3.xml" - line="65" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x4.xml" - line="48" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/appwidget4x4.xml" - line="66" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/chat_item.xml" - line="26" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/chat_item.xml" - line="47" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: False is the default, so just remove the attribute" - errorLine1=" a:singleLine="false"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/chat_item.xml" - line="60" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/chat_item_reverse.xml" - line="24" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/chat_item_reverse.xml" - line="42" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: False is the default, so just remove the attribute" - errorLine1=" a:singleLine="false"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/chat_item_reverse.xml" - line="55" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/download_button_bar_flipper.xml" - line="18" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/download_button_bar_flipper.xml" - line="74" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/download_button_bar_flipper.xml" - line="84" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`android:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" android:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/now_playing.xml" - line="41" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`android:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" android:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/now_playing.xml" - line="52" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`android:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" android:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/pull_to_refresh_header_vertical.xml" - line="45" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`android:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" android:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/pull_to_refresh_header_vertical.xml" - line="53" - column="17"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"/> -" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/save_playlist.xml" - line="14" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/select_album_header.xml" - line="25" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/select_album_header.xml" - line="36" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/select_album_header.xml" - line="47" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/select_album_header.xml" - line="58" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/select_album_header.xml" - line="69" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/select_album_header.xml" - line="80" - column="9"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: False is the default, so just remove the attribute" - errorLine1=" a:singleLine="false"" + id="EllipsizeMaxLines" + message="Combining `ellipsize=marquee` and `maxLines=1` can lead to crashes. Use `singleLine=true` instead." + errorLine1=" android:maxLines="1"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> <location - file="src/main/res/layout/share_details.xml" - line="27" + file="src/main/res/layout/notification.xml" + line="38" + column="13"/> + <location + file="src/main/res/layout/notification.xml" + line="36" column="13"/> </issue> <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + id="EllipsizeMaxLines" + message="Combining `ellipsize=marquee` and `maxLines=1` can lead to crashes. Use `singleLine=true` instead." + errorLine1=" android:maxLines="1"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> <location - file="src/main/res/layout/share_list_item.xml" + file="src/main/res/layout/notification_large.xml" + line="44" + column="17"/> + <location + file="src/main/res/layout/notification_large.xml" line="42" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/song_details.xml" - line="32" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/song_details.xml" - line="58" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/song_details.xml" - line="68" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/video_details.xml" - line="24" - column="13"/> - </issue> - - <issue - id="Deprecated" - message="`a:singleLine` is deprecated: Use `maxLines="1"` instead" - errorLine1=" a:singleLine="true"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/video_details.xml" - line="34" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`pull_to_refresh_pull_label`" is not translated in "hu" (Hungarian)" - errorLine1=" <string name="pull_to_refresh_pull_label">Pull to refresh…</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/pulltorefresh/src/main/res/values/pull_refresh_strings.xml" - line="4" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`pull_to_refresh_release_label`" is not translated in "hu" (Hungarian)" - errorLine1=" <string name="pull_to_refresh_release_label">Release to refresh…</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/pulltorefresh/src/main/res/values/pull_refresh_strings.xml" - line="5" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`pull_to_refresh_refreshing_label`" is not translated in "hu" (Hungarian)" - errorLine1=" <string name="pull_to_refresh_refreshing_label">Loading…</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/pulltorefresh/src/main/res/values/pull_refresh_strings.xml" - line="6" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`pull_to_refresh_from_bottom_pull_label`" is not translated in "es" (Spanish), "fr" (French), "hu" (Hungarian), "pt" (Portuguese), "pt-BR" (Portuguese: Brazil)" - errorLine1=" <string name="pull_to_refresh_from_bottom_pull_label">@string/pull_to_refresh_pull_label</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/pulltorefresh/src/main/res/values/pull_refresh_strings.xml" - line="9" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`pull_to_refresh_from_bottom_release_label`" is not translated in "es" (Spanish), "fr" (French), "hu" (Hungarian), "pt" (Portuguese), "pt-BR" (Portuguese: Brazil)" - errorLine1=" <string name="pull_to_refresh_from_bottom_release_label">@string/pull_to_refresh_release_label</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/pulltorefresh/src/main/res/values/pull_refresh_strings.xml" - line="10" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`pull_to_refresh_from_bottom_refreshing_label`" is not translated in "es" (Spanish), "fr" (French), "hu" (Hungarian), "pt" (Portuguese), "pt-BR" (Portuguese: Brazil)" - errorLine1=" <string name="pull_to_refresh_from_bottom_refreshing_label">@string/pull_to_refresh_refreshing_label</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/pulltorefresh/src/main/res/values/pull_refresh_strings.xml" - line="11" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`md__drawerOpenIndicatorDesc`" is not translated in "es" (Spanish), "fr" (French), "hu" (Hungarian), "pt" (Portuguese), "pt-BR" (Portuguese: Brazil)" - errorLine1=" <string name="md__drawerOpenIndicatorDesc">Close drawer</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/menudrawer/src/main/res/values/strings.xml" - line="4" - column="13"/> - </issue> - - <issue - id="MissingTranslation" - message=""`md__drawerClosedIndicatorDesc`" is not translated in "es" (Spanish), "fr" (French), "hu" (Hungarian), "pt" (Portuguese), "pt-BR" (Portuguese: Brazil)" - errorLine1=" <string name="md__drawerClosedIndicatorDesc">Open drawer</string>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="/home/egorr/data/work/ultrasonic/menudrawer/src/main/res/values/strings.xml" - line="6" - column="13"/> + column="17"/> </issue> <issue @@ -1278,17 +596,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">1 música</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="398" - column="9"/> - </issue> - <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." @@ -1311,17 +618,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">1 música selecionada para ser fixada.</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="402" - column="9"/> - </issue> - <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." @@ -1344,17 +640,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">1 música selecionada para descarregar.</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="406" - column="9"/> - </issue> - <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." @@ -1377,17 +662,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">1 música selecionada para ser desafixada.</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="410" - column="9"/> - </issue> - <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." @@ -1410,17 +684,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">1 música adicionada ao fim da fila.</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="414" - column="9"/> - </issue> - <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." @@ -1443,17 +706,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">1 música inserida após a atual.</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="418" - column="9"/> - </issue> - <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." @@ -1476,17 +728,6 @@ column="9"/> </issue> - <issue - id="ImpliedQuantity" - message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue explanation for more." - errorLine1=" <item quantity="one">Resta 1 dia para o fim do período de teste</item>" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/values-pt/strings.xml" - line="422" - column="9"/> - </issue> - <issue id="PluralsCandidate" message="Formatting %d followed by words ("Artists"): This should probably be a plural rather than a string" @@ -1575,28 +816,6 @@ column="5"/> </issue> - <issue - id="UnusedQuantity" - message="For language "pt" (Portuguese) the following quantities are not relevant: `zero`" - errorLine1=" <plurals name="select_album_n_songs">" - errorLine2=" ^"> - <location - file="src/main/res/values-pt/strings.xml" - line="396" - column="5"/> - </issue> - - <issue - id="AddJavascriptInterface" - message="`WebView.addJavascriptInterface` should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application" - errorLine1=" webView.addJavascriptInterface(mJsCallback, JS_INTERFACE_PKG);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.java" - line="90" - column="11"/> - </issue> - <issue id="TrulyRandom" message="Potentially insecure random numbers on Android 4.3 and older. Read https://android-developers.blogspot.com/2013/08/some-securerandom-thoughts.html for more info." @@ -1608,17 +827,6 @@ column="44"/> </issue> - <issue - id="JavascriptInterface" - message="None of the methods in the added interface (JsValueCallback) have been annotated with `@android.webkit.JavascriptInterface`; they will not be visible in API 17" - errorLine1=" webView.addJavascriptInterface(mJsCallback, JS_INTERFACE_PKG);" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.java" - line="90" - column="11"/> - </issue> - <issue id="AllowAllHostnameVerifier" message="Using the AllowAllHostnameVerifier HostnameVerifier is unsafe because it always returns true, which could cause insecure network traffic due to trusting TLS/SSL server certificates for wrong hostnames" @@ -1652,6 +860,17 @@ column="9"/> </issue> + <issue + id="WakelockTimeout" + message="Provide a timeout when requesting a wakelock with `PowerManager.Wakelock.acquire(long timeout)`. This will ensure the OS will cleanup any wakelocks that last longer than you intend, and will save your user's battery." + errorLine1=" wakeLock.acquire();" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/service/DownloadFile.java" + line="306" + column="6"/> + </issue> + <issue id="ObsoleteLayoutParam" message="Invalid layout param in a `LinearLayout`: `layout_above`" @@ -1676,332 +895,199 @@ <issue id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is never < 14" - errorLine1=" if (mUsesCompat && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + message="This folder configuration (`v14`) is unnecessary; `minSdkVersion` is 14. Merge all the resources in this folder into `drawable-hdpi`."> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="41" - column="28"/> + file="src/main/res/drawable-hdpi-v14"/> </issue> <issue id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + message="This folder configuration (`v14`) is unnecessary; `minSdkVersion` is 14. Merge all the resources in this folder into `drawable-mdpi`."> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="43" - column="20"/> + file="src/main/res/drawable-mdpi-v14"/> </issue> <issue id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is never < 14" - errorLine1=" if (mUsesCompat && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + message="This folder configuration (`v14`) is unnecessary; `minSdkVersion` is 14. Merge all the resources in this folder into `drawable-xhdpi`."> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="51" - column="28"/> + file="src/main/res/drawable-xhdpi-v14"/> </issue> <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.BookmarkActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="53" - column="20"/> + file="src/main/java/org/moire/ultrasonic/activity/BookmarkActivity.java" + line="467" + column="16"/> </issue> <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is never < 14" - errorLine1=" if (mUsesCompat && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.util.CacheCleaner.BackgroundCleanup)" + errorLine1=" private class BackgroundCleanup extends AsyncTask<Void, Void, Void>" + errorLine2=" ~~~~~~~~~~~~~~~~~"> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="59" - column="28"/> + file="src/main/java/org/moire/ultrasonic/util/CacheCleaner.java" + line="232" + column="16"/> </issue> <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.util.CacheCleaner.BackgroundSpaceCleanup)" + errorLine1=" private class BackgroundSpaceCleanup extends AsyncTask<Void, Void, Void>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="61" - column="20"/> + file="src/main/java/org/moire/ultrasonic/util/CacheCleaner.java" + line="266" + column="16"/> </issue> <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is never < 14" - errorLine1=" if (mUsesCompat && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.util.CacheCleaner.BackgroundPlaylistsCleanup)" + errorLine1=" private class BackgroundPlaylistsCleanup extends AsyncTask<List<Playlist>, Void, Void>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="67" - column="28"/> + file="src/main/java/org/moire/ultrasonic/util/CacheCleaner.java" + line="301" + column="16"/> </issue> <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.ChatActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="69" - column="20"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is never < 14" - errorLine1=" if (mUsesCompat && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="77" - column="28"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/compat/ActionBarHelper.java" - line="79" - column="20"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/DraggableDrawer.java" - line="572" - column="13"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/DraggableDrawer.java" - line="580" - column="13"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/DraggableDrawer.java" - line="588" - column="13"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/DraggableDrawer.java" - line="596" - column="13"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" return VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD && mOverScrollEnabled" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java" - line="211" - column="10"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView.java" - line="54" - column="7"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshGridView.java" - line="54" - column="7"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.java" - line="53" - column="7"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshListView.java" - line="207" - column="7"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshScrollView.java" - line="52" - column="7"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java" - line="98" - column="7"/> - </issue> - - <issue - id="ObsoleteSdkInt" - message="Unnecessary; SDK_INT is always >= 14" - errorLine1=" if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/internal/ViewCompat.java" - line="44" - column="7"/> + file="src/main/java/org/moire/ultrasonic/activity/ChatActivity.java" + line="273" + column="16"/> </issue> <issue id="StaticFieldLeak" message="Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)" errorLine1=" private static SeekBar progressBar;" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/activity/DownloadActivity.java" line="102" - column="2"/> + column="10"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.service.DownloadServiceLifecycleSupport.SerializeTask)" + errorLine1=" private class SerializeTask extends AsyncTask<Void, Void, Void>" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/service/DownloadServiceLifecycleSupport.java" + line="361" + column="16"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.service.DownloadServiceLifecycleSupport.DeserializeTask)" + errorLine1=" private class DeserializeTask extends AsyncTask<Void, Void, Void>" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/service/DownloadServiceLifecycleSupport.java" + line="382" + column="16"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.SelectAlbumActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/activity/SelectAlbumActivity.java" + line="1314" + column="16"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.SelectArtistActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/activity/SelectArtistActivity.java" + line="345" + column="16"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.SelectGenreActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/activity/SelectGenreActivity.java" + line="179" + column="16"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.SelectPlaylistActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/activity/SelectPlaylistActivity.java" + line="376" + column="16"/> + </issue> + + <issue + id="StaticFieldLeak" + message="This AsyncTask class should be static or leaks might occur (org.moire.ultrasonic.activity.ShareActivity.GetDataTask)" + errorLine1=" private class GetDataTask extends AsyncTask<Void, Void, String[]>" + errorLine2=" ~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/activity/ShareActivity.java" + line="372" + column="16"/> </issue> <issue id="StaticFieldLeak" message="Do not place Android context classes in static fields (static reference to `ImageLoader` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)" errorLine1=" protected static ImageLoader IMAGE_LOADER;" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/activity/SubsonicTabActivity.java" line="93" - column="2"/> + column="12"/> </issue> <issue id="StaticFieldLeak" message="Do not place Android context classes in static fields (static reference to `SubsonicTabActivity` which has field `nowPlayingView` pointing to `View`); this is a memory leak (and also breaks Instant Run)" errorLine1=" private static SubsonicTabActivity instance;" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/activity/SubsonicTabActivity.java" line="95" - column="2"/> + column="10"/> </issue> <issue id="StaticFieldLeak" message="Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)" errorLine1=" private static Context context;" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + errorLine2=" ~~~~~~"> <location file="src/main/java/org/moire/ultrasonic/view/UpdateView.java" line="25" - column="2"/> - </issue> - - <issue - id="FloatMath" - message="Use `java.lang.Math#floor` instead of `android.util.FloatMath#floor()` since it is faster as of API 8" - errorLine1=" float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());" - errorLine2=" ~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java" - line="115" - column="30"/> - </issue> - - <issue - id="FloatMath" - message="Use `java.lang.Math#floor` instead of `android.util.FloatMath#floor()` since it is faster as of API 8" - errorLine1=" return (int) Math.max(0, FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale())" - errorLine2=" ~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java" - line="161" - column="29"/> - </issue> - - <issue - id="FloatMath" - message="Use `java.lang.Math#sqrt` instead of `android.util.FloatMath#sqrt()` since it is faster as of API 8" - errorLine1=" float hyp = FloatMath.sqrt(dx * dx + dy * dy);" - errorLine2=" ~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/Scroller.java" - line="374" - column="25"/> - </issue> - - <issue - id="FloatMath" - message="Use `java.lang.Math#sqrt` instead of `android.util.FloatMath#sqrt()` since it is faster as of API 8" - errorLine1=" float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY);" - errorLine2=" ~~~~~~~~~~~~~~"> - <location - file="src/main/java/net/simonvt/menudrawer/Scroller.java" - line="391" - column="26"/> + column="10"/> </issue> <issue @@ -2081,6 +1167,92 @@ column="12"/> </issue> + <issue + id="UnusedResources" + message="The resource `R.drawable.list_focused_holo` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/list_focused_holo.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_longpressed_holo` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/list_longpressed_holo.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_pressed_holo_dark` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/list_pressed_holo_dark.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_pressed_holo_light` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/list_pressed_holo_light.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_selector_background_transition_holo_dark` appears to be unused" + errorLine1="<transition xmlns:android="http://schemas.android.com/apk/res/android">" + errorLine2="^"> + <location + file="src/main/res/drawable/list_selector_background_transition_holo_dark.xml" + line="17" + column="1"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_selector_background_transition_holo_light` appears to be unused" + errorLine1="<transition xmlns:android="http://schemas.android.com/apk/res/android">" + errorLine2="^"> + <location + file="src/main/res/drawable/list_selector_background_transition_holo_light.xml" + line="17" + column="1"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_selector_disabled_holo_dark` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_selector_disabled_holo_light` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/list_selector_disabled_holo_light.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_selector_holo_dark` appears to be unused" + errorLine1="<selector xmlns:android="http://schemas.android.com/apk/res/android"" + errorLine2="^"> + <location + file="src/main/res/drawable/list_selector_holo_dark.xml" + line="17" + column="1"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.list_selector_holo_light` appears to be unused" + errorLine1="<selector xmlns:android="http://schemas.android.com/apk/res/android"" + errorLine2="^"> + <location + file="src/main/res/drawable/list_selector_holo_light.xml" + line="17" + column="1"/> + </issue> + <issue id="UnusedResources" message="The resource `R.drawable.md__list_focused_holo` appears to be unused"> @@ -2131,6 +1303,316 @@ column="1"/> </issue> + <issue + id="UnusedResources" + message="The resource `R.drawable.menu_arrow` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/menu_arrow.png"/> + <location + file="src/main/res/drawable-hdpi-v14/menu_arrow.png"/> + <location + file="src/main/res/drawable-mdpi/menu_arrow.png"/> + <location + file="src/main/res/drawable-mdpi-v14/menu_arrow.png"/> + <location + file="src/main/res/drawable-xhdpi/menu_arrow.png"/> + <location + file="src/main/res/drawable-xhdpi-v14/menu_arrow.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.progress_bg_holo_dark` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/progress_bg_holo_dark.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.progress_horizontal_holo_dark` appears to be unused" + errorLine1="<layer-list xmlns:android="http://schemas.android.com/apk/res/android">" + errorLine2="^"> + <location + file="src/main/res/drawable/progress_horizontal_holo_dark.xml" + line="17" + column="1"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.progress_primary_holo_dark` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/progress_primary_holo_dark.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.drawable.progress_secondary_holo_dark` appears to be unused"> + <location + file="src/main/res/drawable-hdpi/progress_secondary_holo_dark.9.png"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.music_service_retry` appears to be unused" + errorLine1=" <string name="music_service.retry">A network error occurred. Retrying %1$d of %2$d.</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="112" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="109" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="109" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="109" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="112" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="112" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.parser_artist_count` appears to be unused" + errorLine1=" <string name="parser.artist_count">Got %d Artists.</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="113" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="110" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="110" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="110" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="113" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="113" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.parser_not_authenticated` appears to be unused" + errorLine1=" <string name="parser.not_authenticated">Wrong username or password.</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="114" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="111" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="111" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="111" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="114" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="114" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.parser_not_authorized` appears to be unused" + errorLine1=" <string name="parser.not_authorized">Not authorized. Check user permissions in Subsonic server.</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="115" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="112" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="112" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="112" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="115" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="115" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.parser_reading_done` appears to be unused" + errorLine1=" <string name="parser.reading_done">Reading from server. Done!</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="117" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="114" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="114" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="114" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="117" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="117" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.parser_upgrade_client` appears to be unused" + errorLine1=" <string name="parser.upgrade_client">Incompatible versions. Please upgrade UltraSonic Android app.</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="118" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="115" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="115" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="115" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="118" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="118" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.string.parser_upgrade_server` appears to be unused" + errorLine1=" <string name="parser.upgrade_server">Incompatible versions. Please upgrade Subsonic server.</string>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/strings.xml" + line="119" + column="13"/> + <location + file="src/main/res/values-es/strings.xml" + line="116" + column="13"/> + <location + file="src/main/res/values-fr/strings.xml" + line="116" + column="13"/> + <location + file="src/main/res/values-hu/strings.xml" + line="116" + column="13"/> + <location + file="src/main/res/values-pt/strings.xml" + line="119" + column="13"/> + <location + file="src/main/res/values-pt-rBR/strings.xml" + line="119" + column="13"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.style.listselect` appears to be unused" + errorLine1=" <style name="listselect" parent="Widget.AppCompat.ListView">" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/styles.xml" + line="4" + column="12"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.style.listselectlight` appears to be unused" + errorLine1=" <style name="listselectlight" parent="Widget.AppCompat.ListView">" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/styles.xml" + line="8" + column="12"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.style.customprogress` appears to be unused" + errorLine1=" <style name="customprogress" parent="Widget.AppCompat.ProgressBar.Horizontal">" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/styles.xml" + line="12" + column="12"/> + </issue> + + <issue + id="UnusedResources" + message="The resource `R.style.Widget_MenuDrawer` appears to be unused" + errorLine1=" <style name="Widget.MenuDrawer">" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/res/values/styles.xml" + line="16" + column="12"/> + </issue> + <issue id="UselessParent" message="This `LinearLayout` layout or its `LinearLayout` parent is useless" @@ -2153,28 +1635,6 @@ column="33"/> </issue> - <issue - id="TypographyDashes" - message="Replace "--" with an "em dash" character (—, &#8212;) ?" - errorLine1=" <string name="util.no_time">-:--</string>" - errorLine2=" ^"> - <location - file="src/main/res/values-fr/strings.xml" - line="328" - column="33"/> - </issue> - - <issue - id="TypographyDashes" - message="Replace "--" with an "em dash" character (—, &#8212;) ?" - errorLine1=" <string name="util.no_time">-:--</string>" - errorLine2=" ^"> - <location - file="src/main/res/values-hu/strings.xml" - line="328" - column="33"/> - </issue> - <issue id="TypographyDashes" message="Replace "--" with an "em dash" character (—, &#8212;) ?" @@ -2186,28 +1646,6 @@ column="33"/> </issue> - <issue - id="TypographyDashes" - message="Replace "--" with an "em dash" character (—, &#8212;) ?" - errorLine1=" <string name="util.no_time">-:--</string>" - errorLine2=" ^"> - <location - file="src/main/res/values-pt/strings.xml" - line="331" - column="33"/> - </issue> - - <issue - id="TypographyDashes" - message="Replace "--" with an "em dash" character (—, &#8212;) ?" - errorLine1=" <string name="util.no_time">-:--</string>" - errorLine2=" ^"> - <location - file="src/main/res/values/strings.xml" - line="331" - column="33"/> - </issue> - <issue id="IconColors" message="Action Bar icons should use a single gray color (`#333333` for light themes (with 60%/30% opacity for enabled/disabled), and `#FFFFFF` with opacity 80%/30% for dark themes"> @@ -2222,28 +1660,6 @@ file="src/main/res/drawable-hdpi/ic_stat_play_light.png"/> </issue> - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-hdpi-v11/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-hdpi-v9/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - <issue id="IconColors" message="Notification icons must be entirely white"> @@ -2255,105 +1671,6 @@ column="30"/> </issue> - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-ldpi-v11/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-ldpi-v9/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-ldpi/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-mdpi-v11/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-mdpi-v9/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-mdpi/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-xhdpi-v11/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-xhdpi-v9/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - - <issue - id="IconColors" - message="Notification icons must be entirely white"> - <location - file="src/main/res/drawable-xhdpi/ic_stat_ultrasonic.png"/> - <location - file="src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java" - line="2076" - column="30"/> - </issue> - <issue id="IconDensities" message="Missing the following drawables in `drawable-hdpi`: ic_contact_picture.png, ic_menu_pin.png, md__list_focused_holo.9.png, md__list_longpressed_holo.9.png, md__list_pressed_holo_dark.9.png... (3 more)"> @@ -2402,13 +1719,6 @@ file="src/main/res/drawable-hdpi/list_pressed_holo_dark.9.png"/> </issue> - <issue - id="IconMissingDensityFolder" - message="Missing density variation folders in `src/main/res`: drawable-xxhdpi"> - <location - file="src/main/res"/> - </issue> - <issue id="GoogleAppIndexingWarning" message="App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details." @@ -2431,31 +1741,20 @@ column="14"/> </issue> - <issue - id="ViewConstructor" - message="Custom view `RotateLoadingLayout` is missing constructor used by tools: `(Context)` or `(Context,AttributeSet)` or `(Context,AttributeSet,int)`" - errorLine1="public class RotateLoadingLayout extends LoadingLayout {" - errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/internal/RotateLoadingLayout.java" - line="30" - column="14"/> - </issue> - <issue id="ClickableViewAccessibility" - message="`org/moire/ultrasonic/view/AutoRepeatButton$2#onTouch` should call `View#performClick` when a click is detected" - errorLine1=" public boolean onTouch(View v, MotionEvent event)" - errorLine2=" ~~~~~~~"> + message="Custom view ``AutoRepeatButton`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" this.setOnTouchListener(new OnTouchListener()" + errorLine2=" ^"> <location file="src/main/java/org/moire/ultrasonic/view/AutoRepeatButton.java" - line="38" - column="19"/> + line="35" + column="3"/> </issue> <issue id="ClickableViewAccessibility" - message="`org/moire/ultrasonic/activity/DownloadActivity$1#onTouch` should call `View#performClick` when a click is detected" + message="`onTouch` should call `View#performClick` when a click is detected" errorLine1=" public boolean onTouch(View view, MotionEvent me)" errorLine2=" ~~~~~~~"> <location @@ -2466,7 +1765,29 @@ <issue id="ClickableViewAccessibility" - message="`org/moire/ultrasonic/activity/DownloadActivity$15#onTouch` should call `View#performClick` when a click is detected" + message="Custom view ``ImageView`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" albumArtImageView.setOnTouchListener(touchListener);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="src/main/java/org/moire/ultrasonic/activity/DownloadActivity.java" + line="174" + column="3"/> + </issue> + + <issue + id="ClickableViewAccessibility" + message="Custom view ``VisualizerView`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" visualizerView.setOnTouchListener(new View.OnTouchListener()" + errorLine2=" ^"> + <location + file="src/main/java/org/moire/ultrasonic/activity/DownloadActivity.java" + line="483" + column="4"/> + </issue> + + <issue + id="ClickableViewAccessibility" + message="`onTouch` should call `View#performClick` when a click is detected" errorLine1=" public boolean onTouch(final View view, final MotionEvent motionEvent)" errorLine2=" ~~~~~~~"> <location @@ -2477,18 +1798,7 @@ <issue id="ClickableViewAccessibility" - message="`com/mobeta/android/dslv/DragSortController#onTouch` should call `View#performClick` when a click is detected" - errorLine1=" public boolean onTouch(View v, MotionEvent ev) {" - errorLine2=" ~~~~~~~"> - <location - file="src/main/java/com/mobeta/android/dslv/DragSortController.java" - line="238" - column="20"/> - </issue> - - <issue - id="ClickableViewAccessibility" - message="`org/moire/ultrasonic/activity/SubsonicTabActivity$SwipeDetector#onTouch` should call `View#performClick` when a click is detected" + message="`SwipeDetector#onTouch` should call `View#performClick` when a click is detected" errorLine1=" public boolean onTouch(View v, MotionEvent event)" errorLine2=" ~~~~~~~"> <location @@ -2499,7 +1809,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2510,7 +1820,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2521,7 +1831,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2532,7 +1842,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2543,7 +1853,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2554,7 +1864,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2565,7 +1875,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2576,7 +1886,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2587,7 +1897,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2598,7 +1908,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2609,7 +1919,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2620,7 +1930,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2631,7 +1941,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2642,7 +1952,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2653,7 +1963,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2664,7 +1974,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2675,7 +1985,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2686,7 +1996,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2697,7 +2007,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2708,7 +2018,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2719,7 +2029,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2730,7 +2040,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2741,7 +2051,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2752,7 +2062,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2763,7 +2073,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2774,7 +2084,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2785,7 +2095,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2796,7 +2106,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2807,7 +2117,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2818,7 +2128,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2829,7 +2139,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView a:id="@+id/help_back"" errorLine2=" ^"> <location @@ -2840,7 +2150,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView a:id="@+id/help_stop"" errorLine2=" ^"> <location @@ -2851,7 +2161,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView a:id="@+id/help_forward"" errorLine2=" ^"> <location @@ -2862,7 +2172,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView a:layout_width="wrap_content" a:layout_height="wrap_content"" errorLine2=" ^"> <location @@ -2873,7 +2183,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1="<ImageView" errorLine2="^"> <location @@ -2884,7 +2194,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2895,7 +2205,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2906,7 +2216,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2917,7 +2227,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2928,7 +2238,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2939,7 +2249,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2950,7 +2260,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2961,7 +2271,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2972,7 +2282,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -2983,7 +2293,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -2994,7 +2304,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -3005,7 +2315,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -3016,7 +2326,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -3027,7 +2337,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageButton" errorLine2=" ^"> <location @@ -3038,7 +2348,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -3049,7 +2359,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -3060,29 +2370,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" - errorLine1=" <ImageView" - errorLine2=" ^"> - <location - file="src/main/res/layout/pull_to_refresh_header_horizontal.xml" - line="13" - column="9"/> - </issue> - - <issue - id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" - errorLine1=" <ImageView" - errorLine2=" ^"> - <location - file="src/main/res/layout/pull_to_refresh_header_vertical.xml" - line="18" - column="13"/> - </issue> - - <issue - id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -3093,7 +2381,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -3104,7 +2392,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -3115,7 +2403,7 @@ <issue id="ContentDescription" - message="[Accessibility] Missing `contentDescription` attribute on image" + message="Missing `contentDescription` attribute on image" errorLine1=" <ImageView" errorLine2=" ^"> <location @@ -3148,7 +2436,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Title", should use `@string` resource" + message="Hardcoded string "Title", should use `@string` resource" errorLine1=" a:text="Title"" errorLine2=" ~~~~~~~~~~~~~~"> <location @@ -3159,7 +2447,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Artist", should use `@string` resource" + message="Hardcoded string "Artist", should use `@string` resource" errorLine1=" a:text="Artist"" errorLine2=" ~~~~~~~~~~~~~~~"> <location @@ -3170,7 +2458,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Title", should use `@string` resource" + message="Hardcoded string "Title", should use `@string` resource" errorLine1=" a:text="Title"" errorLine2=" ~~~~~~~~~~~~~~"> <location @@ -3181,7 +2469,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Artist", should use `@string` resource" + message="Hardcoded string "Artist", should use `@string` resource" errorLine1=" a:text="Artist"" errorLine2=" ~~~~~~~~~~~~~~~"> <location @@ -3192,7 +2480,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Album", should use `@string` resource" + message="Hardcoded string "Album", should use `@string` resource" errorLine1=" a:text="Album"" errorLine2=" ~~~~~~~~~~~~~~"> <location @@ -3203,7 +2491,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Title", should use `@string` resource" + message="Hardcoded string "Title", should use `@string` resource" errorLine1=" a:text="Title"" errorLine2=" ~~~~~~~~~~~~~~"> <location @@ -3214,7 +2502,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Artist", should use `@string` resource" + message="Hardcoded string "Artist", should use `@string` resource" errorLine1=" a:text="Artist"" errorLine2=" ~~~~~~~~~~~~~~~"> <location @@ -3225,7 +2513,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Title", should use `@string` resource" + message="Hardcoded string "Title", should use `@string` resource" errorLine1=" a:text="Title"" errorLine2=" ~~~~~~~~~~~~~~"> <location @@ -3236,7 +2524,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Artist", should use `@string` resource" + message="Hardcoded string "Artist", should use `@string` resource" errorLine1=" a:text="Artist"" errorLine2=" ~~~~~~~~~~~~~~~"> <location @@ -3247,7 +2535,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "0 / 0", should use `@string` resource" + message="Hardcoded string "0 / 0", should use `@string` resource" errorLine1=" a:text="0 / 0"" errorLine2=" ~~~~~~~~~~~~~~"> <location @@ -3258,9 +2546,8 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "0 dB", should use `@string` resource" - errorLine1=" a:text="0 dB" -" + message="Hardcoded string "0 dB", should use `@string` resource" + errorLine1=" a:text="0 dB" " errorLine2=" ~~~~~~~~~~~~~"> <location file="src/main/res/layout/equalizer_bar.xml" @@ -3270,7 +2557,7 @@ <issue id="HardcodedText" - message="[I18N] Hardcoded string "Share", should use `@string` resource" + message="Hardcoded string "Share", should use `@string` resource" errorLine1=" a:title="Share"/>" errorLine2=" ~~~~~~~~~~~~~~~"> <location @@ -3281,7 +2568,7 @@ <issue id="RtlCompat" - message="To support older versions than API 17 (project specifies 14) you should *also* add `a:layout_toRightOf="@id/chat_avatar"`" + message="To support older versions than API 17 (project specifies 14) you should **also** add `a:layout_toRightOf="@id/chat_avatar"`" errorLine1=" a:layout_toEndOf="@id/chat_avatar"" errorLine2=" ~~~~~~~~~~~~~~~~"> <location @@ -3292,7 +2579,7 @@ <issue id="RtlCompat" - message="To support older versions than API 17 (project specifies 14) you should *also* add `a:layout_alignParentRight="false"`" + message="To support older versions than API 17 (project specifies 14) you should **also** add `a:layout_alignParentRight="false"`" errorLine1=" a:layout_alignParentEnd="false"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> <location @@ -3303,7 +2590,7 @@ <issue id="RtlCompat" - message="To support older versions than API 17 (project specifies 14) you should *also* add `a:layout_toLeftOf="@id/chat_avatar"`" + message="To support older versions than API 17 (project specifies 14) you should **also** add `a:layout_toLeftOf="@id/chat_avatar"`" errorLine1=" a:layout_toStartOf="@id/chat_avatar"" errorLine2=" ~~~~~~~~~~~~~~~~~~"> <location @@ -3314,7 +2601,7 @@ <issue id="RtlCompat" - message="To support older versions than API 17 (project specifies 14) you should *also* add `a:layout_alignParentRight="true"`" + message="To support older versions than API 17 (project specifies 14) you should **also** add `a:layout_alignParentRight="true"`" errorLine1=" a:layout_alignParentEnd="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> <location @@ -3325,7 +2612,7 @@ <issue id="RtlCompat" - message="To support older versions than API 17 (project specifies 14) you should *also* add `a:layout_toLeftOf="@id/chat_avatar"`" + message="To support older versions than API 17 (project specifies 14) you should **also** add `a:layout_toLeftOf="@id/chat_avatar"`" errorLine1=" a:layout_toStartOf="@id/chat_avatar"/>" errorLine2=" ~~~~~~~~~~~~~~~~~~"> <location @@ -3336,7 +2623,7 @@ <issue id="RtlCompat" - message="To support older versions than API 17 (project specifies 14) you should *also* add `android:layout_alignParentRight="false"`" + message="To support older versions than API 17 (project specifies 14) you should **also** add `android:layout_alignParentRight="false"`" errorLine1=" android:layout_alignParentEnd="false"/>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location @@ -3675,50 +2962,6 @@ column="9"/> </issue> - <issue - id="RtlHardcoded" - message="Use "`Gravity.START`" instead of "`Gravity.LEFT`" to ensure correct behavior in right-to-left locales" - errorLine1=" lp.gravity = scrollDirection == Orientation.VERTICAL ? Gravity.TOP : Gravity.LEFT;" - errorLine2=" ~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/internal/LoadingLayout.java" - line="92" - column="82"/> - </issue> - - <issue - id="RtlHardcoded" - message="Use "`Gravity.END`" instead of "`Gravity.RIGHT`" to ensure correct behavior in right-to-left locales" - errorLine1=" lp.gravity = scrollDirection == Orientation.VERTICAL ? Gravity.BOTTOM : Gravity.RIGHT;" - errorLine2=" ~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/internal/LoadingLayout.java" - line="102" - column="85"/> - </issue> - - <issue - id="RtlHardcoded" - message="Use "`Gravity.END`" instead of "`Gravity.RIGHT`" to ensure correct behavior in right-to-left locales" - errorLine1=" params.gravity = Gravity.TOP | Gravity.RIGHT;" - errorLine2=" ~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.java" - line="344" - column="43"/> - </issue> - - <issue - id="RtlHardcoded" - message="Use "`Gravity.END`" instead of "`Gravity.RIGHT`" to ensure correct behavior in right-to-left locales" - errorLine1=" params.gravity = Gravity.BOTTOM | Gravity.RIGHT;" - errorLine2=" ~~~~~"> - <location - file="src/main/java/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.java" - line="359" - column="46"/> - </issue> - <issue id="RtlHardcoded" message="Use "`start`" instead of "`left`" to ensure correct behavior in right-to-left locales" @@ -4027,17 +3270,6 @@ column="24"/> </issue> - <issue - id="RtlHardcoded" - message="Use "`start`" instead of "`left`" to ensure correct behavior in right-to-left locales" - errorLine1=" a:gravity="left"" - errorLine2=" ~~~~"> - <location - file="src/main/res/layout-port/download.xml" - line="18" - column="24"/> - </issue> - <issue id="RtlHardcoded" message="Consider adding `a:layout_alignParentStart="true"` to better support right-to-left layouts" @@ -4151,8 +3383,7 @@ <issue id="RtlHardcoded" message="Consider adding `a:layout_alignParentStart="true"` to better support right-to-left layouts" - errorLine1=" a:layout_alignParentLeft="true" -" + errorLine1=" a:layout_alignParentLeft="true" " errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/res/layout/equalizer_bar.xml" @@ -4163,8 +3394,7 @@ <issue id="RtlHardcoded" message="Use "`end`" instead of "`right`" to ensure correct behavior in right-to-left locales" - errorLine1=" a:gravity="right" -" + errorLine1=" a:gravity="right" " errorLine2=" ~~~~~"> <location file="src/main/res/layout/equalizer_bar.xml" @@ -4175,8 +3405,7 @@ <issue id="RtlHardcoded" message="Consider adding `a:layout_alignParentEnd="true"` to better support right-to-left layouts" - errorLine1=" a:layout_alignParentRight="true" -" + errorLine1=" a:layout_alignParentRight="true" " errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/res/layout/equalizer_bar.xml" @@ -4187,8 +3416,7 @@ <issue id="RtlHardcoded" message="Consider adding `a:layout_toEndOf="@+id/equalizer.frequency"` to better support right-to-left layouts" - errorLine1=" a:layout_toRightOf="@+id/equalizer.frequency" -" + errorLine1=" a:layout_toRightOf="@+id/equalizer.frequency" " errorLine2=" ~~~~~~~~~~~~~~~~~~"> <location file="src/main/res/layout/equalizer_bar.xml" @@ -4507,8 +3735,7 @@ <issue id="RtlHardcoded" message="Use "`start`" instead of "`left`" to ensure correct behavior in right-to-left locales" - errorLine1=" android:gravity="left|center_vertical" -" + errorLine1=" android:gravity="left|center_vertical" " errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/res/layout/playlist_list_item.xml" @@ -4516,17 +3743,6 @@ column="20"/> </issue> - <issue - id="RtlHardcoded" - message="Use "`start`" instead of "`left`" to ensure correct behavior in right-to-left locales" - errorLine1=" android:layout_gravity="left|center_vertical" >" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location - file="src/main/res/layout/pull_to_refresh_header_vertical.xml" - line="16" - column="37"/> - </issue> - <issue id="RtlHardcoded" message="Consider adding `a:drawableStart="?attr/search"` to better support right-to-left layouts" diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java b/ultrasonic/src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java index e02f6e16..587ad7d4 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/service/DownloadServiceImpl.java @@ -2071,6 +2071,7 @@ public class DownloadServiceImpl extends Service implements DownloadService } } + @SuppressWarnings("IconColors") private Notification buildForegroundNotification() { NotificationCompat.Builder builder = new NotificationCompat.Builder(this); builder.setSmallIcon(R.drawable.ic_stat_ultrasonic); diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/service/MusicService.java b/ultrasonic/src/main/java/org/moire/ultrasonic/service/MusicService.java index 65624b8f..17d3b42d 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/service/MusicService.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/service/MusicService.java @@ -21,7 +21,6 @@ package org.moire.ultrasonic.service; import android.content.Context; import android.graphics.Bitmap; -import org.apache.http.HttpResponse; import org.moire.ultrasonic.domain.Bookmark; import org.moire.ultrasonic.domain.ChatMessage; import org.moire.ultrasonic.domain.Genre; diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/util/StreamProxy.java b/ultrasonic/src/main/java/org/moire/ultrasonic/util/StreamProxy.java index 848731f1..5e8c5d4a 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/util/StreamProxy.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/util/StreamProxy.java @@ -6,9 +6,6 @@ import org.moire.ultrasonic.domain.MusicDirectory; import org.moire.ultrasonic.service.DownloadFile; import org.moire.ultrasonic.service.DownloadService; -import org.apache.http.HttpRequest; -import org.apache.http.message.BasicHttpRequest; - import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.File; @@ -108,81 +105,66 @@ public class StreamProxy implements Runnable Log.i(TAG, "Proxy interrupted. Shutting down."); } - private class StreamToMediaPlayerTask implements Runnable - { + private class StreamToMediaPlayerTask implements Runnable { + String localPath; + Socket client; + int cbSkip; - String localPath; - Socket client; - int cbSkip; + StreamToMediaPlayerTask(Socket client) { + this.client = client; + } - public StreamToMediaPlayerTask(Socket client) - { - this.client = client; - } + private String readRequest() { + InputStream is; + String firstLine; + try { + is = client.getInputStream(); + BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192); + firstLine = reader.readLine(); + } catch (IOException e) { + Log.e(TAG, "Error parsing request", e); + return null; + } - private HttpRequest readRequest() - { - HttpRequest request; - InputStream is; - String firstLine; - try - { - is = client.getInputStream(); - BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192); - firstLine = reader.readLine(); - } - catch (IOException e) - { - Log.e(TAG, "Error parsing request", e); - return null; - } + if (firstLine == null) { + Log.i(TAG, "Proxy client closed connection without a request."); + return null; + } - if (firstLine == null) - { - Log.i(TAG, "Proxy client closed connection without a request."); - return null; - } + StringTokenizer st = new StringTokenizer(firstLine); + st.nextToken(); // method + String uri = st.nextToken(); + String realUri = uri.substring(1); + Log.i(TAG, realUri); - StringTokenizer st = new StringTokenizer(firstLine); - String method = st.nextToken(); - String uri = st.nextToken(); - String realUri = uri.substring(1); - Log.i(TAG, realUri); - request = new BasicHttpRequest(method, realUri); - return request; - } + return realUri; + } - public boolean processRequest() - { - HttpRequest request = readRequest(); - if (request == null) - { - return false; - } + boolean processRequest() { + final String uri = readRequest(); + if (uri == null || uri.isEmpty()) { + return false; + } - // Read HTTP headers - Log.i(TAG, "Processing request"); + // Read HTTP headers + Log.i(TAG, "Processing request: " + uri); - try - { - localPath = URLDecoder.decode(request.getRequestLine().getUri(), Constants.UTF_8); - } - catch (UnsupportedEncodingException e) - { - Log.e(TAG, "Unsupported encoding", e); - return false; - } + try { + localPath = URLDecoder.decode(uri, Constants.UTF_8); + } catch (UnsupportedEncodingException e) { + Log.e(TAG, "Unsupported encoding", e); + return false; + } - Log.i(TAG, String.format("Processing request for file %s", localPath)); - File file = new File(localPath); - if (!file.exists()) - { - Log.e(TAG, String.format("File %s does not exist", localPath)); - return false; - } + Log.i(TAG, String.format("Processing request for file %s", localPath)); + File file = new File(localPath); + if (!file.exists()) { + Log.e(TAG, String.format("File %s does not exist", localPath)); + return false; + } - return true; - } + return true; + } @Override public void run() diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java b/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java index 4c6c11c9..f9994f3b 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java @@ -65,8 +65,6 @@ import org.moire.ultrasonic.receiver.MediaButtonIntentReceiver; import org.moire.ultrasonic.service.DownloadFile; import org.moire.ultrasonic.service.DownloadService; import org.moire.ultrasonic.service.DownloadServiceImpl; - -import org.apache.http.HttpEntity; import org.moire.ultrasonic.service.MusicServiceFactory; import java.io.ByteArrayOutputStream; @@ -405,15 +403,6 @@ public class Util extends DownloadActivity return context.getSharedPreferences(Constants.PREFERENCES_FILE_NAME, 0); } - public static String getContentType(HttpEntity entity) - { - if (entity == null || entity.getContentType() == null) - { - return null; - } - return entity.getContentType().getValue(); - } - public static int getRemainingTrialDays(Context context) { SharedPreferences preferences = getPreferences(context); diff --git a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/data/APIMusicFolderConverter.kt b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/data/APIMusicFolderConverter.kt index 431f139c..f7c5ebb6 100644 --- a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/data/APIMusicFolderConverter.kt +++ b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/data/APIMusicFolderConverter.kt @@ -8,5 +8,5 @@ import org.moire.ultrasonic.api.subsonic.models.MusicFolder as APIMusicFolder fun APIMusicFolder.toDomainEntity(): MusicFolder = MusicFolder(this.id, this.name) -fun List<APIMusicFolder>.toDomainEntityList(): List<MusicFolder> - = this.map { it.toDomainEntity() } +fun List<APIMusicFolder>.toDomainEntityList(): List<MusicFolder> = + this.map { it.toDomainEntity() } diff --git a/ultrasonic/src/main/res/drawable-hdpi-v11/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-hdpi-v11/ic_stat_ultrasonic.png deleted file mode 100644 index 48ffc78e..00000000 Binary files a/ultrasonic/src/main/res/drawable-hdpi-v11/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-hdpi-v9/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-hdpi-v9/ic_stat_ultrasonic.png deleted file mode 100644 index 87a40aab..00000000 Binary files a/ultrasonic/src/main/res/drawable-hdpi-v9/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-hdpi/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-hdpi/ic_stat_ultrasonic.png index 42d70a45..48ffc78e 100644 Binary files a/ultrasonic/src/main/res/drawable-hdpi/ic_stat_ultrasonic.png and b/ultrasonic/src/main/res/drawable-hdpi/ic_stat_ultrasonic.png differ diff --git a/ultrasonic/src/main/res/drawable-ldpi-v11/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-ldpi-v11/ic_stat_ultrasonic.png deleted file mode 100644 index 4ae0a39f..00000000 Binary files a/ultrasonic/src/main/res/drawable-ldpi-v11/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-ldpi-v9/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-ldpi-v9/ic_stat_ultrasonic.png deleted file mode 100644 index a5dcc68c..00000000 Binary files a/ultrasonic/src/main/res/drawable-ldpi-v9/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-ldpi/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-ldpi/ic_stat_ultrasonic.png index 034c5dd9..4ae0a39f 100644 Binary files a/ultrasonic/src/main/res/drawable-ldpi/ic_stat_ultrasonic.png and b/ultrasonic/src/main/res/drawable-ldpi/ic_stat_ultrasonic.png differ diff --git a/ultrasonic/src/main/res/drawable-mdpi-v11/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-mdpi-v11/ic_stat_ultrasonic.png deleted file mode 100644 index aa3e66b7..00000000 Binary files a/ultrasonic/src/main/res/drawable-mdpi-v11/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-mdpi-v9/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-mdpi-v9/ic_stat_ultrasonic.png deleted file mode 100644 index d540bec3..00000000 Binary files a/ultrasonic/src/main/res/drawable-mdpi-v9/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-mdpi/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-mdpi/ic_stat_ultrasonic.png index c5cbeefd..aa3e66b7 100644 Binary files a/ultrasonic/src/main/res/drawable-mdpi/ic_stat_ultrasonic.png and b/ultrasonic/src/main/res/drawable-mdpi/ic_stat_ultrasonic.png differ diff --git a/ultrasonic/src/main/res/drawable-xhdpi-v11/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-xhdpi-v11/ic_stat_ultrasonic.png deleted file mode 100644 index 039dc149..00000000 Binary files a/ultrasonic/src/main/res/drawable-xhdpi-v11/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-xhdpi-v9/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-xhdpi-v9/ic_stat_ultrasonic.png deleted file mode 100644 index 256e3b9d..00000000 Binary files a/ultrasonic/src/main/res/drawable-xhdpi-v9/ic_stat_ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/res/drawable-xhdpi/ic_stat_ultrasonic.png b/ultrasonic/src/main/res/drawable-xhdpi/ic_stat_ultrasonic.png index 894f5da0..039dc149 100644 Binary files a/ultrasonic/src/main/res/drawable-xhdpi/ic_stat_ultrasonic.png and b/ultrasonic/src/main/res/drawable-xhdpi/ic_stat_ultrasonic.png differ diff --git a/ultrasonic/src/main/res/layout-port/download.xml b/ultrasonic/src/main/res/layout-port/download.xml index b6241b83..49b442de 100644 --- a/ultrasonic/src/main/res/layout-port/download.xml +++ b/ultrasonic/src/main/res/layout-port/download.xml @@ -15,7 +15,7 @@ a:layout_width="fill_parent" a:layout_height="fill_parent" a:layout_weight="1" - a:gravity="left" + a:gravity="start" a:orientation="vertical" > <ImageView diff --git a/ultrasonic/src/main/res/values-fr/strings.xml b/ultrasonic/src/main/res/values-fr/strings.xml index f9255200..698ba92d 100644 --- a/ultrasonic/src/main/res/values-fr/strings.xml +++ b/ultrasonic/src/main/res/values-fr/strings.xml @@ -325,7 +325,7 @@ <string name="util.bytes_format.gigabyte">0.00 Go</string> <string name="util.bytes_format.kilobyte">0 Ko</string> <string name="util.bytes_format.megabyte">0.00 Mo</string> - <string name="util.no_time">-:--</string> + <string name="util.no_time">—:——</string> <string name="util.zero_time">0:00</string> <string name="video.get_mx_player_text">MX Player n\'est pas installé. Recevez gratuitement sur Play Store, ou modifier les paramètres vidéo.</string> <string name="video.get_mx_player_button">Obtenez MX Player</string> diff --git a/ultrasonic/src/main/res/values-pt/strings.xml b/ultrasonic/src/main/res/values-pt/strings.xml index 5ce59f3a..64d0035c 100644 --- a/ultrasonic/src/main/res/values-pt/strings.xml +++ b/ultrasonic/src/main/res/values-pt/strings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<resources> +<resources xmlns:tools="http://schemas.android.com/tools"> <string name="background_task.loading">Carregando…</string> <string name="background_task.network_error">Ocorreu um erro de rede. Verifique o endereço do servidor ou tente mais tarde.</string> @@ -328,7 +328,7 @@ <string name="util.bytes_format.gigabyte">0.00 GB</string> <string name="util.bytes_format.kilobyte">0 KB</string> <string name="util.bytes_format.megabyte">0.00 MB</string> - <string name="util.no_time">-:--</string> + <string name="util.no_time">—:——</string> <string name="util.zero_time">0:00</string> <string name="video.get_mx_player_text">O player MX não está instalado. Descarregue da graça pela Play Store ou modifique as configurações de vídeo.</string> <string name="video.get_mx_player_button">Descarregar Player MX</string> @@ -393,33 +393,33 @@ <string name="albumArt">albumArt</string> <string name="common_multiple_years">Múltiplos Anos</string> - <plurals name="select_album_n_songs"> + <plurals name="select_album_n_songs" tools:ignore="UnusedQuantity"> <item quantity="zero">Nenhuma música</item> - <item quantity="one">1 música</item> + <item quantity="one">%d música</item> <item quantity="other">%d músicas</item> </plurals> <plurals name="select_album_n_songs_pinned"> - <item quantity="one">1 música selecionada para ser fixada.</item> + <item quantity="one">%d música selecionada para ser fixada.</item> <item quantity="other">%d músicas selecionadas para serem fixadas.</item> </plurals> <plurals name="select_album_n_songs_downloaded"> - <item quantity="one">1 música selecionada para descarregar.</item> + <item quantity="one">%d música selecionada para descarregar.</item> <item quantity="other">%d músicas selecionadas para serem descarregadas.</item> </plurals> <plurals name="select_album_n_songs_unpinned"> - <item quantity="one">1 música selecionada para ser desafixada.</item> + <item quantity="one">%d música selecionada para ser desafixada.</item> <item quantity="other">%d músicas selecionadas para serem desfixadas.</item> </plurals> <plurals name="select_album_n_songs_added"> - <item quantity="one">1 música adicionada ao fim da fila.</item> + <item quantity="one">%d música adicionada ao fim da fila.</item> <item quantity="other">%d músicas adicionadas ao fim da fila.</item> </plurals> <plurals name="select_album_n_songs_play_next"> - <item quantity="one">1 música inserida após a atual.</item> + <item quantity="one">%d música inserida após a atual.</item> <item quantity="other">%d músicas inseridas após a atual.</item> </plurals> <plurals name="select_album_donate_dialog_n_trial_days_left"> - <item quantity="one">Resta 1 dia para o fim do período de teste</item> + <item quantity="one">Resta %d dia para o fim do período de teste</item> <item quantity="other">Restam %d dias para o fim do período de teste</item> </plurals> diff --git a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIAlbumConverterTest.kt b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIAlbumConverterTest.kt index becc7bc8..c75aba42 100644 --- a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIAlbumConverterTest.kt +++ b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIAlbumConverterTest.kt @@ -15,9 +15,9 @@ import java.util.Calendar class APIAlbumConverterTest { @Test fun `Should convert Album to domain entity`() { - val entity = Album(id = "387", name = "some-name", coverArt = "asdas", artist = "some-artist", - artistId = "390", songCount = 12, duration = 841, created = Calendar.getInstance(), - year = 2017, genre = "some-genre") + val entity = Album(id = "387", name = "some-name", coverArt = "asdas", + artist = "some-artist", artistId = "390", songCount = 12, duration = 841, + created = Calendar.getInstance(), year = 2017, genre = "some-genre") val convertedEntity = entity.toDomainEntity() diff --git a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIArtistConverterTest.kt b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIArtistConverterTest.kt index 0642c9fc..ec1928bf 100644 --- a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIArtistConverterTest.kt +++ b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIArtistConverterTest.kt @@ -27,7 +27,8 @@ class APIArtistConverterTest { @Test fun `Should convert Artist entity to domain MusicDirectory entity`() { - val entity = Artist(id = "101", name = "artist-name", coverArt = "some-art", albumCount = 10, + val entity = Artist(id = "101", name = "artist-name", coverArt = "some-art", + albumCount = 10, albumsList = listOf(Album(id = "562", name = "some-name", coverArt = "zzz", artist = "artist-name", artistId = "256", songCount = 10, duration = 345, created = Calendar.getInstance(), year = 2011, genre = "Math Rock"))) diff --git a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIIndexesConverterTest.kt b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIIndexesConverterTest.kt index 6ea2b812..2778b926 100644 --- a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIIndexesConverterTest.kt +++ b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIIndexesConverterTest.kt @@ -16,8 +16,8 @@ class APIIndexesConverterTest { @Test fun `Should convert Indexes entity`() { val artistsA = listOf( - Artist(id ="4", name = "AC/DC"), - Artist(id ="45", name = "ABBA")) + Artist(id = "4", name = "AC/DC"), + Artist(id = "45", name = "ABBA")) val artistsT = listOf( Artist(id = "10", name = "Taproot"), Artist(id = "12", name = "Teebee")) diff --git a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIMusicDirectoryConverterTest.kt b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIMusicDirectoryConverterTest.kt index 064bf539..4d8cdd73 100644 --- a/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIMusicDirectoryConverterTest.kt +++ b/ultrasonic/src/test/kotlin/org/moire/ultrasonic/data/APIMusicDirectoryConverterTest.kt @@ -37,7 +37,8 @@ class APIMusicDirectoryConverterTest { transcodedContentType = "some-transcoded-content-type", transcodedSuffix = "some-transcoded-suffix", duration = 11, bitRate = 256, path = "some-path", isDir = true, isVideo = true, playCount = 323, discNumber = 2, - created = Calendar.getInstance(), type = "some-type", starred = Calendar.getInstance()) + created = Calendar.getInstance(), type = "some-type", + starred = Calendar.getInstance()) val convertedEntity = entity.toDomainEntity()