ThemeEditorView.smali
.class public Lim/tpelyyftgw/ui/components/ThemeEditorView;
.super Ljava/lang/Object;
.source "ThemeEditorView.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
}
.end annotation
# static fields
.field private static volatile Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
# instance fields
.field private currentThemeDesription:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lim/tpelyyftgw/ui/actionbar/ThemeDescription;",
">;"
}
.end annotation
.end field
.field private currentThemeDesriptionPosition:I
.field private decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
.field private editorAlert:Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
.field private final editorHeight:I
.field private final editorWidth:I
.field private hidden:Z
.field private parentActivity:Landroid/app/Activity;
.field private preferences:Landroid/content/SharedPreferences;
.field private themeInfo:Lim/tpelyyftgw/ui/actionbar/Theme$ThemeInfo;
.field private wallpaperUpdater:Lim/tpelyyftgw/ui/components/WallpaperUpdater;
.field private windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
.field private windowManager:Landroid/view/WindowManager;
.field private windowView:Landroid/widget/FrameLayout;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 96
const/4 v0, 0x0
sput-object v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
return-void
.end method
.method public constructor <init>()V
.registers 3
.line 73
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 83
const/high16 v0, 0x42580000 # 54.0f
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
iput v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
.line 84
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v0
iput v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorHeight:I
return-void
.end method
.method static synthetic access$1100(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Ljava/util/ArrayList;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->currentThemeDesription:Ljava/util/ArrayList;
return-object v0
.end method
.method static synthetic access$1102(Lim/tpelyyftgw/ui/components/ThemeEditorView;Ljava/util/ArrayList;)Ljava/util/ArrayList;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.param p1, "x1" # Ljava/util/ArrayList;
.line 73
iput-object p1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->currentThemeDesription:Ljava/util/ArrayList;
return-object p1
.end method
.method static synthetic access$4000(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Landroid/view/animation/DecelerateInterpolator;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
return-object v0
.end method
.method static synthetic access$4400(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Landroid/app/Activity;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
return-object v0
.end method
.method static synthetic access$4500(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Lim/tpelyyftgw/ui/actionbar/Theme$ThemeInfo;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->themeInfo:Lim/tpelyyftgw/ui/actionbar/Theme$ThemeInfo;
return-object v0
.end method
.method static synthetic access$4700(Lim/tpelyyftgw/ui/components/ThemeEditorView;)I
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->currentThemeDesriptionPosition:I
return v0
.end method
.method static synthetic access$4702(Lim/tpelyyftgw/ui/components/ThemeEditorView;I)I
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.param p1, "x1" # I
.line 73
iput p1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->currentThemeDesriptionPosition:I
return p1
.end method
.method static synthetic access$5000(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Lim/tpelyyftgw/ui/components/WallpaperUpdater;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->wallpaperUpdater:Lim/tpelyyftgw/ui/components/WallpaperUpdater;
return-object v0
.end method
.method static synthetic access$5100(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorAlert:Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
return-object v0
.end method
.method static synthetic access$5102(Lim/tpelyyftgw/ui/components/ThemeEditorView;Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;)Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.param p1, "x1" # Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
.line 73
iput-object p1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorAlert:Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
return-object p1
.end method
.method static synthetic access$5200(Lim/tpelyyftgw/ui/components/ThemeEditorView;)V
.registers 1
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->hide()V
return-void
.end method
.method static synthetic access$5300(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Landroid/view/WindowManager$LayoutParams;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
return-object v0
.end method
.method static synthetic access$5400(Lim/tpelyyftgw/ui/components/ThemeEditorView;)I
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
return v0
.end method
.method static synthetic access$5500(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Landroid/widget/FrameLayout;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
return-object v0
.end method
.method static synthetic access$5600(Lim/tpelyyftgw/ui/components/ThemeEditorView;)Landroid/view/WindowManager;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
return-object v0
.end method
.method static synthetic access$5700(Lim/tpelyyftgw/ui/components/ThemeEditorView;)V
.registers 1
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->animateToBoundsMaybe()V
return-void
.end method
.method static synthetic access$5800(Lim/tpelyyftgw/ui/components/ThemeEditorView;)V
.registers 1
.param p0, "x0" # Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 73
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->show()V
return-void
.end method
.method private animateToBoundsMaybe()V
.registers 18
.line 1618
move-object/from16 v0, p0
iget v1, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x1
invoke-static {v4, v3, v2, v1}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v1
.line 1619
.local v1, "startX":I
iget v5, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
invoke-static {v4, v4, v2, v5}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v5
.line 1620
.local v5, "endX":I
iget v6, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorHeight:I
invoke-static {v3, v3, v2, v6}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v6
.line 1621
.local v6, "startY":I
iget v7, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorHeight:I
invoke-static {v3, v4, v2, v7}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v7
.line 1622
.local v7, "endY":I
const/4 v8, 0x0
.line 1623
.local v8, "animators":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/animation/Animator;>;"
iget-object v9, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v9
.line 1624
.local v9, "editor":Landroid/content/SharedPreferences$Editor;
const/high16 v10, 0x41a00000 # 20.0f
invoke-static {v10}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v10
.line 1625
.local v10, "maxDiff":I
const/4 v11, 0x0
.line 1626
.local v11, "slideOut":Z
iget-object v12, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v12, v12, Landroid/view/WindowManager$LayoutParams;->x:I
sub-int v12, v1, v12
invoke-static {v12}, Ljava/lang/Math;->abs(I)I
move-result v12
const-string v14, "sidex"
const-string v15, "x"
const/high16 v16, 0x3f800000 # 1.0f
if-le v12, v10, :cond_f8
iget-object v12, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v12, v12, Landroid/view/WindowManager$LayoutParams;->x:I
if-gez v12, :cond_50
iget-object v12, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v12, v12, Landroid/view/WindowManager$LayoutParams;->x:I
iget v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
neg-int v2, v2
div-int/lit8 v2, v2, 0x4
if-le v12, v2, :cond_50
goto/16 :goto_f8
.line 1635
:cond_50
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I
sub-int v2, v5, v2
invoke-static {v2}, Ljava/lang/Math;->abs(I)I
move-result v2
if-le v2, v10, :cond_c8
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I
sget-object v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;
iget v12, v12, Landroid/graphics/Point;->x:I
iget v13, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
sub-int/2addr v12, v13
if-le v2, v12, :cond_7b
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I
sget-object v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;
iget v12, v12, Landroid/graphics/Point;->x:I
iget v13, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
div-int/lit8 v13, v13, 0x4
mul-int/lit8 v13, v13, 0x3
sub-int/2addr v12, v13
if-ge v2, v12, :cond_7b
goto :goto_c8
.line 1644
:cond_7b
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
invoke-virtual {v2}, Landroid/widget/FrameLayout;->getAlpha()F
move-result v2
cmpl-float v2, v2, v16
if-eqz v2, :cond_b4
.line 1645
if-nez v8, :cond_8d
.line 1646
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
move-object v8, v2
.line 1648
:cond_8d
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I
if-gez v2, :cond_a2
.line 1649
new-array v2, v4, [I
iget v12, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
neg-int v12, v12
aput v12, v2, v3
invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_b1
.line 1651
:cond_a2
new-array v2, v4, [I
sget-object v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;
iget v12, v12, Landroid/graphics/Point;->x:I
aput v12, v2, v3
invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1653
:goto_b1
const/4 v11, 0x1
goto/16 :goto_127
.line 1655
:cond_b4
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I
sub-int/2addr v2, v1
int-to-float v2, v2
sub-int v12, v5, v1
int-to-float v12, v12
div-float/2addr v2, v12
const-string v12, "px"
invoke-interface {v9, v12, v2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;
.line 1656
const/4 v2, 0x2
invoke-interface {v9, v14, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
goto :goto_127
.line 1636
:cond_c8
:goto_c8
if-nez v8, :cond_d0
.line 1637
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
move-object v8, v2
.line 1639
:cond_d0
invoke-interface {v9, v14, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
.line 1640
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
invoke-virtual {v2}, Landroid/widget/FrameLayout;->getAlpha()F
move-result v2
cmpl-float v2, v2, v16
if-eqz v2, :cond_ec
.line 1641
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
sget-object v12, Landroid/view/View;->ALPHA:Landroid/util/Property;
new-array v13, v4, [F
aput v16, v13, v3
invoke-static {v2, v12, v13}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1643
:cond_ec
new-array v2, v4, [I
aput v5, v2, v3
invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_127
.line 1627
:cond_f8
:goto_f8
if-nez v8, :cond_100
.line 1628
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
move-object v8, v2
.line 1630
:cond_100
invoke-interface {v9, v14, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
.line 1631
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
invoke-virtual {v2}, Landroid/widget/FrameLayout;->getAlpha()F
move-result v2
cmpl-float v2, v2, v16
if-eqz v2, :cond_11c
.line 1632
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
sget-object v12, Landroid/view/View;->ALPHA:Landroid/util/Property;
new-array v13, v4, [F
aput v16, v13, v3
invoke-static {v2, v12, v13}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1634
:cond_11c
new-array v2, v4, [I
aput v1, v2, v3
invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1658
:goto_127
if-nez v11, :cond_194
.line 1659
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I
sub-int v2, v6, v2
invoke-static {v2}, Ljava/lang/Math;->abs(I)I
move-result v2
const-string v12, "y"
const-string v13, "sidey"
if-le v2, v10, :cond_17b
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I
invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I
move-result v14
if-gt v2, v14, :cond_144
goto :goto_17b
.line 1665
:cond_144
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I
sub-int v2, v7, v2
invoke-static {v2}, Ljava/lang/Math;->abs(I)I
move-result v2
if-gt v2, v10, :cond_167
.line 1666
if-nez v8, :cond_158
.line 1667
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
move-object v8, v2
.line 1669
:cond_158
invoke-interface {v9, v13, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
.line 1670
new-array v2, v4, [I
aput v7, v2, v3
invoke-static {v0, v12, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_191
.line 1672
:cond_167
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I
sub-int/2addr v2, v6
int-to-float v2, v2
sub-int v12, v7, v6
int-to-float v12, v12
div-float/2addr v2, v12
const-string v12, "py"
invoke-interface {v9, v12, v2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;
.line 1673
const/4 v2, 0x2
invoke-interface {v9, v13, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
goto :goto_191
.line 1660
:cond_17b
:goto_17b
if-nez v8, :cond_183
.line 1661
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
move-object v8, v2
.line 1663
:cond_183
invoke-interface {v9, v13, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
.line 1664
new-array v2, v4, [I
aput v6, v2, v3
invoke-static {v0, v12, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
move-result-object v2
invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1675
:goto_191
invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z
.line 1677
:cond_194
if-eqz v8, :cond_1d0
.line 1678
iget-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
if-nez v2, :cond_1a1
.line 1679
new-instance v2, Landroid/view/animation/DecelerateInterpolator;
invoke-direct {v2}, Landroid/view/animation/DecelerateInterpolator;-><init>()V
iput-object v2, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
.line 1681
:cond_1a1
new-instance v2, Landroid/animation/AnimatorSet;
invoke-direct {v2}, Landroid/animation/AnimatorSet;-><init>()V
.line 1682
.local v2, "animatorSet":Landroid/animation/AnimatorSet;
iget-object v12, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
invoke-virtual {v2, v12}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 1683
const-wide/16 v12, 0x96
invoke-virtual {v2, v12, v13}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 1684
if-eqz v11, :cond_1ca
.line 1685
iget-object v12, v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
sget-object v13, Landroid/view/View;->ALPHA:Landroid/util/Property;
new-array v4, v4, [F
const/4 v14, 0x0
aput v14, v4, v3
invoke-static {v12, v13, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v3
invoke-virtual {v8, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1686
new-instance v3, Lim/tpelyyftgw/ui/components/ThemeEditorView$4;
invoke-direct {v3, v0}, Lim/tpelyyftgw/ui/components/ThemeEditorView$4;-><init>(Lim/tpelyyftgw/ui/components/ThemeEditorView;)V
invoke-virtual {v2, v3}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V
.line 1694
:cond_1ca
invoke-virtual {v2, v8}, Landroid/animation/AnimatorSet;->playTogether(Ljava/util/Collection;)V
.line 1695
invoke-virtual {v2}, Landroid/animation/AnimatorSet;->start()V
.line 1697
.end local v2 # "animatorSet":Landroid/animation/AnimatorSet;
:cond_1d0
return-void
.end method
.method public static getInstance()Lim/tpelyyftgw/ui/components/ThemeEditorView;
.registers 1
.line 98
sget-object v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
return-object v0
.end method
.method private static getSideCoord(ZIFI)I
.registers 7
.param p0, "isX" # Z
.param p1, "side" # I
.param p2, "p" # F
.param p3, "sideSize" # I
.line 1528
if-eqz p0, :cond_8
.line 1529
sget-object v0, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;
iget v0, v0, Landroid/graphics/Point;->x:I
sub-int/2addr v0, p3
.local v0, "total":I
goto :goto_12
.line 1531
.end local v0 # "total":I
:cond_8
sget-object v0, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;
iget v0, v0, Landroid/graphics/Point;->y:I
sub-int/2addr v0, p3
invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I
move-result v1
sub-int/2addr v0, v1
.line 1534
.restart local v0 # "total":I
:goto_12
const/high16 v1, 0x41200000 # 10.0f
if-nez p1, :cond_1b
.line 1535
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
.local v1, "result":I
goto :goto_39
.line 1536
.end local v1 # "result":I
:cond_1b
const/4 v2, 0x1
if-ne p1, v2, :cond_25
.line 1537
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
sub-int v1, v0, v1
.restart local v1 # "result":I
goto :goto_39
.line 1539
.end local v1 # "result":I
:cond_25
const/high16 v2, 0x41a00000 # 20.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
sub-int v2, v0, v2
int-to-float v2, v2
mul-float v2, v2, p2
invoke-static {v2}, Ljava/lang/Math;->round(F)I
move-result v2
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
add-int/2addr v1, v2
.line 1541
.restart local v1 # "result":I
:goto_39
if-nez p0, :cond_40
.line 1542
invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I
move-result v2
add-int/2addr v1, v2
.line 1544
:cond_40
return v1
.end method
.method private hide()V
.registers 11
.line 1548
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
if-nez v0, :cond_5
.line 1549
return-void
.line 1552
:cond_5
:try_start_5
new-instance v0, Landroid/animation/AnimatorSet;
invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V
.line 1553
.local v0, "animatorSet":Landroid/animation/AnimatorSet;
const/4 v1, 0x3
new-array v1, v1, [Landroid/animation/Animator;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
sget-object v3, Landroid/view/View;->ALPHA:Landroid/util/Property;
const/4 v4, 0x2
new-array v5, v4, [F
const/high16 v6, 0x3f800000 # 1.0f
const/4 v7, 0x0
aput v6, v5, v7
const/4 v8, 0x0
const/4 v9, 0x1
aput v8, v5, v9
invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
aput-object v2, v1, v7
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
const-string v3, "scaleX"
new-array v5, v4, [F
aput v6, v5, v7
aput v8, v5, v9
.line 1554
invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
aput-object v2, v1, v9
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
const-string v3, "scaleY"
new-array v5, v4, [F
aput v6, v5, v7
aput v8, v5, v9
.line 1555
invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
aput-object v2, v1, v4
.line 1553
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
.line 1556
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 1557
const-wide/16 v1, 0x96
invoke-virtual {v0, v1, v2}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 1558
new-instance v1, Lim/tpelyyftgw/ui/components/ThemeEditorView$3;
invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView$3;-><init>(Lim/tpelyyftgw/ui/components/ThemeEditorView;)V
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V
.line 1566
invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V
.line 1567
iput-boolean v9, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->hidden:Z
:try_end_5d
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5d} :catch_5e
.line 1570
.end local v0 # "animatorSet":Landroid/animation/AnimatorSet;
goto :goto_5f
.line 1568
:catch_5e
move-exception v0
.line 1571
:goto_5f
return-void
.end method
.method private show()V
.registers 4
.line 1574
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
if-nez v0, :cond_5
.line 1575
return-void
.line 1578
:cond_5
:try_start_5
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 1579
const/4 v0, 0x0
iput-boolean v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->hidden:Z
.line 1580
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->showWithAnimation()V
:try_end_14
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_14} :catch_15
.line 1583
goto :goto_16
.line 1581
:catch_15
move-exception v0
.line 1584
:goto_16
return-void
.end method
.method private showWithAnimation()V
.registers 7
.line 1517
new-instance v0, Landroid/animation/AnimatorSet;
invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V
.line 1518
.local v0, "animatorSet":Landroid/animation/AnimatorSet;
const/4 v1, 0x3
new-array v1, v1, [Landroid/animation/Animator;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
sget-object v3, Landroid/view/View;->ALPHA:Landroid/util/Property;
const/4 v4, 0x2
new-array v5, v4, [F
fill-array-data v5, :array_4a
invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
const/4 v3, 0x0
aput-object v2, v1, v3
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
new-array v3, v4, [F
fill-array-data v3, :array_52
.line 1519
const-string v5, "scaleX"
invoke-static {v2, v5, v3}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
const/4 v3, 0x1
aput-object v2, v1, v3
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
new-array v3, v4, [F
fill-array-data v3, :array_5a
.line 1520
const-string v5, "scaleY"
invoke-static {v2, v5, v3}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
move-result-object v2
aput-object v2, v1, v4
.line 1518
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
.line 1521
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 1522
const-wide/16 v1, 0x96
invoke-virtual {v0, v1, v2}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 1523
invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V
.line 1524
return-void
nop
:array_4a
.array-data 4
0x0
0x3f800000 # 1.0f
.end array-data
:array_52
.array-data 4
0x0
0x3f800000 # 1.0f
.end array-data
:array_5a
.array-data 4
0x0
0x3f800000 # 1.0f
.end array-data
.end method
# virtual methods
.method public close()V
.registers 3
.line 1588
:try_start_0
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
invoke-interface {v0, v1}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V
:try_end_7
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_7} :catch_8
.line 1591
goto :goto_9
.line 1589
:catch_8
move-exception v0
.line 1592
:goto_9
const/4 v0, 0x0
iput-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
.line 1593
return-void
.end method
.method public destroy()V
.registers 4
.line 102
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->wallpaperUpdater:Lim/tpelyyftgw/ui/components/WallpaperUpdater;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/WallpaperUpdater;->cleanup()V
.line 103
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
if-eqz v0, :cond_30
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
if-nez v0, :cond_e
goto :goto_30
.line 107
:cond_e
const/4 v1, 0x0
:try_start_f
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
invoke-interface {v2, v0}, Landroid/view/WindowManager;->removeViewImmediate(Landroid/view/View;)V
.line 108
iput-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
:try_end_16
.catch Ljava/lang/Exception; {:try_start_f .. :try_end_16} :catch_17
.line 111
goto :goto_1b
.line 109
:catch_17
move-exception v0
.line 110
.local v0, "e":Ljava/lang/Exception;
invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
.line 113
.end local v0 # "e":Ljava/lang/Exception;
:goto_1b
:try_start_1b
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorAlert:Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
if-eqz v0, :cond_26
.line 114
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorAlert:Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;->dismiss()V
.line 115
iput-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorAlert:Lim/tpelyyftgw/ui/components/ThemeEditorView$EditorAlert;
:try_end_26
.catch Ljava/lang/Exception; {:try_start_1b .. :try_end_26} :catch_27
.line 119
:cond_26
goto :goto_2b
.line 117
:catch_27
move-exception v0
.line 118
.restart local v0 # "e":Ljava/lang/Exception;
invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
.line 120
.end local v0 # "e":Ljava/lang/Exception;
:goto_2b
iput-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
.line 121
sput-object v1, Lim/tpelyyftgw/ui/components/ThemeEditorView;->Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 122
return-void
.line 104
:cond_30
:goto_30
return-void
.end method
.method public getX()I
.registers 2
.line 1700
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v0, v0, Landroid/view/WindowManager$LayoutParams;->x:I
return v0
.end method
.method public getY()I
.registers 2
.line 1704
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v0, v0, Landroid/view/WindowManager$LayoutParams;->y:I
return v0
.end method
.method public onActivityResult(IILandroid/content/Intent;)V
.registers 5
.param p1, "requestCode" # I
.param p2, "resultCode" # I
.param p3, "data" # Landroid/content/Intent;
.line 1612
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->wallpaperUpdater:Lim/tpelyyftgw/ui/components/WallpaperUpdater;
if-eqz v0, :cond_7
.line 1613
invoke-virtual {v0, p1, p2, p3}, Lim/tpelyyftgw/ui/components/WallpaperUpdater;->onActivityResult(IILandroid/content/Intent;)V
.line 1615
:cond_7
return-void
.end method
.method public onConfigurationChanged()V
.registers 9
.line 1596
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const/4 v1, 0x1
const-string v2, "sidex"
invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
.line 1597
.local v0, "sidex":I
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const/4 v3, 0x0
const-string v4, "sidey"
invoke-interface {v2, v4, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v2
.line 1598
.local v2, "sidey":I
iget-object v4, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const/4 v5, 0x0
const-string v6, "px"
invoke-interface {v4, v6, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
move-result v4
.line 1599
.local v4, "px":F
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const-string v7, "py"
invoke-interface {v6, v7, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
move-result v5
.line 1600
.local v5, "py":F
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v7, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
invoke-static {v1, v0, v4, v7}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v1
iput v1, v6, Landroid/view/WindowManager$LayoutParams;->x:I
.line 1601
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorHeight:I
invoke-static {v3, v2, v5, v6}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v3
iput v3, v1, Landroid/view/WindowManager$LayoutParams;->y:I
.line 1603
:try_start_37
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
invoke-virtual {v1}, Landroid/widget/FrameLayout;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-eqz v1, :cond_48
.line 1604
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
iget-object v3, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v1, v3, v6}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
:try_end_48
.catch Ljava/lang/Exception; {:try_start_37 .. :try_end_48} :catch_49
.line 1608
:cond_48
goto :goto_4d
.line 1606
:catch_49
move-exception v1
.line 1607
.local v1, "e":Ljava/lang/Exception;
invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
.line 1609
.end local v1 # "e":Ljava/lang/Exception;
:goto_4d
return-void
.end method
.method public setX(I)V
.registers 5
.param p1, "value" # I
.line 1709
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->x:I
.line 1710
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 1711
return-void
.end method
.method public setY(I)V
.registers 5
.param p1, "value" # I
.line 1715
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->y:I
.line 1716
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 1717
return-void
.end method
.method public show(Landroid/app/Activity;Lim/tpelyyftgw/ui/actionbar/Theme$ThemeInfo;)V
.registers 11
.param p1, "activity" # Landroid/app/Activity;
.param p2, "theme" # Lim/tpelyyftgw/ui/actionbar/Theme$ThemeInfo;
.line 1353
sget-object v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
if-eqz v0, :cond_9
.line 1354
sget-object v0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->destroy()V
.line 1356
:cond_9
const/4 v0, 0x0
iput-boolean v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->hidden:Z
.line 1357
iput-object p2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->themeInfo:Lim/tpelyyftgw/ui/actionbar/Theme$ThemeInfo;
.line 1358
new-instance v1, Lim/tpelyyftgw/ui/components/ThemeEditorView$1;
invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/components/ThemeEditorView$1;-><init>(Lim/tpelyyftgw/ui/components/ThemeEditorView;Landroid/content/Context;)V
iput-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
.line 1468
const v2, 0x7f080391
invoke-virtual {v1, v2}, Landroid/widget/FrameLayout;->setBackgroundResource(I)V
.line 1469
const-string v1, "window"
invoke-virtual {p1, v1}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/view/WindowManager;
iput-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
.line 1471
sget-object v1, Lim/tpelyyftgw/messenger/ApplicationLoader;->applicationContext:Landroid/content/Context;
const-string v2, "themeconfig"
invoke-virtual {v1, v2, v0}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v1
iput-object v1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
.line 1473
const/4 v2, 0x1
const-string v3, "sidex"
invoke-interface {v1, v3, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
.line 1474
.local v1, "sidex":I
iget-object v3, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const-string v4, "sidey"
invoke-interface {v3, v4, v0}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v3
.line 1475
.local v3, "sidey":I
iget-object v4, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const/4 v5, 0x0
const-string v6, "px"
invoke-interface {v4, v6, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
move-result v4
.line 1476
.local v4, "px":F
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->preferences:Landroid/content/SharedPreferences;
const-string v7, "py"
invoke-interface {v6, v7, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
move-result v5
.line 1479
.local v5, "py":F
:try_start_4f
new-instance v6, Landroid/view/WindowManager$LayoutParams;
invoke-direct {v6}, Landroid/view/WindowManager$LayoutParams;-><init>()V
iput-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
.line 1480
iget v7, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
iput v7, v6, Landroid/view/WindowManager$LayoutParams;->width:I
.line 1481
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v7, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorHeight:I
iput v7, v6, Landroid/view/WindowManager$LayoutParams;->height:I
.line 1482
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v7, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorWidth:I
invoke-static {v2, v1, v4, v7}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v2
iput v2, v6, Landroid/view/WindowManager$LayoutParams;->x:I
.line 1483
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
iget v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->editorHeight:I
invoke-static {v0, v3, v5, v6}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->getSideCoord(ZIFI)I
move-result v0
iput v0, v2, Landroid/view/WindowManager$LayoutParams;->y:I
.line 1484
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
const/4 v2, -0x3
iput v2, v0, Landroid/view/WindowManager$LayoutParams;->format:I
.line 1485
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
const/16 v2, 0x33
iput v2, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I
.line 1486
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
const/16 v2, 0x63
iput v2, v0, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1487
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
const v2, 0x1000208
iput v2, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
.line 1488
iget-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowManager:Landroid/view/WindowManager;
iget-object v2, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowView:Landroid/widget/FrameLayout;
iget-object v6, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v0, v2, v6}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
:try_end_95
.catch Ljava/lang/Exception; {:try_start_4f .. :try_end_95} :catch_ab
.line 1492
nop
.line 1493
new-instance v0, Lim/tpelyyftgw/ui/components/WallpaperUpdater;
const/4 v2, 0x0
new-instance v6, Lim/tpelyyftgw/ui/components/ThemeEditorView$2;
invoke-direct {v6, p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView$2;-><init>(Lim/tpelyyftgw/ui/components/ThemeEditorView;)V
invoke-direct {v0, p1, v2, v6}, Lim/tpelyyftgw/ui/components/WallpaperUpdater;-><init>(Landroid/app/Activity;Lim/tpelyyftgw/ui/actionbar/BaseFragment;Lim/tpelyyftgw/ui/components/WallpaperUpdater$WallpaperUpdaterDelegate;)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->wallpaperUpdater:Lim/tpelyyftgw/ui/components/WallpaperUpdater;
.line 1511
sput-object p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->Instance:Lim/tpelyyftgw/ui/components/ThemeEditorView;
.line 1512
iput-object p1, p0, Lim/tpelyyftgw/ui/components/ThemeEditorView;->parentActivity:Landroid/app/Activity;
.line 1513
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/ThemeEditorView;->showWithAnimation()V
.line 1514
return-void
.line 1489
:catch_ab
move-exception v0
.line 1490
.local v0, "e":Ljava/lang/Exception;
invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
.line 1491
return-void
.end method