playback: refine android 17 cover fix
This commit is contained in:
+1
-1
@@ -127,7 +127,7 @@ dependencies {
|
|||||||
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
implementation "androidx.media:media:1.7.1"
|
implementation "androidx.media:media:1.8.0"
|
||||||
|
|
||||||
// Android Auto
|
// Android Auto
|
||||||
implementation "androidx.car.app:app:1.7.0"
|
implementation "androidx.car.app:app:1.7.0"
|
||||||
|
|||||||
@@ -100,8 +100,6 @@ private constructor(
|
|||||||
val notification: ForegroundServiceNotification
|
val notification: ForegroundServiceNotification
|
||||||
get() = _notification
|
get() = _notification
|
||||||
|
|
||||||
private val systemCoverResizing = context.getDimenPixels(R.dimen.system_cover_resizing)
|
|
||||||
|
|
||||||
fun attach() {
|
fun attach() {
|
||||||
playbackManager.addListener(this)
|
playbackManager.addListener(this)
|
||||||
imageSettings.registerListener(this)
|
imageSettings.registerListener(this)
|
||||||
@@ -287,7 +285,7 @@ private constructor(
|
|||||||
// downsampling to 320x320dp, as disabling hardware bitmaps trashes performance.
|
// downsampling to 320x320dp, as disabling hardware bitmaps trashes performance.
|
||||||
// If I remember correctly this is somehow still higher quality than the URI
|
// If I remember correctly this is somehow still higher quality than the URI
|
||||||
// loading.
|
// loading.
|
||||||
builder.size(systemCoverResizing)
|
builder.size(MediaSessionCompat.getBitmapDimensionLimit())
|
||||||
|
|
||||||
override fun onCompleted(bitmap: Bitmap?) {
|
override fun onCompleted(bitmap: Bitmap?) {
|
||||||
L.d("Bitmap loaded, applying media session and posting notification")
|
L.d("Bitmap loaded, applying media session and posting notification")
|
||||||
|
|||||||
@@ -53,6 +53,4 @@
|
|||||||
|
|
||||||
<dimen name="outline_small">1dp</dimen>
|
<dimen name="outline_small">1dp</dimen>
|
||||||
<dimen name="outline_large">2dp</dimen>
|
<dimen name="outline_large">2dp</dimen>
|
||||||
|
|
||||||
<dimen name="system_cover_resizing">320dp</dimen>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user