UniMPDefSplash.smali
.class public Lio/dcloud/feature/internal/splash/UniMPDefSplash;
.super Ljava/lang/Object;
# interfaces
.implements Lio/dcloud/feature/sdk/Interface/IDCUniMPAppSplashView;
# instance fields
.field background:Lio/dcloud/feature/internal/splash/SplashViewDBackground;
.field bitmap:Landroid/graphics/Bitmap;
# direct methods
.method public constructor <init>()V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
.line 3
iput-object v0, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->bitmap:Landroid/graphics/Bitmap;
return-void
.end method
# virtual methods
.method public getSplashView(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/view/View;
.registers 7
.line 1
new-instance p2, Lio/dcloud/feature/internal/splash/SplashViewDBackground;
iget-object v0, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->bitmap:Landroid/graphics/Bitmap;
const/4 v1, 0x0
invoke-direct {p2, p1, v0, p3, v1}, Lio/dcloud/feature/internal/splash/SplashViewDBackground;-><init>(Landroid/content/Context;Landroid/graphics/Bitmap;Ljava/lang/String;Z)V
iput-object p2, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->background:Lio/dcloud/feature/internal/splash/SplashViewDBackground;
.line 2
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string p3, "getSplashView--------------"
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
const-string p3, "shutao"
invoke-static {p3, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 3
invoke-static {p4}, Lio/dcloud/common/util/PdrUtil;->isEmpty(Ljava/lang/Object;)Z
move-result p2
if-nez p2, :cond_3b
.line 4
invoke-static {p1}, Lcom/bumptech/glide/Glide;->with(Landroid/content/Context;)Lcom/bumptech/glide/RequestManager;
move-result-object p1
.line 5
invoke-virtual {p1}, Lcom/bumptech/glide/RequestManager;->asBitmap()Lcom/bumptech/glide/RequestBuilder;
move-result-object p1
.line 6
invoke-virtual {p1, p4}, Lcom/bumptech/glide/RequestBuilder;->load(Ljava/lang/String;)Lcom/bumptech/glide/RequestBuilder;
move-result-object p1
new-instance p2, Lio/dcloud/feature/internal/splash/UniMPDefSplash$a;
invoke-direct {p2, p0}, Lio/dcloud/feature/internal/splash/UniMPDefSplash$a;-><init>(Lio/dcloud/feature/internal/splash/UniMPDefSplash;)V
.line 7
invoke-virtual {p1, p2}, Lcom/bumptech/glide/RequestBuilder;->into(Lcom/bumptech/glide/request/target/Target;)Lcom/bumptech/glide/request/target/Target;
goto :goto_52
.line 18
:cond_3b
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object p2
invoke-virtual {p1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
move-result-object p1
iget p1, p1, Landroid/content/pm/ApplicationInfo;->icon:I
invoke-static {p2, p1}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;
move-result-object p1
iput-object p1, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->bitmap:Landroid/graphics/Bitmap;
if-eqz p1, :cond_52
.line 20
iget-object p2, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->background:Lio/dcloud/feature/internal/splash/SplashViewDBackground;
invoke-virtual {p2, p1}, Lio/dcloud/feature/internal/splash/SplashViewDBackground;->setImageBitmap(Landroid/graphics/Bitmap;)V
.line 23
:cond_52
:goto_52
iget-object p1, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->background:Lio/dcloud/feature/internal/splash/SplashViewDBackground;
return-object p1
.end method
.method public onCloseSplash(Landroid/view/ViewGroup;)V
.registers 3
.line 1
iget-object v0, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->background:Lio/dcloud/feature/internal/splash/SplashViewDBackground;
invoke-virtual {p1, v0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
const/4 p1, 0x0
.line 2
iput-object p1, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->background:Lio/dcloud/feature/internal/splash/SplashViewDBackground;
.line 3
iget-object p1, p0, Lio/dcloud/feature/internal/splash/UniMPDefSplash;->bitmap:Landroid/graphics/Bitmap;
if-eqz p1, :cond_f
.line 4
invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V
:cond_f
return-void
.end method