501 lines
16 KiB
Smali
501 lines
16 KiB
Smali
.class public Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.super Ljava/lang/Object;
|
|
.source "TouchEffectsManager.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final NONE_TYPE:I = -0x1
|
|
|
|
.field public static final RIPPLE_1_TYPE:I = 0x4
|
|
|
|
.field public static final RIPPLE_TYPE:I = 0x1
|
|
|
|
.field public static final SCALE_TYPE:I = 0x0
|
|
|
|
.field public static final SHAKE_TYPE:I = 0x3
|
|
|
|
.field public static final STATE_TYPE:I = 0x2
|
|
|
|
.field private static mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
.field private static mExtraTypeMap:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;",
|
|
"Lcom/lky/toucheffectsmodule/bean/extra/BaseExtraBean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static volatile mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
.field private static mListWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.field private static mScaleBean:Lcom/lky/toucheffectsmodule/bean/ScaleBean;
|
|
|
|
.field private static mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.field private static mViewSubject:Lcom/lky/toucheffectsmodule/proxy/TouchEffectsViewProxy;
|
|
|
|
.field private static mViewTypes:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 35
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
sput-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mExtraTypeMap:Ljava/util/HashMap;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 4
|
|
|
|
.line 38
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 39
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
sput-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewTypes:Ljava/util/HashMap;
|
|
|
|
.line 40
|
|
new-instance v0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsViewProxy;
|
|
|
|
new-instance v1, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;
|
|
|
|
sget-object v2, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
sget-object v3, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
invoke-direct {v1, v2, v3}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;-><init>(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;Lcom/lky/toucheffectsmodule/bean/ColorBean;)V
|
|
|
|
invoke-direct {v0, v1}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsViewProxy;-><init>(Lcom/lky/toucheffectsmodule/impl/TouchEffectsViewSubject;)V
|
|
|
|
sput-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewSubject:Lcom/lky/toucheffectsmodule/proxy/TouchEffectsViewProxy;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static build(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 1
|
|
|
|
.line 60
|
|
sput-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.line 61
|
|
sget-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
.line 62
|
|
new-instance p0, Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
const/high16 v0, 0x3d000000 # 0.03125f
|
|
|
|
invoke-direct {p0, v0, v0}, Lcom/lky/toucheffectsmodule/bean/ColorBean;-><init>(II)V
|
|
|
|
sput-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
.line 64
|
|
:cond_0
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getInstance()Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static build(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;II)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 0
|
|
|
|
.line 73
|
|
sput-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.line 74
|
|
sget-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
.line 75
|
|
new-instance p0, Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/lky/toucheffectsmodule/bean/ColorBean;-><init>(II)V
|
|
|
|
sput-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
goto :goto_0
|
|
|
|
.line 77
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Lcom/lky/toucheffectsmodule/bean/ColorBean;->setNormalColor(I)V
|
|
|
|
.line 78
|
|
sget-object p0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
invoke-virtual {p0, p2}, Lcom/lky/toucheffectsmodule/bean/ColorBean;->setPressedColor(I)V
|
|
|
|
.line 80
|
|
:goto_0
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getInstance()Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getColorBean()Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
.locals 1
|
|
|
|
.line 199
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getExtraTypeMap()Ljava/util/HashMap;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/HashMap<",
|
|
"Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;",
|
|
"Lcom/lky/toucheffectsmodule/bean/extra/BaseExtraBean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 176
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mExtraTypeMap:Ljava/util/HashMap;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static getInstance()Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 2
|
|
|
|
.line 44
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 45
|
|
const-class v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 46
|
|
:try_start_0
|
|
sget-object v1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 47
|
|
new-instance v1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
invoke-direct {v1}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;-><init>()V
|
|
|
|
sput-object v1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
.line 49
|
|
:cond_0
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
|
|
.line 51
|
|
:cond_1
|
|
:goto_0
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getListWholeType()Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
.locals 1
|
|
|
|
.line 180
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mListWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getScaleBean()Lcom/lky/toucheffectsmodule/bean/ScaleBean;
|
|
.locals 1
|
|
|
|
.line 203
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mScaleBean:Lcom/lky/toucheffectsmodule/bean/ScaleBean;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getViewSubject()Lcom/lky/toucheffectsmodule/proxy/TouchEffectsViewProxy;
|
|
.locals 1
|
|
|
|
.line 195
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewSubject:Lcom/lky/toucheffectsmodule/proxy/TouchEffectsViewProxy;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getViewTypes()Ljava/util/HashMap;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 188
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewTypes:Ljava/util/HashMap;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
.line 189
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
const-string v1, "please initialize in Application"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public addViewType(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 2
|
|
|
|
const-string v0, "ALL"
|
|
|
|
.line 123
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 124
|
|
sget-object p2, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewTypes:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {p2}, Ljava/util/HashMap;->clear()V
|
|
|
|
.line 125
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/utils/TypeUtils;->getAllViewTypes()Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_0
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
.line 126
|
|
sget-object v1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewTypes:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v1, v0, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
.line 129
|
|
:cond_0
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mViewTypes:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0, p2, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 131
|
|
:cond_1
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public addViewType(Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 1
|
|
|
|
.line 112
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
invoke-virtual {p0, v0, p1}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->addViewType(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
.line 113
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public varargs addViewTypes(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;[Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 3
|
|
|
|
.line 100
|
|
array-length v0, p2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_0
|
|
|
|
aget-object v2, p2, v1
|
|
|
|
.line 101
|
|
invoke-virtual {p0, p1, v2}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->addViewType(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 103
|
|
:cond_0
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public varargs addViewTypes([Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 1
|
|
|
|
.line 89
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
invoke-virtual {p0, v0, p1}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->addViewTypes(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;[Ljava/lang/String;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
.line 90
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public setAspectRatioType(FFLcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 1
|
|
|
|
.line 148
|
|
new-instance v0, Lcom/lky/toucheffectsmodule/bean/extra/ExtraAspectRatioBean;
|
|
|
|
invoke-direct {v0, p3, p1, p2}, Lcom/lky/toucheffectsmodule/bean/extra/ExtraAspectRatioBean;-><init>(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;FF)V
|
|
|
|
.line 149
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mExtraTypeMap:Ljava/util/HashMap;
|
|
|
|
sget-object p2, Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;->AspectRatio:Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;
|
|
|
|
invoke-virtual {p1, p2, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 150
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public setAspectRatioType(FLcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 3
|
|
|
|
const/high16 v0, 0x41200000 # 10.0f
|
|
|
|
cmpl-float v1, p1, v0
|
|
|
|
if-gtz v1, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
cmpg-float v1, p1, v1
|
|
|
|
if-lez v1, :cond_1
|
|
|
|
const/high16 v1, 0x3f800000 # 1.0f
|
|
|
|
cmpl-float v2, p1, v1
|
|
|
|
if-lez v2, :cond_0
|
|
|
|
div-float/2addr p1, v0
|
|
|
|
const v1, 0x3dcccccd # 0.1f
|
|
|
|
.line 170
|
|
:cond_0
|
|
new-instance v0, Lcom/lky/toucheffectsmodule/bean/extra/ExtraAspectRatioBean;
|
|
|
|
invoke-direct {v0, p2, p1, v1}, Lcom/lky/toucheffectsmodule/bean/extra/ExtraAspectRatioBean;-><init>(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;FF)V
|
|
|
|
.line 171
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mExtraTypeMap:Ljava/util/HashMap;
|
|
|
|
sget-object p2, Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;->AspectRatio:Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;
|
|
|
|
invoke-virtual {p1, p2, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 172
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
|
|
.line 162
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "\u5bbd\u9ad8\u6bd4\u4e0d\u80fd\u5927\u4e8e10\u6216\u5c0f\u4e8e\u7b49\u4e8e0"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public setListWholeType(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;)Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
.locals 0
|
|
|
|
.line 135
|
|
sput-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mListWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.line 136
|
|
sget-object p1, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->mInstance:Lcom/lky/toucheffectsmodule/TouchEffectsManager;
|
|
|
|
return-object p1
|
|
.end method
|