qq_37754504
qq_37754504
2017-06-28 13:31

新人求问,反编译后怎么去掉下面软件的启动图

  • 反编译 class

这是反编译后的class文件转java后的代码package org.apache.cordova.splashscreen;

import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.res.Configuration;
import android.view.View;
import android.widget.ImageView;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;

public class SplashScreen extends CordovaPlugin {
private static final boolean HAS_BUILT_IN_SPLASH_SCREEN;
private static final String LOG_TAG = "SplashScreen";
private static boolean firstShow = true;
private static ProgressDialog spinnerDialog;
private static Dialog splashDialog;
private int orientation;
private ImageView splashImageView;

static {
    boolean z = HAS_BUILT_IN_SPLASH_SCREEN;
    if (Integer.valueOf("4.1.0".split("\\.")[0]).intValue() < 4) {
        z = true;
    }
    HAS_BUILT_IN_SPLASH_SCREEN = z;
}

private View getView() {
    try {
        return (View) this.webView.getClass().getMethod("getView", new Class[0]).invoke(this.webView, new Object[0]);
    } catch (Exception e) {
        return (View) this.webView;
    }
}

private boolean isMaintainAspectRatio() {
    return this.preferences.getBoolean("SplashMaintainAspectRatio", HAS_BUILT_IN_SPLASH_SCREEN);
}

private void loadSpinner() {
    String string = this.webView.canGoBack() ? this.preferences.getString("LoadingDialog", null) : this.preferences.getString("LoadingPageDialog", null);
    if (string != null) {
        String str = "";
        String str2 = "Loading Application...";
        if (string.length() > 0) {
            int indexOf = string.indexOf(44);
            if (indexOf > 0) {
                str = string.substring(0, indexOf);
                str2 = string.substring(indexOf + 1);
            } else {
                str = "";
                str2 = string;
            }
        }
        spinnerStart(str, str2);
    }
}

private void removeSplashScreen() {
    this.cordova.getActivity().runOnUiThread(new SplashScreen$4(this));
}

private void showSplashScreen(boolean z) {
    int integer = this.preferences.getInteger("SplashScreenDelay", 3000);
    int integer2 = this.preferences.getInteger("SplashDrawableId", 0);
    if ((splashDialog != null && splashDialog.isShowing()) || integer2 == 0) {
        return;
    }
    if (integer > 0 || !z) {
        this.cordova.getActivity().runOnUiThread(new SplashScreen$5(this, integer2, z, integer));
    }
}

private void spinnerStart(String str, String str2) {
    this.cordova.getActivity().runOnUiThread(new SplashScreen$6(this, str, str2));
}

private void spinnerStop() {
    this.cordova.getActivity().runOnUiThread(new SplashScreen$7(this));
}

public boolean execute(String str, JSONArray jSONArray, CallbackContext callbackContext) throws JSONException {
    if (str.equals("hide")) {
        this.cordova.getActivity().runOnUiThread(new SplashScreen$1(this));
    } else if (str.equals("show")) {
        this.cordova.getActivity().runOnUiThread(new SplashScreen$2(this));
    } else if (!str.equals("spinnerStart")) {
        return HAS_BUILT_IN_SPLASH_SCREEN;
    } else {
        if (!HAS_BUILT_IN_SPLASH_SCREEN) {
            this.cordova.getActivity().runOnUiThread(new SplashScreen$3(this, jSONArray.getString(0), jSONArray.getString(1)));
        }
    }
    callbackContext.success();
    return true;
}

public void onConfigurationChanged(Configuration configuration) {
    if (configuration.orientation != this.orientation) {
        this.orientation = configuration.orientation;
        if (this.splashImageView != null) {
            int integer = this.preferences.getInteger("SplashDrawableId", 0);
            if (integer != 0) {
                this.splashImageView.setImageDrawable(this.cordova.getActivity().getResources().getDrawable(integer));
            }
        }
    }
}

public void onDestroy() {
    if (!HAS_BUILT_IN_SPLASH_SCREEN) {
        removeSplashScreen();
        firstShow = true;
    }
}

public Object onMessage(String str, Object obj) {
    if (!HAS_BUILT_IN_SPLASH_SCREEN) {
        if ("splashscreen".equals(str)) {
            if ("hide".equals(obj.toString())) {
                removeSplashScreen();
            } else {
                showSplashScreen(HAS_BUILT_IN_SPLASH_SCREEN);
            }
        } else if ("spinner".equals(str)) {
            if ("stop".equals(obj.toString())) {
                spinnerStop();
                getView().setVisibility(0);
            }
        } else if ("onReceivedError".equals(str)) {
            spinnerStop();
        }
    }
    return null;
}

public void onPause(boolean z) {
    if (!HAS_BUILT_IN_SPLASH_SCREEN) {
        removeSplashScreen();
    }
}

protected void pluginInitialize() {
    if (!HAS_BUILT_IN_SPLASH_SCREEN && firstShow) {
        getView().setVisibility(4);
        if (this.preferences.getInteger("SplashDrawableId", 0) == 0) {
            String string = this.preferences.getString(LOG_TAG, "screen");
            if (string != null) {
                int identifier = this.cordova.getActivity().getResources().getIdentifier(string, "drawable", this.cordova.getActivity().getClass().getPackage().getName());
                if (identifier == 0) {
                    identifier = this.cordova.getActivity().getResources().getIdentifier(string, "drawable", this.cordova.getActivity().getPackageName());
                }
                this.preferences.set("SplashDrawableId", identifier);
            }
        }
        this.orientation = this.cordova.getActivity().getResources().getConfiguration().orientation;
        firstShow = HAS_BUILT_IN_SPLASH_SCREEN;
        loadSpinner();
        showSplashScreen(true);
    }
}

}


线


线


线
这是反编译后的smali代码
.class public Lorg/apache/cordova/splashscreen/SplashScreen;
.super Lorg/apache/cordova/CordovaPlugin;
.source "SplashScreen.java"

static fields

.field private static final HAS_BUILT_IN_SPLASH_SCREEN:Z

.field private static final LOG_TAG:Ljava/lang/String; = "SplashScreen"

.field private static firstShow:Z

.field private static spinnerDialog:Landroid/app/ProgressDialog;

.field private static splashDialog:Landroid/app/Dialog;

instance fields

.field private orientation:I

.field private splashImageView:Landroid/widget/ImageView;

direct methods

.method static constructor ()V
.registers 4

.prologue
const/4 v1, 0x1

const/4 v0, 0x0

.line 46
const-string v2, "4.1.0"

const-string v3, "\\."

invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

move-result-object v2

aget-object v2, v2, v0

invoke-static {v2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

move-result v2

const/4 v3, 0x4

if-ge v2, v3, :cond_18

move v0, v1

:cond_18
sput-boolean v0, Lorg/apache/cordova/splashscreen/SplashScreen;->HAS_BUILT_IN_SPLASH_SCREEN:Z

.line 49
sput-boolean v1, Lorg/apache/cordova/splashscreen/SplashScreen;->firstShow:Z

return-void

.end method

.method public constructor ()V
.registers 1

.prologue
.line 42
invoke-direct {p0}, Lorg/apache/cordova/CordovaPlugin;-><init>()V

return-void

.end method

.method static synthetic access$000(Lorg/apache/cordova/splashscreen/SplashScreen;Ljava/lang/String;Ljava/lang/String;)V
.registers 3
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;
.param p1, "x1" # Ljava/lang/String;
.param p2, "x2" # Ljava/lang/String;

.prologue
.line 42
invoke-direct {p0, p1, p2}, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerStart(Ljava/lang/String;Ljava/lang/String;)V

return-void

.end method

.method static synthetic access$100()Landroid/app/Dialog;
.registers 1

.prologue
.line 42
sget-object v0, Lorg/apache/cordova/splashscreen/SplashScreen;->splashDialog:Landroid/app/Dialog;

return-object v0

.end method

.method static synthetic access$102(Landroid/app/Dialog;)Landroid/app/Dialog;
.registers 1
.param p0, "x0" # Landroid/app/Dialog;

.prologue
.line 42
sput-object p0, Lorg/apache/cordova/splashscreen/SplashScreen;->splashDialog:Landroid/app/Dialog;

return-object p0

.end method

.method static synthetic access$200(Lorg/apache/cordova/splashscreen/SplashScreen;)Landroid/widget/ImageView;
.registers 2
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;

.prologue
.line 42
iget-object v0, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->splashImageView:Landroid/widget/ImageView;

return-object v0

.end method

.method static synthetic access$202(Lorg/apache/cordova/splashscreen/SplashScreen;Landroid/widget/ImageView;)Landroid/widget/ImageView;
.registers 2
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;
.param p1, "x1" # Landroid/widget/ImageView;

.prologue
.line 42
iput-object p1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->splashImageView:Landroid/widget/ImageView;

return-object p1

.end method

.method static synthetic access$300(Lorg/apache/cordova/splashscreen/SplashScreen;)Lorg/apache/cordova/CordovaPreferences;
.registers 2
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;

.prologue
.line 42
iget-object v0, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

return-object v0

.end method

.method static synthetic access$400(Lorg/apache/cordova/splashscreen/SplashScreen;)Z
.registers 2
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;

.prologue
.line 42
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->isMaintainAspectRatio()Z

move-result v0

return v0

.end method

.method static synthetic access$500(Lorg/apache/cordova/splashscreen/SplashScreen;)V
.registers 1
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;

.prologue
.line 42
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->removeSplashScreen()V

return-void

.end method

.method static synthetic access$600(Lorg/apache/cordova/splashscreen/SplashScreen;)V
.registers 1
.param p0, "x0" # Lorg/apache/cordova/splashscreen/SplashScreen;

.prologue
.line 42
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerStop()V

return-void

.end method

.method static synthetic access$700()Landroid/app/ProgressDialog;
.registers 1

.prologue
.line 42
sget-object v0, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerDialog:Landroid/app/ProgressDialog;

return-object v0

.end method

.method static synthetic access$702(Landroid/app/ProgressDialog;)Landroid/app/ProgressDialog;
.registers 1
.param p0, "x0" # Landroid/app/ProgressDialog;

.prologue
.line 42
sput-object p0, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerDialog:Landroid/app/ProgressDialog;

return-object p0

.end method

.method private getView()Landroid/view/View;
.registers 5

.prologue
.line 64
:try_start_0
iget-object v1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->webView:Lorg/apache/cordova/CordovaWebView;

invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

move-result-object v1

const-string v2, "getView"

const/4 v3, 0x0

new-array v3, v3, [Ljava/lang/Class;

invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

move-result-object v1

iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->webView:Lorg/apache/cordova/CordovaWebView;

const/4 v3, 0x0

new-array v3, v3, [Ljava/lang/Object;

invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

move-result-object v1

check-cast v1, Landroid/view/View;
:try_end_1a
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_1a} :catch_1b

.line 66
:goto_1a
return-object v1

.line 65
:catch_1b
move-exception v0

.line 66
.local v0, "e":Ljava/lang/Exception;
iget-object v1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->webView:Lorg/apache/cordova/CordovaWebView;

check-cast v1, Landroid/view/View;

goto :goto_1a

.end method

.method private isMaintainAspectRatio()Z
.registers 4

.prologue
.line 101
iget-object v0, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v1, "SplashMaintainAspectRatio"

const/4 v2, 0x0

invoke-virtual {v0, v1, v2}, Lorg/apache/cordova/CordovaPreferences;->getBoolean(Ljava/lang/String;Z)Z

move-result v0

return v0

.end method

.method private loadSpinner()V
.registers 8

.prologue
const/4 v6, 0x0

.line 278
const/4 v1, 0x0

.line 279
.local v1, "loading":Ljava/lang/String;
iget-object v4, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->webView:Lorg/apache/cordova/CordovaWebView;

invoke-interface {v4}, Lorg/apache/cordova/CordovaWebView;->canGoBack()Z

move-result v4

if-eqz v4, :cond_35

.line 280
iget-object v4, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v5, "LoadingDialog"

invoke-virtual {v4, v5, v6}, Lorg/apache/cordova/CordovaPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

move-result-object v1

.line 285
:goto_12
if-eqz v1, :cond_34

.line 286
const-string v3, ""

.line 287
.local v3, "title":Ljava/lang/String;
const-string v2, "Loading Application..."

.line 289
.local v2, "message":Ljava/lang/String;
invoke-virtual {v1}, Ljava/lang/String;->length()I

move-result v4

if-lez v4, :cond_31

.line 290
const/16 v4, 0x2c

invoke-virtual {v1, v4}, Ljava/lang/String;->indexOf(I)I

move-result v0

.line 291
.local v0, "comma":I
if-lez v0, :cond_3e

.line 292
const/4 v4, 0x0

invoke-virtual {v1, v4, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

move-result-object v3

.line 293
add-int/lit8 v4, v0, 0x1

invoke-virtual {v1, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;

move-result-object v2

.line 300
.end local v0    # "comma":I
:cond_31
:goto_31
invoke-direct {p0, v3, v2}, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerStart(Ljava/lang/String;Ljava/lang/String;)V

.line 302
.end local v2    # "message":Ljava/lang/String;
.end local v3    # "title":Ljava/lang/String;
:cond_34
return-void

.line 283
:cond_35
iget-object v4, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v5, "LoadingPageDialog"

invoke-virtual {v4, v5, v6}, Lorg/apache/cordova/CordovaPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

move-result-object v1

goto :goto_12

.line 296
.restart local v0    # "comma":I
.restart local v2    # "message":Ljava/lang/String;
.restart local v3    # "title":Ljava/lang/String;
:cond_3e
const-string v3, ""

.line 297
move-object v2, v1

goto :goto_31

.end method

.method private removeSplashScreen()V
.registers 3

.prologue
.line 194
iget-object v0, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v0

new-instance v1, Lorg/apache/cordova/splashscreen/SplashScreen$4;

invoke-direct {v1, p0}, Lorg/apache/cordova/splashscreen/SplashScreen$4;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;)V

invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

.line 203
return-void

.end method

.method private showSplashScreen(Z)V
.registers 7
.param p1, "hideAfterDelay" # Z

.prologue
.line 210
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v3, "SplashScreenDelay"

const/16 v4, 0xbb8

invoke-virtual {v2, v3, v4}, Lorg/apache/cordova/CordovaPreferences;->getInteger(Ljava/lang/String;I)I

move-result v1

.line 211
.local v1, "splashscreenTime":I
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v3, "SplashDrawableId"

const/4 v4, 0x0

invoke-virtual {v2, v3, v4}, Lorg/apache/cordova/CordovaPreferences;->getInteger(Ljava/lang/String;I)I

move-result v0

.line 214
.local v0, "drawableId":I
sget-object v2, Lorg/apache/cordova/splashscreen/SplashScreen;->splashDialog:Landroid/app/Dialog;

if-eqz v2, :cond_20

sget-object v2, Lorg/apache/cordova/splashscreen/SplashScreen;->splashDialog:Landroid/app/Dialog;

invoke-virtual {v2}, Landroid/app/Dialog;->isShowing()Z

move-result v2

if-eqz v2, :cond_20

.line 271
:cond_1f
:goto_1f
return-void

.line 217
:cond_20
if-eqz v0, :cond_1f

if-gtz v1, :cond_26

if-nez p1, :cond_1f

.line 221
:cond_26
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

new-instance v3, Lorg/apache/cordova/splashscreen/SplashScreen$5;

invoke-direct {v3, p0, v0, p1, v1}, Lorg/apache/cordova/splashscreen/SplashScreen$5;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;IZI)V

invoke-virtual {v2, v3}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

goto :goto_1f

.end method

.method private spinnerStart(Ljava/lang/String;Ljava/lang/String;)V
.registers 5
.param p1, "title" # Ljava/lang/String;
.param p2, "message" # Ljava/lang/String;

.prologue
.line 305
iget-object v0, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v0

new-instance v1, Lorg/apache/cordova/splashscreen/SplashScreen$6;

invoke-direct {v1, p0, p1, p2}, Lorg/apache/cordova/splashscreen/SplashScreen$6;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;Ljava/lang/String;Ljava/lang/String;)V

invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

.line 316
return-void

.end method

.method private spinnerStop()V
.registers 3

.prologue
.line 319
iget-object v0, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v0

new-instance v1, Lorg/apache/cordova/splashscreen/SplashScreen$7;

invoke-direct {v1, p0}, Lorg/apache/cordova/splashscreen/SplashScreen$7;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;)V

invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

.line 327
return-void

.end method

virtual methods

.method public execute(Ljava/lang/String;Lorg/json/JSONArray;Lorg/apache/cordova/CallbackContext;)Z
.registers 9
.param p1, "action" # Ljava/lang/String;
.param p2, "args" # Lorg/json/JSONArray;
.param p3, "callbackContext" # Lorg/apache/cordova/CallbackContext;
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/json/JSONException;
}
.end annotation

.prologue
const/4 v3, 0x1

const/4 v2, 0x0

.line 126
const-string v4, "hide"

invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v4

if-eqz v4, :cond_1d

.line 127
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

new-instance v4, Lorg/apache/cordova/splashscreen/SplashScreen$1;

invoke-direct {v4, p0}, Lorg/apache/cordova/splashscreen/SplashScreen$1;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;)V

invoke-virtual {v2, v4}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

.line 152
:cond_18
:goto_18
invoke-virtual {p3}, Lorg/apache/cordova/CallbackContext;->success()V

move v2, v3

.line 153
:cond_1c
return v2

.line 132
:cond_1d
const-string v4, "show"

invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v4

if-eqz v4, :cond_34

.line 133
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

new-instance v4, Lorg/apache/cordova/splashscreen/SplashScreen$2;

invoke-direct {v4, p0}, Lorg/apache/cordova/splashscreen/SplashScreen$2;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;)V

invoke-virtual {v2, v4}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

goto :goto_18

.line 138
:cond_34
const-string v4, "spinnerStart"

invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v4

if-eqz v4, :cond_1c

.line 139
sget-boolean v4, Lorg/apache/cordova/splashscreen/SplashScreen;->HAS_BUILT_IN_SPLASH_SCREEN:Z

if-nez v4, :cond_18

.line 140
invoke-virtual {p2, v2}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;

move-result-object v1

.line 141
.local v1, "title":Ljava/lang/String;
invoke-virtual {p2, v3}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;

move-result-object v0

.line 142
.local v0, "message":Ljava/lang/String;
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

new-instance v4, Lorg/apache/cordova/splashscreen/SplashScreen$3;

invoke-direct {v4, p0, v1, v0}, Lorg/apache/cordova/splashscreen/SplashScreen$3;-><init>(Lorg/apache/cordova/splashscreen/SplashScreen;Ljava/lang/String;Ljava/lang/String;)V

invoke-virtual {v2, v4}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

goto :goto_18

.end method

.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
.registers 6
.param p1, "newConfig" # Landroid/content/res/Configuration;

.prologue
.line 180
iget v1, p1, Landroid/content/res/Configuration;->orientation:I

iget v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->orientation:I

if-eq v1, v2, :cond_2c

.line 181
iget v1, p1, Landroid/content/res/Configuration;->orientation:I

iput v1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->orientation:I

.line 184
iget-object v1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->splashImageView:Landroid/widget/ImageView;

if-eqz v1, :cond_2c

.line 185
iget-object v1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v2, "SplashDrawableId"

const/4 v3, 0x0

invoke-virtual {v1, v2, v3}, Lorg/apache/cordova/CordovaPreferences;->getInteger(Ljava/lang/String;I)I

move-result v0

.line 186
.local v0, "drawableId":I
if-eqz v0, :cond_2c

.line 187
iget-object v1, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->splashImageView:Landroid/widget/ImageView;

iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

invoke-virtual {v2}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

move-result-object v2

invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

move-result-object v2

invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

.line 191
.end local v0    # "drawableId":I
:cond_2c
return-void

.end method

.method public onDestroy()V
.registers 2

.prologue
.line 115
sget-boolean v0, Lorg/apache/cordova/splashscreen/SplashScreen;->HAS_BUILT_IN_SPLASH_SCREEN:Z

if-eqz v0, :cond_5

.line 122
:goto_4
return-void

.line 119
:cond_5
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->removeSplashScreen()V

.line 121
const/4 v0, 0x1

sput-boolean v0, Lorg/apache/cordova/splashscreen/SplashScreen;->firstShow:Z

goto :goto_4

.end method

.method public onMessage(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
.registers 7
.param p1, "id" # Ljava/lang/String;
.param p2, "data" # Ljava/lang/Object;

.prologue
const/4 v3, 0x0

const/4 v2, 0x0

.line 158
sget-boolean v0, Lorg/apache/cordova/splashscreen/SplashScreen;->HAS_BUILT_IN_SPLASH_SCREEN:Z

if-eqz v0, :cond_7

.line 175
:cond_6
:goto_6
return-object v3

.line 161
:cond_7
const-string v0, "splashscreen"

invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_23

.line 162
const-string v0, "hide"

invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_1f

.line 163
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->removeSplashScreen()V

goto :goto_6

.line 165
:cond_1f
invoke-direct {p0, v2}, Lorg/apache/cordova/splashscreen/SplashScreen;->showSplashScreen(Z)V

goto :goto_6

.line 167
:cond_23
const-string v0, "spinner"

invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_42

.line 168
const-string v0, "stop"

invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_6

.line 169
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerStop()V

.line 170
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->getView()Landroid/view/View;

move-result-object v0

invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

goto :goto_6

.line 172
:cond_42
const-string v0, "onReceivedError"

invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_6

.line 173
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->spinnerStop()V

goto :goto_6

.end method

.method public onPause(Z)V
.registers 3
.param p1, "multitasking" # Z

.prologue
.line 106
sget-boolean v0, Lorg/apache/cordova/splashscreen/SplashScreen;->HAS_BUILT_IN_SPLASH_SCREEN:Z

if-eqz v0, :cond_5

.line 111
:goto_4
return-void

.line 110
:cond_5
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->removeSplashScreen()V

goto :goto_4

.end method

.method protected pluginInitialize()V
.registers 7

.prologue
const/4 v5, 0x0

.line 72
sget-boolean v2, Lorg/apache/cordova/splashscreen/SplashScreen;->HAS_BUILT_IN_SPLASH_SCREEN:Z

if-nez v2, :cond_9

sget-boolean v2, Lorg/apache/cordova/splashscreen/SplashScreen;->firstShow:Z

if-nez v2, :cond_a

.line 95
:cond_9
:goto_9
return-void

.line 76
:cond_a
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->getView()Landroid/view/View;

move-result-object v2

const/4 v3, 0x4

invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V

.line 77
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v3, "SplashDrawableId"

invoke-virtual {v2, v3, v5}, Lorg/apache/cordova/CordovaPreferences;->getInteger(Ljava/lang/String;I)I

move-result v0

.line 78
.local v0, "drawableId":I
if-nez v0, :cond_6d

.line 79
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v3, "SplashScreen"

const-string v4, "screen"

invoke-virtual {v2, v3, v4}, Lorg/apache/cordova/CordovaPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

move-result-object v1

.line 80
.local v1, "splashResource":Ljava/lang/String;
if-eqz v1, :cond_6d

.line 81
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

invoke-virtual {v2}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

move-result-object v2

const-string v3, "drawable"

iget-object v4, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v4}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v4

invoke-virtual {v4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

move-result-object v4

invoke-virtual {v4}, Ljava/lang/Class;->getPackage()Ljava/lang/Package;

move-result-object v4

invoke-virtual {v4}, Ljava/lang/Package;->getName()Ljava/lang/String;

move-result-object v4

invoke-virtual {v2, v1, v3, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

move-result v0

.line 82
if-nez v0, :cond_66

.line 83
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

invoke-virtual {v2}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

move-result-object v2

const-string v3, "drawable"

iget-object v4, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v4}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v4

invoke-virtual {v4}, Landroid/app/Activity;->getPackageName()Ljava/lang/String;

move-result-object v4

invoke-virtual {v2, v1, v3, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

move-result v0

.line 85
:cond_66
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->preferences:Lorg/apache/cordova/CordovaPreferences;

const-string v3, "SplashDrawableId"

invoke-virtual {v2, v3, v0}, Lorg/apache/cordova/CordovaPreferences;->set(Ljava/lang/String;I)V

.line 90
.end local v1    # "splashResource":Ljava/lang/String;
:cond_6d
iget-object v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->cordova:Lorg/apache/cordova/CordovaInterface;

invoke-interface {v2}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

move-result-object v2

invoke-virtual {v2}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

move-result-object v2

invoke-virtual {v2}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

move-result-object v2

iget v2, v2, Landroid/content/res/Configuration;->orientation:I

iput v2, p0, Lorg/apache/cordova/splashscreen/SplashScreen;->orientation:I

.line 92
sput-boolean v5, Lorg/apache/cordova/splashscreen/SplashScreen;->firstShow:Z

.line 93
invoke-direct {p0}, Lorg/apache/cordova/splashscreen/SplashScreen;->loadSpinner()V

.line 94
const/4 v2, 0x1

invoke-direct {p0, v2}, Lorg/apache/cordova/splashscreen/SplashScreen;->showSplashScreen(Z)V

goto :goto_9

.end method

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答