Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
izderadicka committed Jan 31, 2021
1 parent 78b899d commit acb5402
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 24 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ android:
- tools
- platform-tools
- tools
- build-tools-27.0.3
- android-28
- android-24
- extra-google-google_play_services
- sys-img-armeabi-v7a-android-24
before_install:
- yes | sdkmanager "platforms;android-28"
- yes | sdkmanager "build-tools;28.0.3"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand All @@ -34,7 +29,6 @@ deploy:
provider: releases
api_key:
secure: f8yw+q4hWcKg4LwUFZNcAJ110HqpFIPipEoKPCvfB8Q+Ht97boYeJsgP+aIllKq9rssRvVrMscqCj9pcx6bdCRV5aFWR3ek4NaE+2gfQ4Qi8RHR85sZ+qcH9bzO0GRnf8NjX49kq3F6tzn+cc8HWzdUESwQxG0E/svw7dSTolhVqdeDE8/S89mDoGVcu0GxuFMvYbOiu8H0yyXcyimkrQsdWuZQxOKhlKJsDI6dJ3wPmupRDyqRt7m7Wjyvt9ismRI4g9y2EGzEzG207mRVvjs0Zea8lopee8LpKraBAUjQ/EVtrXWfzyS3CczHNztZViNMZXvhcpzuJsOaHYM8YdjN7zESesDoHDKXWczy+je8kU1N9QWhjJ7UqJolhnHo65w4LBnO6DWKrrQjvZ2bSXMhM6UPXgsoLSImMRB8/fDu2kcBtIkGGfXS/5BTLSq8/st1hggTqoCrfAnupMBshSSd6DFgmv/HM7L7/S51b/1Umy2C5hLTc72nIV5uIMxe4/yCB5C/oPmluK25rPcsKA8TXreAZRkyhsoILyp04H0JXGgBu2U6RW4ZNlQeA8MXOngLomQpbXZB3PsezymxMbUF4KVmNWm3F3+dNYTFcCpgQTQ6NatHK6/RVm6u7QO+kBrZKWXYOFq0oC74bjrq34JlRVXlAw8HRSthKRIyW1dc=
file: app/build/outputs/apk/debug/app-debug.apk
file: app/build/outputs/apk/release/app-release.apk
skip_cleanup: true
on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ class BookmarkTest: ProviderTestCase2<BookmarksProvider>(BookmarksProvider::clas

val c = ctx.contentResolver.query(BookmarkContract.BookmarkEntry.CONTENT_URI,
null,null,null,null)
Assert.assertEquals("Should have 1 rows", 1, c.count)
Assert.assertEquals("Should have 1 rows", 1, c!!.count)
c.close()

val res = ctx.contentResolver.delete(uri!!,null,null)

val c2 = ctx.contentResolver.query(BookmarkContract.BookmarkEntry.CONTENT_URI,
null,null,null,null)
Assert.assertEquals("Should have 0 rows after delete", 0, c2.count)
Assert.assertEquals("Should have 0 rows after delete", 0, c2!!.count)
c2.close()

}
Expand All @@ -77,7 +77,7 @@ class BookmarkTest: ProviderTestCase2<BookmarksProvider>(BookmarksProvider::clas

val c = ctx.contentResolver.query(BookmarkContract.BookmarkEntry.CONTENT_URI,
null,null,null,null)
Assert.assertEquals("Should have 1 rows", 1, c.count)
Assert.assertEquals("Should have 1 rows", 1, c!!.count)
c.close()


Expand All @@ -103,7 +103,7 @@ class BookmarkTest: ProviderTestCase2<BookmarksProvider>(BookmarksProvider::clas
ctx.contentResolver.insert(BookmarkContract.BookmarkEntry.CONTENT_URI, v2)

val c = ctx.contentResolver.query(BookmarkContract.BookmarkEntry.CONTENT_URI,null,null,null,null)
Assert.assertEquals(1, c.count)
Assert.assertEquals(1, c!!.count)
Assert.assertTrue(c.moveToNext())
val ts = c?.run{ getLong(getColumnIndex(BookmarkContract.BookmarkEntry.COLUMN_TIMESTAMP))}
Assert.assertEquals(2L,ts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RecentTest: ProviderTestCase2<BookmarksProvider>(BookmarksProvider::class.
}

val c = ctx.contentResolver.query(RecentContract.RecentEntry.CONTENT_URI, null,null,null,null)
assertEquals("Should have $MAX_RECENT_RECORDS rows", MAX_RECENT_RECORDS, c.count)
assertEquals("Should have $MAX_RECENT_RECORDS rows", MAX_RECENT_RECORDS, c!!.count)
c.close()
}

Expand All @@ -97,7 +97,7 @@ class RecentTest: ProviderTestCase2<BookmarksProvider>(BookmarksProvider::class.
}

val c = ctx.contentResolver.query(RecentContract.RecentEntry.CONTENT_URI, null,null,null,null)
assertEquals("Should have 10 rows", if (same) 1 else 10, c.count)
assertEquals("Should have 10 rows", if (same) 1 else 10, c!!.count)
c.close()

}
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/file_item_inner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@
app:layout_constraintStart_toEndOf="@+id/extesionView"
app:layout_constraintTop_toBottomOf="@+id/folderItemName"
app:srcCompat="@drawable/ic_pulse"
android:tint="@color/secondary_file_details"
/>
app:tint="@color/secondary_file_details" />

<ImageView
android:id="@+id/cachedIcon"
Expand All @@ -94,5 +93,5 @@
app:layout_constraintStart_toEndOf="@+id/transcodedIcon"
app:layout_constraintTop_toBottomOf="@+id/folderItemName"
app:srcCompat="@drawable/ic_offline_pin"
android:tint="@color/secondary_file_details"/>
app:tint="@color/secondary_file_details" />
</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="4dp"
android:tint="@color/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_play_white" />
app:srcCompat="@drawable/ic_play_white"
app:tint="@color/colorAccent" />

<ImageView
android:id="@+id/skipPreviousButton"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
android:layout_marginTop="8dp"
android:contentDescription="@string/clock_image"
android:src="@drawable/ic_menu_recent"
android:tint="#ffffff"
app:layout_constraintBottom_toBottomOf="@+id/view2"
app:layout_constraintStart_toStartOf="@+id/view2"
app:layout_constraintTop_toTopOf="@+id/view2" />
app:layout_constraintTop_toTopOf="@+id/view2"
app:tint="#ffffff" />

<TextView
android:id="@+id/totalTime"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/sleep_overlay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_marginTop="12dp"
android:tint="@color/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_timer_cancel" />
app:srcCompat="@drawable/ic_timer_cancel"
app:tint="@color/colorAccent" />

<ImageView
android:id="@+id/extendSleepBtn"
Expand All @@ -31,11 +31,11 @@

android:layout_marginEnd="8dp"
android:layout_marginBottom="12dp"
android:tint="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/ic_timer_extend" />
app:srcCompat="@drawable/ic_timer_extend"
app:tint="@color/colorAccent" />


<TextView
Expand Down
2 changes: 1 addition & 1 deletion app/src/test/java/eu/zderadicka/audioserve/CacheTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ open class BaseCacheTest {
}

val testFile:File by lazy {
val srcFileUrl = javaClass.classLoader.getResource("test.mp3")
val srcFileUrl = javaClass.classLoader!!.getResource("test.mp3")
File(srcFileUrl.toURI())
}

Expand Down

0 comments on commit acb5402

Please sign in to comment.