mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-10-15 07:53:12 +11:00
Crossfade & Animated Covers
This commit is contained in:
1 parent
d47693ccaa
commit
f5cd48be5a
158 files changed
+7211
-1855
No files matched your search
@@ -24,7 +24,7 @@ import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
|
||||
|
||||
import coil.request.CachePolicy;
|
||||
|
||||
import com.tidal.android.feature.playerscreen.ui.composables.p3;
|
||||
import com.tidal.android.feature.playerscreen.ui.composables.e3;
|
||||
import com.tidal.android.feature.playerscreen.ui.model.PlayerBackgroundStyle;
|
||||
import com.tidal.android.image.coil.base.CoilImageLoader;
|
||||
import com.tidal.android.image.core.b; // MARKER: R8 core.b
|
||||
@@ -41,7 +41,7 @@ import java.util.concurrent.Executors;
|
||||
* (cloned at tools/kawarp-agsl) and is compiled into this bundle by tools/kawarp-build/build.sh;
|
||||
* this class only holds what is TIDAL/Compose-specific
|
||||
*/
|
||||
public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallback, b0.c { // MARKER: R8 am0.l b0.c
|
||||
public final class Kawarp implements yl0.l, Runnable, Choreographer.FrameCallback, c0.c { // MARKER: R8 yl0.l c0.c
|
||||
|
||||
/** Stop the frame loop once nothing has drawn for this long (player left / backgrounded). */
|
||||
private static final long IDLE_STOP_MS = 500L;
|
||||
@@ -61,7 +61,7 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
* would allocate an Integer per frame for nothing.
|
||||
*/
|
||||
private static final MutableIntState frameState = SnapshotIntStateKt.mutableIntStateOf(0);
|
||||
/** Flips true on any shader failure; read during composition so we recompose onto p3.a. */
|
||||
/** Flips true on any shader failure; read during composition so we recompose onto e3.a. */
|
||||
private static final MutableState fallbackState =
|
||||
SnapshotStateKt.mutableStateOf$default(Boolean.FALSE, null, 2, null);
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
|
||||
private static KawarpEngine engine;
|
||||
/** TIDAL's application-scoped Coil loader and the context its requests are built with. */
|
||||
private static volatile coil.f loader; // MARKER: R8 coil.f
|
||||
private static volatile coil.e loader; // MARKER: R8 coil.e
|
||||
private static volatile Context appContext;
|
||||
private static volatile String requestedUuid;
|
||||
private static volatile int loadToken;
|
||||
@@ -95,11 +95,11 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
|
||||
|
||||
/**
|
||||
* Drop-in replacement for TIDAL's PlayerBackground composable (p3.b) - the patch redirects
|
||||
* Drop-in replacement for TIDAL's PlayerBackground composable (e3.b) - the patch redirects
|
||||
* the call site here so the whole backdrop works <3
|
||||
*/
|
||||
public static void b(PlayerBackgroundStyle style, long color, int albumId, String coverUuid,
|
||||
boolean isPlaying, boolean isSeeking, am0.a progress, Modifier modifier, // MARKER: R8 am0.a
|
||||
boolean isPlaying, boolean isSeeking, yl0.a progress, Modifier modifier, // MARKER: R8 yl0.a
|
||||
Composer composer, int changed) {
|
||||
render(albumId, coverUuid, isPlaying, modifier, composer);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
boolean ok = !((Boolean) fallbackState.getValue()).booleanValue() && ensureEngine();
|
||||
if (!ok) {
|
||||
// No (working) AGSL here - fall back to TIDAL's own blurred backdrop.
|
||||
p3.a(albumId, coverUuid, isPlaying, false, null, modifier, composer, 0); // MARKER: R8 p3.a
|
||||
e3.a(albumId, coverUuid, isPlaying, false, null, modifier, composer, 0); // MARKER: R8 e3.a
|
||||
} else {
|
||||
engine.setPlaying(isPlaying);
|
||||
request(albumId, coverUuid);
|
||||
@@ -131,8 +131,8 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
Object local = composer.consume(AndroidCompositionLocals_androidKt.getLocalContext());
|
||||
if (!(local instanceof Context)) return;
|
||||
Context app = ((Context) local).getApplicationContext();
|
||||
if (!(app instanceof ce0.b.a)) return; // MARKER: R8 ce0.b.a
|
||||
Object tidalLoader = ((ce0.b.a) app).a().a(); // MARKER: R8 ce0.b.a
|
||||
if (!(app instanceof ud0.b.a)) return; // MARKER: R8 ud0.b.a
|
||||
Object tidalLoader = ((ud0.b.a) app).a().a(); // MARKER: R8 ud0.b.a
|
||||
if (!(tidalLoader instanceof CoilImageLoader)) return;
|
||||
appContext = app;
|
||||
loader = ((CoilImageLoader) tidalLoader).a;
|
||||
@@ -181,7 +181,7 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
*/
|
||||
public void run() {
|
||||
try {
|
||||
xd0.g tidal = new xd0.g(appContext, new b.a(String.valueOf(albumId), uuid), // MARKER: R8 xd0.g b.a
|
||||
pd0.g tidal = new pd0.g(appContext, new b.a(String.valueOf(albumId), uuid), // MARKER: R8 pd0.g b.a
|
||||
null, null, false, null, null, false);
|
||||
coil.request.h.a req = coil.request.h.a(com.tidal.android.image.coil.c.a(tidal, null)); // MARKER: R8 h.a coil.c.a
|
||||
coil.request.b d = req.b; // MARKER: R8 req.b
|
||||
@@ -207,7 +207,7 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
public void b(Drawable placeholder) {}
|
||||
|
||||
/** Target.onError - not in any of TIDAL's stores. */
|
||||
public void d(Drawable error) { fail(); }
|
||||
public void c(Drawable error) { fail(); }
|
||||
|
||||
private void fail() {
|
||||
if (token == loadToken) requestedUuid = null;
|
||||
@@ -258,7 +258,7 @@ public final class Kawarp implements am0.l, Runnable, Choreographer.FrameCallbac
|
||||
engine.draw(AndroidCanvas_androidKt.getNativeCanvas(scope.getDrawContext().getCanvas()),
|
||||
width, height);
|
||||
} catch (Throwable t) {
|
||||
fallbackState.setValue(Boolean.TRUE); // AGSL draw failed: recompose onto p3.a // MARKER: R8 p3.a
|
||||
fallbackState.setValue(Boolean.TRUE); // AGSL draw failed: recompose onto e3.a // MARKER: R8 e3.a
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package androidx.compose.ui.draw;
|
||||
import androidx.compose.ui.Modifier;
|
||||
public final class DrawModifierKt {
|
||||
public static Modifier drawBehind(Modifier modifier, am0.l onDraw) { return null; } // MARKER: R8 am0.l
|
||||
public static Modifier drawBehind(Modifier modifier, yl0.l onDraw) { return null; } // MARKER: R8 yl0.l
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package b0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `b0.c` - both package and name roll
|
||||
import android.graphics.drawable.Drawable;
|
||||
/** coil.target.Target (R8 name in TIDAL 2.200): a=onSuccess, b=onStart, d=onError. */
|
||||
public interface c {
|
||||
void a(Drawable success);
|
||||
void b(Drawable start);
|
||||
void d(Drawable error);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package c0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `c0.c` - both package and name roll
|
||||
import android.graphics.drawable.Drawable;
|
||||
/** coil.target.Target (R8 name in TIDAL 2.213): a=onSuccess, b=onStart, c=onError. */
|
||||
public interface c {
|
||||
void a(Drawable success);
|
||||
void b(Drawable start);
|
||||
void c(Drawable error);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package coil;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `coil.f` - both package and name roll
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `coil.e` - both package and name roll
|
||||
/** coil.ImageLoader; b() is enqueue(). */
|
||||
public interface f {
|
||||
public interface e {
|
||||
coil.request.d b(coil.request.h request);
|
||||
}
|
||||
@@ -9,12 +9,12 @@ import kotlinx.coroutines.CoroutineDispatcher;
|
||||
*/
|
||||
public final class b {
|
||||
public CoroutineDispatcher a, b, c, d;
|
||||
public d0.c.a e; // MARKER: R8 d0.c.a
|
||||
public e0.c.a e; // MARKER: R8 e0.c.a
|
||||
public coil.size.Precision f;
|
||||
public android.graphics.Bitmap.Config g;
|
||||
public boolean h;
|
||||
public CachePolicy i, j, k;
|
||||
public b(CoroutineDispatcher a, CoroutineDispatcher b, CoroutineDispatcher c, CoroutineDispatcher d,
|
||||
d0.c.a transition, coil.size.Precision precision, android.graphics.Bitmap.Config config, // MARKER: R8 d0.c.a
|
||||
e0.c.a transition, coil.size.Precision precision, android.graphics.Bitmap.Config config, // MARKER: R8 e0.c.a
|
||||
boolean h, CachePolicy memory, CachePolicy disk, CachePolicy network) {}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ public final class h {
|
||||
/** defaults block the built request copies its cache policies from */
|
||||
public b b;
|
||||
/** target */
|
||||
public b0.c d; // MARKER: R8 b0.c
|
||||
public c0.c d; // MARKER: R8 c0.c
|
||||
public h a() { return null; }
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package com.tidal.android.feature.playerscreen.ui.composables;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `com.tidal.android.feature.playerscreen.ui.composables.p3` - both package and name roll
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `com.tidal.android.feature.playerscreen.ui.composables.e3` - both package and name roll
|
||||
import androidx.compose.runtime.Composer;
|
||||
import androidx.compose.ui.Modifier;
|
||||
/** TIDAL's DarkBlurBackground composable (used as the pre-Android-13 fallback). */
|
||||
public final class p3 {
|
||||
public final class e3 {
|
||||
public static void a(int albumId, String coverUuid, boolean isPlaying, boolean isSeeking,
|
||||
am0.a progress, Modifier modifier, Composer composer, int changed) {} // MARKER: R8 am0.a
|
||||
yl0.a progress, Modifier modifier, Composer composer, int changed) {} // MARKER: R8 yl0.a
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package com.tidal.android.image.coil.base;
|
||||
/** TIDAL's xd0.e implementation; a is the underlying Coil ImageLoader. */
|
||||
public final class CoilImageLoader implements xd0.e { // MARKER: R8 xd0.e
|
||||
public final coil.f a = null; // MARKER: R8 coil.f
|
||||
/** TIDAL's pd0.e implementation; a is the underlying Coil ImageLoader. */
|
||||
public final class CoilImageLoader implements pd0.e { // MARKER: R8 pd0.e
|
||||
public final coil.e a = null; // MARKER: R8 coil.e
|
||||
}
|
||||
@@ -2,5 +2,5 @@ package com.tidal.android.image.coil;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `com.tidal.android.image.coil.c` - both package and name roll
|
||||
/** TIDAL request -> Coil request; installs the AlbumCover data the interceptor resolves. */
|
||||
public final class c {
|
||||
public static coil.request.h a(xd0.g request, androidx.compose.ui.layout.ContentScale scale) { return null; } // MARKER: R8 xd0.g
|
||||
public static coil.request.h a(pd0.g request, androidx.compose.ui.layout.ContentScale scale) { return null; } // MARKER: R8 pd0.g
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package d0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `d0.c` - both package and name roll
|
||||
package e0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `e0.c` - both package and name roll
|
||||
/** coil.transition.Transition; c.a is Transition.Factory. */
|
||||
public interface c { interface a {} }
|
||||
@@ -1,4 +1,4 @@
|
||||
package xd0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `xd0.e` - both package and name roll
|
||||
package pd0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `pd0.e` - both package and name roll
|
||||
/** TIDAL's ImageLoader interface (implemented by CoilImageLoader). */
|
||||
public interface e {}
|
||||
@@ -0,0 +1,4 @@
|
||||
package pd0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `pd0.f` - both package and name roll
|
||||
/** Size spec wrapper accepted by pd0.g's constructor; we always pass null. */
|
||||
public final class f {}
|
||||
@@ -1,5 +1,5 @@
|
||||
package xd0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `xd0.g` - both package and name roll
|
||||
package pd0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `pd0.g` - both package and name roll
|
||||
import android.content.Context;
|
||||
import com.tidal.android.image.core.b; // MARKER: R8 core.b
|
||||
/** TIDAL's ImageRequest. */
|
||||
@@ -1,7 +1,7 @@
|
||||
package ce0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `ce0.b` - both package and name roll
|
||||
package ud0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `ud0.b` - both package and name roll
|
||||
/** Dagger image component; the Application implements b.a and hands out the loader. */
|
||||
public interface b {
|
||||
xd0.e a(); // MARKER: R8 xd0.e
|
||||
pd0.e a(); // MARKER: R8 pd0.e
|
||||
interface a { b a(); }
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package xd0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `xd0.f` - both package and name roll
|
||||
/** Size spec wrapper accepted by xd0.g's constructor; we always pass null. */
|
||||
public final class f {}
|
||||
@@ -1,4 +1,4 @@
|
||||
package am0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `am0.a` - both package and name roll
|
||||
package yl0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `yl0.a` - both package and name roll
|
||||
/** kotlin.jvm.functions.Function0 (obfuscated in the TIDAL dex). */
|
||||
public interface a { Object invoke(); }
|
||||
@@ -1,4 +1,4 @@
|
||||
package am0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `am0.l` - both package and name roll
|
||||
package yl0;
|
||||
// MARKER: R8 whole class: TIDAL dex FQN is `yl0.l` - both package and name roll
|
||||
/** kotlin.jvm.functions.Function1 (obfuscated in the TIDAL dex). */
|
||||
public interface l { Object invoke(Object p1); }
|
||||
Reference in new issue
Block a user