JsBaseInterfaceHolder.smali
.class public abstract Lcom/just/agentweb/JsBaseInterfaceHolder;
.super Ljava/lang/Object;
.source "JsBaseInterfaceHolder.java"
# interfaces
.implements Lcom/just/agentweb/JsInterfaceHolder;
# instance fields
.field private mSecurityType:Lcom/just/agentweb/AgentWeb$SecurityType;
.field private mWebCreator:Lcom/just/agentweb/WebCreator;
# direct methods
.method protected constructor <init>(Lcom/just/agentweb/WebCreator;Lcom/just/agentweb/AgentWeb$SecurityType;)V
.registers 3
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p2, p0, Lcom/just/agentweb/JsBaseInterfaceHolder;->mSecurityType:Lcom/just/agentweb/AgentWeb$SecurityType;
.line 3
iput-object p1, p0, Lcom/just/agentweb/JsBaseInterfaceHolder;->mWebCreator:Lcom/just/agentweb/WebCreator;
return-void
.end method
# virtual methods
.method public checkObject(Ljava/lang/Object;)Z
.registers 11
.line 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/4 v1, 0x1
const/16 v2, 0x11
if-ge v0, v2, :cond_8
return v1
.line 2
:cond_8
iget-object v0, p0, Lcom/just/agentweb/JsBaseInterfaceHolder;->mWebCreator:Lcom/just/agentweb/WebCreator;
invoke-interface {v0}, Lcom/just/agentweb/WebCreator;->getWebViewType()I
move-result v0
const/4 v2, 0x2
if-ne v0, v2, :cond_12
return v1
.line 3
:cond_12
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
.line 4
invoke-virtual {p1}, Ljava/lang/Class;->getMethods()[Ljava/lang/reflect/Method;
move-result-object p1
.line 5
array-length v0, p1
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x0
:goto_1e
if-ge v3, v0, :cond_3b
aget-object v5, p1, v3
.line 6
invoke-virtual {v5}, Ljava/lang/reflect/Method;->getAnnotations()[Ljava/lang/annotation/Annotation;
move-result-object v5
.line 7
array-length v6, v5
const/4 v7, 0x0
:goto_28
if-ge v7, v6, :cond_35
aget-object v8, v5, v7
.line 8
instance-of v8, v8, Landroid/webkit/JavascriptInterface;
if-eqz v8, :cond_32
const/4 v4, 0x1
goto :goto_35
:cond_32
add-int/lit8 v7, v7, 0x1
goto :goto_28
:cond_35
:goto_35
if-eqz v4, :cond_38
goto :goto_3b
:cond_38
add-int/lit8 v3, v3, 0x1
goto :goto_1e
:cond_3b
:goto_3b
return v4
.end method
.method protected checkSecurity()Z
.registers 4
.line 1
iget-object v0, p0, Lcom/just/agentweb/JsBaseInterfaceHolder;->mSecurityType:Lcom/just/agentweb/AgentWeb$SecurityType;
sget-object v1, Lcom/just/agentweb/AgentWeb$SecurityType;->STRICT_CHECK:Lcom/just/agentweb/AgentWeb$SecurityType;
const/4 v2, 0x1
if-eq v0, v1, :cond_8
goto :goto_1a
:cond_8
iget-object v0, p0, Lcom/just/agentweb/JsBaseInterfaceHolder;->mWebCreator:Lcom/just/agentweb/WebCreator;
.line 2
invoke-interface {v0}, Lcom/just/agentweb/WebCreator;->getWebViewType()I
move-result v0
const/4 v1, 0x2
if-ne v0, v1, :cond_12
goto :goto_1a
:cond_12
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x11
if-le v0, v1, :cond_19
goto :goto_1a
:cond_19
const/4 v2, 0x0
:goto_1a
return v2
.end method