mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-08-26 14:07:45 +10:00
fix(MP gestures): axis locking + swipe up feedback reset fixes
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
.class public final Lradiant/MiniPlayerGestures$FeedbackLayer;
|
||||
.super Ljava/lang/Object;
|
||||
.implements Lyl0/l;
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lradiant/MiniPlayerGestures;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x19
|
||||
name = "FeedbackLayer"
|
||||
.end annotation
|
||||
|
||||
|
||||
# static fields
|
||||
.field public static final INSTANCE:Lradiant/MiniPlayerGestures$FeedbackLayer;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method static constructor <clinit>()V
|
||||
.locals 1
|
||||
|
||||
new-instance v0, Lradiant/MiniPlayerGestures$FeedbackLayer;
|
||||
|
||||
invoke-direct {v0}, Lradiant/MiniPlayerGestures$FeedbackLayer;-><init>()V
|
||||
|
||||
sput-object v0, Lradiant/MiniPlayerGestures$FeedbackLayer;->INSTANCE:Lradiant/MiniPlayerGestures$FeedbackLayer;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private constructor <init>()V
|
||||
.locals 0
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public final invoke(Landroidx/compose/ui/graphics/GraphicsLayerScope;)Lkotlin/u;
|
||||
.locals 1
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->v:Landroidx/compose/runtime/MutableFloatState;
|
||||
|
||||
invoke-interface {v0}, Landroidx/compose/runtime/MutableFloatState;->getFloatValue()F
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-interface {p1, v0}, Landroidx/compose/ui/graphics/GraphicsLayerScope;->setTranslationY(F)V
|
||||
|
||||
sget-object p1, Lkotlin/u;->a:Lkotlin/u;
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
|
||||
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
.locals 0
|
||||
|
||||
check-cast p1, Landroidx/compose/ui/graphics/GraphicsLayerScope;
|
||||
|
||||
invoke-virtual {p0, p1}, Lradiant/MiniPlayerGestures$FeedbackLayer;->invoke(Landroidx/compose/ui/graphics/GraphicsLayerScope;)Lkotlin/u;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
@@ -0,0 +1,60 @@
|
||||
.class public final Lradiant/MiniPlayerGestures$FeedbackResetAnimator;
|
||||
.super Ljava/lang/Object;
|
||||
.implements Landroid/animation/ValueAnimator$AnimatorUpdateListener;
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lradiant/MiniPlayerGestures;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x19
|
||||
name = "FeedbackResetAnimator"
|
||||
.end annotation
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>()V
|
||||
.locals 0
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public final onAnimationUpdate(Landroid/animation/ValueAnimator;)V
|
||||
.locals 3
|
||||
|
||||
move-object v0, p1
|
||||
|
||||
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->getAnimatedValue()Ljava/lang/Object;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Ljava/lang/Float;
|
||||
|
||||
invoke-virtual {v1}, Ljava/lang/Float;->floatValue()F
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {v1}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->getAnimatedFraction()F
|
||||
|
||||
move-result v1
|
||||
|
||||
const/high16 v2, 0x3f800000 # 1.0f
|
||||
|
||||
cmpg-float v1, v1, v2
|
||||
|
||||
if-gez v1, :done
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->clearSwipeFeedbackAnimator(Landroid/animation/ValueAnimator;)V
|
||||
|
||||
:done
|
||||
return-void
|
||||
.end method
|
||||
@@ -199,6 +199,8 @@
|
||||
|
||||
# ACTION_DOWN
|
||||
:down
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->resetGestureLock()V
|
||||
|
||||
invoke-static {p1}, Lradiant/MiniPlayerGestures;->beginMotion(Landroid/view/MotionEvent;)V
|
||||
|
||||
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
||||
@@ -231,6 +233,12 @@
|
||||
|
||||
iput-boolean v0, p0, Lradiant/MiniPlayerGestures$Gesture;->j:Z
|
||||
|
||||
iget v0, p0, Lradiant/MiniPlayerGestures$Gesture;->b:F
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->beginSwipeGesture(F)V
|
||||
|
||||
:skip_feedback_down
|
||||
|
||||
goto :done
|
||||
|
||||
# ACTION_MOVE
|
||||
@@ -263,12 +271,17 @@
|
||||
|
||||
if-eqz v3, :maybe_start
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->suppressHorizontalGestures()V
|
||||
|
||||
iget-boolean v3, p0, Lradiant/MiniPlayerGestures$Gesture;->k:Z
|
||||
|
||||
if-eqz v3, :store_last
|
||||
if-eqz v3, :feedback_active
|
||||
|
||||
invoke-direct {p0, v2, v5, v6}, Lradiant/MiniPlayerGestures$Gesture;->dragSheet(FJ)V
|
||||
|
||||
:feedback_active
|
||||
invoke-static {v2}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackFromDrag(F)V
|
||||
|
||||
goto :store_last
|
||||
|
||||
:maybe_start
|
||||
@@ -295,28 +308,60 @@
|
||||
|
||||
move-result v8
|
||||
|
||||
const/high16 v9, 0x41800000 # 16.0f
|
||||
const/high16 v9, 0x40c00000 # 6.0f axis deadzone
|
||||
|
||||
invoke-static {v9}, Lradiant/MiniPlayerGestures$Gesture;->dp(F)F
|
||||
|
||||
move-result v9
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->isHorizontalGestureLocked()Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-eqz v10, :horizontal_check
|
||||
|
||||
const/4 v10, 0x0
|
||||
|
||||
invoke-static {v10}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
goto :store_last
|
||||
|
||||
:horizontal_check
|
||||
|
||||
cmpg-float v10, v7, v9
|
||||
|
||||
if-gez v10, :vertical_check
|
||||
if-gez v10, :horizontal_dominance
|
||||
|
||||
const/high16 v10, 0x3fc00000 # 1.5f
|
||||
goto :vertical_check
|
||||
|
||||
:horizontal_dominance
|
||||
|
||||
const v10, 0x3f8ccccd # 1.1f
|
||||
|
||||
mul-float/2addr v10, v8
|
||||
|
||||
cmpl-float v10, v7, v10
|
||||
cmpg-float v10, v7, v10
|
||||
|
||||
if-lez v10, :vertical_check
|
||||
if-gez v10, :horizontal_wins
|
||||
|
||||
goto :vertical_check
|
||||
|
||||
:horizontal_wins
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->lockHorizontalGesture()Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-eqz v10, :store_last
|
||||
|
||||
const/4 v10, 0x1
|
||||
|
||||
iput-boolean v10, p0, Lradiant/MiniPlayerGestures$Gesture;->j:Z
|
||||
|
||||
const/4 v10, 0x0
|
||||
|
||||
invoke-static {v10}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
goto :store_last
|
||||
|
||||
# At least 16dp up to open the player
|
||||
@@ -327,10 +372,12 @@
|
||||
|
||||
if-lez v10, :vertical_dominance
|
||||
|
||||
invoke-static {v2}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackFromDrag(F)V
|
||||
|
||||
goto :store_last
|
||||
|
||||
:vertical_dominance
|
||||
const/high16 v10, 0x3fc00000 # 1.5f -> has to dominate horizontal mov. by 1.5x
|
||||
const v10, 0x3f8ccccd # 1.1f -> early vertical axis lock
|
||||
|
||||
mul-float/2addr v7, v10
|
||||
|
||||
@@ -341,14 +388,29 @@
|
||||
goto :store_last
|
||||
|
||||
:begin
|
||||
invoke-direct {p0, v2, v5, v6}, Lradiant/MiniPlayerGestures$Gesture;->startSheet(FJ)V
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->lockVerticalGesture()Z
|
||||
|
||||
iget-boolean v10, p0, Lradiant/MiniPlayerGestures$Gesture;->k:Z
|
||||
move-result v10
|
||||
|
||||
if-eqz v10, :store_last
|
||||
|
||||
invoke-direct {p0, v2, v5, v6}, Lradiant/MiniPlayerGestures$Gesture;->startSheet(FJ)V
|
||||
|
||||
iget-boolean v10, p0, Lradiant/MiniPlayerGestures$Gesture;->e:Z
|
||||
|
||||
if-eqz v10, :store_last
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->suppressHorizontalGestures()V
|
||||
|
||||
iget-boolean v10, p0, Lradiant/MiniPlayerGestures$Gesture;->k:Z
|
||||
|
||||
if-eqz v10, :feedback_begin
|
||||
|
||||
invoke-direct {p0, v2, v5, v6}, Lradiant/MiniPlayerGestures$Gesture;->dragSheet(FJ)V
|
||||
|
||||
:feedback_begin
|
||||
invoke-static {v2}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackFromDrag(F)V
|
||||
|
||||
|
||||
:store_last
|
||||
iput v0, p0, Lradiant/MiniPlayerGestures$Gesture;->c:F
|
||||
@@ -363,7 +425,7 @@
|
||||
|
||||
iget-boolean v0, p0, Lradiant/MiniPlayerGestures$Gesture;->e:Z
|
||||
|
||||
if-eqz v0, :finish
|
||||
if-eqz v0, :up_no_drag
|
||||
|
||||
iget-boolean v0, p0, Lradiant/MiniPlayerGestures$Gesture;->k:Z
|
||||
|
||||
@@ -389,10 +451,27 @@
|
||||
|
||||
invoke-direct {p0, v0}, Lradiant/MiniPlayerGestures$Gesture;->finishSheet(F)V
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
goto :finish
|
||||
|
||||
:up_no_drag
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
goto :finish
|
||||
|
||||
:open_simple
|
||||
invoke-direct {p0}, Lradiant/MiniPlayerGestures$Gesture;->openPlayer()V
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->suppressHorizontalGestures()V
|
||||
|
||||
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
||||
|
||||
move-result v0
|
||||
|
||||
iget-object v1, p0, Lradiant/MiniPlayerGestures$Gesture;->a:Lyl0/l;
|
||||
|
||||
invoke-static {v1, v0}, Lradiant/MiniPlayerGestures;->completeSimpleSwipe(Lyl0/l;F)Z
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
|
||||
:finish
|
||||
@@ -404,7 +483,9 @@
|
||||
:cancel
|
||||
iget-boolean v0, p0, Lradiant/MiniPlayerGestures$Gesture;->e:Z
|
||||
|
||||
if-eqz v0, :cancel_reset
|
||||
if-eqz v0, :cancel_no_active
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
iget-object v0, p0, Lradiant/MiniPlayerGestures$Gesture;->f:Landroidx/compose/material3/SheetState;
|
||||
|
||||
@@ -412,6 +493,11 @@
|
||||
|
||||
invoke-static {v0, v1}, Lradiant/MiniPlayerGestures;->cancelDrag(Landroidx/compose/material3/SheetState;Lyl0/l;)V
|
||||
|
||||
goto :cancel_reset
|
||||
|
||||
:cancel_no_active
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
:cancel_reset
|
||||
invoke-direct {p0}, Lradiant/MiniPlayerGestures$Gesture;->reset()V
|
||||
|
||||
|
||||
@@ -40,16 +40,16 @@
|
||||
|
||||
iget-object v0, p0, Lradiant/MiniPlayerGestures$RootGesture;->b:Landroidx/compose/material3/SheetState;
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->isDragging(Landroidx/compose/material3/SheetState;)Z
|
||||
|
||||
move-result v1
|
||||
|
||||
if-eqz v1, :done
|
||||
|
||||
invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionMasked()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->isDragging(Landroidx/compose/material3/SheetState;)Z
|
||||
|
||||
move-result v2
|
||||
|
||||
if-eqz v2, :maybe_reset_only
|
||||
|
||||
const/4 v2, 0x1
|
||||
|
||||
if-eq v1, v2, :up
|
||||
@@ -64,6 +64,51 @@
|
||||
|
||||
goto :done
|
||||
|
||||
:maybe_reset_only
|
||||
const/4 v2, 0x1
|
||||
|
||||
if-eq v1, v2, :simple_up
|
||||
|
||||
const/4 v2, 0x3
|
||||
|
||||
if-eq v1, v2, :reset_only
|
||||
|
||||
const/4 v2, 0x2
|
||||
|
||||
if-eq v1, v2, :simple_move
|
||||
|
||||
goto :done
|
||||
|
||||
:reset_only
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->resetGestureLock()V
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
goto :done
|
||||
|
||||
:simple_move
|
||||
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {v1}, Lradiant/MiniPlayerGestures;->updateSimpleSwipe(F)Z
|
||||
|
||||
goto :done
|
||||
|
||||
:simple_up
|
||||
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
||||
|
||||
move-result v1
|
||||
|
||||
iget-object v2, p0, Lradiant/MiniPlayerGestures$RootGesture;->a:Lyl0/l;
|
||||
|
||||
invoke-static {v2, v1}, Lradiant/MiniPlayerGestures;->completeSimpleSwipe(Lyl0/l;F)Z
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
goto :done
|
||||
|
||||
|
||||
# ACTION_MOVE
|
||||
:move
|
||||
invoke-static {p1}, Lradiant/MiniPlayerGestures;->trackMotion(Landroid/view/MotionEvent;)V
|
||||
@@ -102,6 +147,8 @@
|
||||
|
||||
invoke-static {v0, v2, v1}, Lradiant/MiniPlayerGestures;->finishDrag(Landroidx/compose/material3/SheetState;Lyl0/l;F)V
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
goto :done
|
||||
|
||||
# ACTION_CANCEL
|
||||
@@ -110,6 +157,8 @@
|
||||
|
||||
invoke-static {v0, v2}, Lradiant/MiniPlayerGestures;->cancelDrag(Landroidx/compose/material3/SheetState;Lyl0/l;)V
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->animateSwipeFeedbackReset()V
|
||||
|
||||
:done
|
||||
sget-object p1, Lkotlin/u;->a:Lkotlin/u;
|
||||
|
||||
|
||||
@@ -57,8 +57,36 @@
|
||||
|
||||
.field private static u:Z
|
||||
|
||||
# Feedback offset
|
||||
.field public static v:Landroidx/compose/runtime/MutableFloatState;
|
||||
|
||||
.field private static w:Landroid/animation/ValueAnimator;
|
||||
|
||||
# Gesture axis lock: 0 = none, 1 = vertical, 2 = horizontal
|
||||
.field private static x:I
|
||||
|
||||
# Swipe gesture start Y
|
||||
.field private static y:F
|
||||
|
||||
# Relative to Y drag offset
|
||||
.field private static z:F
|
||||
|
||||
|
||||
# direct methods
|
||||
.method static constructor <clinit>()V
|
||||
.locals 1
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
invoke-static {v0}, Landroidx/compose/runtime/PrimitiveSnapshotStateKt;->mutableFloatStateOf(F)Landroidx/compose/runtime/MutableFloatState;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
sput-object v0, Lradiant/MiniPlayerGestures;->v:Landroidx/compose/runtime/MutableFloatState;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private constructor <init>()V
|
||||
.locals 0
|
||||
|
||||
@@ -67,6 +95,119 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static animateSwipeFeedbackReset()V
|
||||
.locals 7
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
if-eqz v0, :read_offset
|
||||
|
||||
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
:read_offset
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->v:Landroidx/compose/runtime/MutableFloatState;
|
||||
|
||||
invoke-interface {v0}, Landroidx/compose/runtime/MutableFloatState;->getFloatValue()F
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
|
||||
|
||||
move-result v1
|
||||
|
||||
const/4 v3, 0x0
|
||||
|
||||
const/high16 v2, 0x3f000000 # 0.5f
|
||||
|
||||
cmpg-float v1, v1, v2
|
||||
|
||||
if-lez v1, :snap_zero
|
||||
|
||||
const/4 v1, 0x2
|
||||
|
||||
new-array v1, v1, [F
|
||||
|
||||
const/4 v2, 0x0
|
||||
|
||||
aput v0, v1, v2
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
aput v3, v1, v0
|
||||
|
||||
invoke-static {v1}, Landroid/animation/ValueAnimator;->ofFloat([F)Landroid/animation/ValueAnimator;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
const-wide/16 v4, 0xb4 # 180ms
|
||||
|
||||
invoke-virtual {v1, v4, v5}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
||||
|
||||
new-instance v0, Landroid/view/animation/DecelerateInterpolator;
|
||||
|
||||
const/high16 v4, 0x3fc00000 # 1.5f
|
||||
|
||||
invoke-direct {v0, v4}, Landroid/view/animation/DecelerateInterpolator;-><init>(F)V
|
||||
|
||||
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
||||
|
||||
new-instance v0, Lradiant/MiniPlayerGestures$FeedbackResetAnimator;
|
||||
|
||||
invoke-direct {v0}, Lradiant/MiniPlayerGestures$FeedbackResetAnimator;-><init>()V
|
||||
|
||||
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
|
||||
|
||||
sput-object v1, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
invoke-virtual {v1}, Landroid/animation/ValueAnimator;->start()V
|
||||
|
||||
return-void
|
||||
|
||||
:snap_zero
|
||||
invoke-static {v3}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static beginSwipeFeedback()V
|
||||
.locals 1
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
if-eqz v0, :zero
|
||||
|
||||
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
:zero
|
||||
const/4 v0, 0x0
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static beginSwipeGesture(F)V
|
||||
.locals 1
|
||||
|
||||
sput p0, Lradiant/MiniPlayerGestures;->y:F
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->z:F
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->beginSwipeFeedback()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static applyPendingDrag(Landroidx/compose/material3/SheetState;)V
|
||||
.locals 5
|
||||
|
||||
@@ -480,6 +621,114 @@
|
||||
|
||||
sget-boolean v0, Lradiant/MiniPlayerGestures;->b:Z
|
||||
|
||||
if-nez v0, :yes
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->isHorizontalGestureSuppressed()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
return v0
|
||||
|
||||
:yes
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public static isHorizontalGestureSuppressed()Z
|
||||
.locals 2
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x1
|
||||
|
||||
if-ne v0, v1, :no
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
|
||||
:no
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public static isHorizontalGestureLocked()Z
|
||||
.locals 2
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x2
|
||||
|
||||
if-ne v0, v1, :no
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
|
||||
:no
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public static lockHorizontalGesture()Z
|
||||
.locals 2
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x1
|
||||
|
||||
if-ne v0, v1, :lock
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
|
||||
:lock
|
||||
const/4 v0, 0x2
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
|
||||
.end method
|
||||
|
||||
.method public static resetGestureLock()V
|
||||
.locals 1
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->y:F
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->z:F
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static lockVerticalGesture()Z
|
||||
.locals 2
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x2
|
||||
|
||||
if-ne v0, v1, :lock
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
|
||||
:lock
|
||||
const/4 v0, 0x1
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
@@ -511,6 +760,51 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static clearSwipeFeedbackAnimator(Landroid/animation/ValueAnimator;)V
|
||||
.locals 1
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
if-ne v0, p0, :done
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
:done
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private static dp(F)F
|
||||
.locals 1
|
||||
|
||||
invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
|
||||
|
||||
mul-float/2addr p0, v0
|
||||
|
||||
return p0
|
||||
.end method
|
||||
|
||||
.method public static feedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier;
|
||||
.locals 1
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures$FeedbackLayer;->INSTANCE:Lradiant/MiniPlayerGestures$FeedbackLayer;
|
||||
|
||||
invoke-static {p0, v0}, Landroidx/compose/ui/graphics/GraphicsLayerModifierKt;->graphicsLayer(Landroidx/compose/ui/Modifier;Lyl0/l;)Landroidx/compose/ui/Modifier;
|
||||
|
||||
move-result-object p0
|
||||
|
||||
return-object p0
|
||||
.end method
|
||||
|
||||
.method private static clampReleaseVelocity(F)F
|
||||
.locals 4
|
||||
|
||||
@@ -589,6 +883,228 @@
|
||||
return-object p0
|
||||
.end method
|
||||
|
||||
.method public static setSwipeFeedback(F)V
|
||||
.locals 5
|
||||
|
||||
const/4 v4, 0x0
|
||||
|
||||
cmpl-float v0, p0, v4
|
||||
|
||||
if-gtz v0, :snap_zero
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
if-eqz v0, :rubber_band
|
||||
|
||||
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput-object v0, Lradiant/MiniPlayerGestures;->w:Landroid/animation/ValueAnimator;
|
||||
|
||||
:rubber_band
|
||||
invoke-static {p0}, Ljava/lang/Math;->abs(F)F
|
||||
|
||||
move-result v0
|
||||
|
||||
const/high16 v1, 0x41800000 # 16.0f dp travel
|
||||
|
||||
invoke-static {v1}, Lradiant/MiniPlayerGestures;->dp(F)F
|
||||
|
||||
move-result v1
|
||||
|
||||
cmpg-float v2, v0, v1
|
||||
|
||||
if-lez v2, :publish
|
||||
|
||||
sub-float/2addr v0, v1
|
||||
|
||||
const v2, 0x3e19999a # 0.15f resistance after 16dp
|
||||
|
||||
mul-float/2addr v0, v2
|
||||
|
||||
const/high16 v2, 0x3d800000 # 0.0625f max up travel
|
||||
|
||||
mul-float/2addr v2, v1
|
||||
|
||||
invoke-static {v0, v2}, Ljava/lang/Math;->min(FF)F
|
||||
|
||||
move-result v0
|
||||
|
||||
add-float/2addr v0, v1
|
||||
|
||||
neg-float p0, v0
|
||||
|
||||
:publish
|
||||
invoke-static {p0}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
return-void
|
||||
|
||||
:snap_zero
|
||||
invoke-static {v4}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static setSwipeFeedbackFromDrag(F)V
|
||||
.locals 3
|
||||
|
||||
sput p0, Lradiant/MiniPlayerGestures;->z:F
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
cmpl-float v1, p0, v0
|
||||
|
||||
if-ltz v1, :maybe_up
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
return-void
|
||||
|
||||
:maybe_up
|
||||
const/high16 v0, 0x40c00000 # 6.0f feedback deadzone
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->dp(F)F
|
||||
|
||||
move-result v0
|
||||
|
||||
neg-float v1, v0
|
||||
|
||||
cmpg-float v2, p0, v1
|
||||
|
||||
if-gtz v2, :snap_zero
|
||||
|
||||
add-float/2addr p0, v0
|
||||
|
||||
invoke-static {p0}, Lradiant/MiniPlayerGestures;->setSwipeFeedback(F)V
|
||||
|
||||
return-void
|
||||
|
||||
:snap_zero
|
||||
const/4 v0, 0x0
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static completeSimpleSwipe(Lyl0/l;F)Z
|
||||
.locals 4
|
||||
|
||||
sget-boolean v0, Lradiant/MiniPlayerGestures;->u:Z
|
||||
|
||||
if-nez v0, :no
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x1
|
||||
|
||||
if-ne v0, v1, :no
|
||||
|
||||
sget-boolean v0, Lradiant/MiniPlayerGestures;->r:Z
|
||||
|
||||
if-eqz v0, :consume_no
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->y:F
|
||||
|
||||
sub-float/2addr p1, v0
|
||||
|
||||
sput p1, Lradiant/MiniPlayerGestures;->z:F
|
||||
|
||||
const/high16 v0, 0x42400000 # 48.0f release threshold
|
||||
|
||||
invoke-static {v0}, Lradiant/MiniPlayerGestures;->dp(F)F
|
||||
|
||||
move-result v0
|
||||
|
||||
neg-float v0, v0
|
||||
|
||||
cmpg-float v2, p1, v0
|
||||
|
||||
if-lez v2, :open
|
||||
|
||||
:consume_no
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->resetGestureLock()V
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
|
||||
:open
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->resetGestureLock()V
|
||||
|
||||
sget-object v0, Lcom/tidal/android/feature/appscaffold/ui/b$b;->a:Lcom/tidal/android/feature/appscaffold/ui/b$b;
|
||||
|
||||
invoke-interface {p0, v0}, Lyl0/l;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
|
||||
:no
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public static updateSimpleSwipe(F)Z
|
||||
.locals 3
|
||||
|
||||
sget-boolean v0, Lradiant/MiniPlayerGestures;->u:Z
|
||||
|
||||
if-nez v0, :no
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x1
|
||||
|
||||
if-ne v0, v1, :no
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->y:F
|
||||
|
||||
sub-float/2addr p0, v0
|
||||
|
||||
invoke-static {p0}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackFromDrag(F)V
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
|
||||
:no
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public static setSwipeFeedbackDirect(F)V
|
||||
.locals 1
|
||||
|
||||
sget-object v0, Lradiant/MiniPlayerGestures;->v:Landroidx/compose/runtime/MutableFloatState;
|
||||
|
||||
invoke-interface {v0, p0}, Landroidx/compose/runtime/MutableFloatState;->setFloatValue(F)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static suppressHorizontalGestures()V
|
||||
.locals 2
|
||||
|
||||
sget v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
const/4 v1, 0x2
|
||||
|
||||
if-ne v0, v1, :lock
|
||||
|
||||
return-void
|
||||
|
||||
:lock
|
||||
const/4 v0, 0x1
|
||||
|
||||
sput v0, Lradiant/MiniPlayerGestures;->x:I
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private static minFlingVelocity()F
|
||||
.locals 2
|
||||
|
||||
@@ -1047,6 +1563,8 @@
|
||||
|
||||
:apply
|
||||
|
||||
invoke-static {p1}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackFromDrag(F)V
|
||||
|
||||
invoke-static {p0}, Lradiant/MiniPlayerGestures;->applyPendingDrag(Landroidx/compose/material3/SheetState;)V
|
||||
|
||||
const/4 v0, 0x3
|
||||
|
||||
@@ -126,6 +126,8 @@
|
||||
.method public static beginDrag(FF)V
|
||||
.locals 2
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->resetGestureLock()V
|
||||
|
||||
sput p0, Lradiant/MiniPlayerTrackGestures;->e:F
|
||||
|
||||
sput p1, Lradiant/MiniPlayerTrackGestures;->f:F
|
||||
@@ -188,6 +190,24 @@
|
||||
.method public static finishDrag(FF)I
|
||||
.locals 5
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->isAnyDragging()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eqz v0, :check_active
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput-boolean v0, Lradiant/MiniPlayerTrackGestures;->g:Z
|
||||
|
||||
sput-boolean v0, Lradiant/MiniPlayerTrackGestures;->h:Z
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerTrackGestures;->animateReset()V
|
||||
|
||||
return v0
|
||||
|
||||
:check_active
|
||||
|
||||
sget-boolean v0, Lradiant/MiniPlayerTrackGestures;->g:Z
|
||||
|
||||
if-nez v0, :active
|
||||
@@ -336,17 +356,38 @@
|
||||
goto :done
|
||||
|
||||
:accept
|
||||
invoke-static {}, Lradiant/MiniPlayerGestures;->lockHorizontalGesture()Z
|
||||
|
||||
move-result v2
|
||||
|
||||
if-eqz v2, :cancel_locked
|
||||
|
||||
const/4 v2, 0x1
|
||||
|
||||
sput-boolean v2, Lradiant/MiniPlayerTrackGestures;->h:Z
|
||||
|
||||
:publish
|
||||
const/4 v2, 0x0
|
||||
|
||||
invoke-static {v2}, Lradiant/MiniPlayerGestures;->setSwipeFeedbackDirect(F)V
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerTrackGestures;->suppressTapOpen()V
|
||||
|
||||
invoke-static {p0}, Lradiant/MiniPlayerTrackGestures;->setDragOffset(F)V
|
||||
|
||||
:done
|
||||
return-void
|
||||
|
||||
:cancel_locked
|
||||
const/4 v0, 0x0
|
||||
|
||||
sput-boolean v0, Lradiant/MiniPlayerTrackGestures;->g:Z
|
||||
|
||||
sput-boolean v0, Lradiant/MiniPlayerTrackGestures;->h:Z
|
||||
|
||||
invoke-static {}, Lradiant/MiniPlayerTrackGestures;->animateReset()V
|
||||
|
||||
goto :done
|
||||
.end method
|
||||
|
||||
.method private static dp(F)F
|
||||
|
||||
@@ -169,6 +169,8 @@
|
||||
"extensionFiles": [
|
||||
"radiant/MiniPlayerGestures.smali",
|
||||
"radiant/MiniPlayerGestures$Gesture.smali",
|
||||
"radiant/MiniPlayerGestures$FeedbackLayer.smali",
|
||||
"radiant/MiniPlayerGestures$FeedbackResetAnimator.smali",
|
||||
"radiant/MiniPlayerGestures$RootGesture.smali",
|
||||
"radiant/MiniPlayerGestures$ApplyPending.smali"
|
||||
]
|
||||
|
||||
@@ -44,17 +44,30 @@
|
||||
+
|
||||
+ :rl_set_media
|
||||
+ invoke-static {v5}, Lradiant/MiniPlayerGestures;->setHasMiniPlayerMedia(Z)V
|
||||
|
||||
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||||
@@ -1748,3 +1764,7 @@
|
||||
move-result-object v6
|
||||
-
|
||||
+
|
||||
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||||
@@ -1750,2 +1766,6 @@
|
||||
+ invoke-static {v6}, Lradiant/MiniPlayerGestures;->trackAreaModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # attach swipe up listener
|
||||
+
|
||||
+ move-result-object v6
|
||||
+
|
||||
.line 38
|
||||
sget-object v21, Landroidx/compose/ui/Alignment;->Companion:Landroidx/compose/ui/Alignment$Companion;
|
||||
@@ -1923,2 +1943,6 @@
|
||||
+ invoke-static {v4}, Lradiant/MiniPlayerGestures;->feedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # move cover (swipe up feedback)
|
||||
+
|
||||
+ move-result-object v4
|
||||
+
|
||||
.line 63
|
||||
invoke-virtual/range {v22 .. v22}, Lcom/squareup/ui/market/core/theme/MarketStylesheet$c;->p0()Lc20/a;
|
||||
@@ -2034,2 +2058,6 @@
|
||||
+ invoke-static {v4}, Lradiant/MiniPlayerGestures;->feedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # move title/artist (swipe up feedback)
|
||||
+
|
||||
+ move-result-object v4
|
||||
+
|
||||
.line 72
|
||||
invoke-virtual/range {p2 .. p2}, Landroidx/compose/foundation/layout/Arrangement;->getTop()Landroidx/compose/foundation/layout/Arrangement$Vertical;
|
||||
--- a/androidx/compose/material3/ModalBottomSheetKt$ModalBottomSheet$4$1.smali
|
||||
+++ b/androidx/compose/material3/ModalBottomSheetKt$ModalBottomSheet$4$1.smali
|
||||
@@ -210,8 +210,10 @@
|
||||
|
||||
Reference in New Issue
Block a user