当前位置:  编程技术>移动开发
本页文章导读:
    ▪千牛群客户端的反编译攻防战        千牛客户端的反编译攻防战 准备解开千牛源代码面纱的时候,一向管用的dex2jar居然失灵了. com.googlecode.dex2jar.DexException: while accept method:[La/a/a;.bc()Ljava/lang /String;] at com.googlecode.dex2jar.r.........
    ▪ Ext.ux.touch.grid 批改 列的高度        Ext.ux.touch.grid 修改 列的高度 Ext.ux.touch.grid是一个Sencha Touch 表格组件的插件,使用起来比较简单,但是使用过程中发现,即使表格内部的元素所占用的高度很小,表格的高度依然保持47个像素.........
    ▪ 并发成为学习二(线程安全类)       并发变成学习二(线程安全类) 1.当多个线程访问某个状态变量并且其中有一个线程执行写入操作时,必须采用同步机制来协同这些线程对变量的访问.java中的主要同步机制是关键字synchronized,提.........

[1]千牛群客户端的反编译攻防战
    来源: 互联网  发布时间: 2014-02-18
千牛客户端的反编译攻防战
准备解开千牛源代码面纱的时候,一向管用的dex2jar居然失灵了.

com.googlecode.dex2jar.DexException: while accept method:[La/a/a;.bc()Ljava/lang
/String;]
        at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReade
r.java:705)
        at com.googlecode.dex2jar.reader.DexFileReader.acceptClass(DexFileReader
.java:451)
        at com.googlecode.dex2jar.reader.DexFileReader.accept(DexFileReader.java
:333)
        at com.googlecode.dex2jar.v3.Dex2jar.doTranslate(Dex2jar.java:82)
        at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:191)
        at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:182)
        at com.googlecode.dex2jar.v3.Main.doData(Main.java:43)
        at com.googlecode.dex2jar.v3.Main.doData(Main.java:35)
        at com.googlecode.dex2jar.v3.Main.doFile(Main.java:63)
        at com.googlecode.dex2jar.v3.Main.main(Main.java:85)
Caused by: com.googlecode.dex2jar.DexException: while accept code in method:[La/
a/a;.bc()Ljava/lang/String;]
        at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReade
r.java:695)
        ... 9 more
Caused by: java.lang.IllegalArgumentException: Id out of bound
        at com.googlecode.dex2jar.reader.DexFileReader.getType(DexFileReader.jav
a:567)
        at com.googlecode.dex2jar.reader.DexOpcodeAdapter.x2c(DexOpcodeAdapter.j
ava:356)
        at com.googlecode.dex2jar.reader.DexCodeReader.acceptInsn(DexCodeReader.
java:606)
        at com.googlecode.dex2jar.reader.DexCodeReader.accept(DexCodeReader.java
:292)
        at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReade
r.java:692)
        ... 9 more
. while process file: [classes.dex]
.. ROOT cause:
java.util.zip.ZipException: ZIP file must have at least one entry
        at java.util.zip.ZipOutputStream.finish(Unknown Source)
        at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:192)
        at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:182)
        at com.googlecode.dex2jar.v3.Main.doData(Main.java:43)
        at com.googlecode.dex2jar.v3.Main.doData(Main.java:35)
        at com.googlecode.dex2jar.v3.Main.doFile(Main.java:63)
        at com.googlecode.dex2jar.v3.Main.main(Main.java:85)
Done.


千牛在dex的编译上做了点手脚,导致dex2jar无法工作.
具体做了什么手脚呢 ? 可以通过针对反编译工具对dex 中字节码的读取解析漏洞,来造成反编译工具山崩溃。
通过在不会调用到的Dex文件,或中添加无效字节码,或无效数据引用。导致反编译失败而崩溃。


(详见 http://bbs.pediy.com/showthread.php?t=177114  很详细的讲述了Android Dex的攻防)

上文中提到使用IDA工具可以成功反编译,但我没有该环境,则采用backsmali来反编译,backsmali跳过了失败的dex文件。成功反编译出smali文件.



附上工具下载地址:
smali: https://smali.googlecode.com/files/smali-2.0.jar
Baksmali: https://smali.googlecode.com/files/baksmali-2.0.jar


附件App类的smali文件. 发现有好多静态变量。  静态变量不是很容易被系统回收么?

.class public Lcom/taobao/qianniu/App;
.super Landroid/app/Application;


# static fields
.field private static A:Z

.field public static a:Ljava/lang/String;

.field private static c:Landroid/content/Context;

.field private static d:Lcom/taobao/qianniu/dao/DaoSession;

.field private static e:Lcom/taobao/qianniu/d/s;

.field private static f:Lcom/taobao/qianniu/d/b;

.field private static g:Lcom/taobao/qianniu/d/j;

.field private static h:Lcom/taobao/qianniu/d/ab;

.field private static i:Lcom/taobao/qianniu/d/l;

.field private static j:Lcom/taobao/qianniu/d/ae;

.field private static k:Lcom/taobao/qianniu/d/e/c;

.field private static l:Lcom/taobao/qianniu/d/d;

.field private static m:Lcom/taobao/top/android/TopAndroidClient;

.field private static n:Lcom/taobao/qianniu/d/f/g;

.field private static o:Lcom/taobao/qianniu/d/au;

.field private static p:Lcom/taobao/qianniu/d/v;

.field private static q:Lcom/taobao/qianniu/d/d/b;

.field private static r:Lcom/taobao/qianniu/ww/model/c;

.field private static s:Lcom/taobao/qianniu/ww/model/j;

.field private static t:Lcom/taobao/qianniu/ww/model/a;

.field private static u:Lcom/taobao/qianniu/d/at;

.field private static v:Lcom/taobao/qianniu/d/aq;

.field private static w:Lcom/taobao/qianniu/d/az;

.field private static x:Z

.field private static y:J

.field private static z:J


# instance fields
.field public b:Lcom/taobao/qianniu/ww/a/a;


# direct methods
.method static constructor <clinit>()V
    .registers 3

    const-wide/16 v1, 0x0

    const/4 v0, 0x0

    sput-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    const/4 v0, 0x0

    sput-boolean v0, Lcom/taobao/qianniu/App;->x:Z

    sput-wide v1, Lcom/taobao/qianniu/App;->y:J

    sput-wide v1, Lcom/taobao/qianniu/App;->z:J

    const/4 v0, 0x1

    sput-boolean v0, Lcom/taobao/qianniu/App;->A:Z

    return-void
.end method

.method public constructor <init>()V
    .registers 2

    invoke-direct {p0}, Landroid/app/Application;-><init>()V

    sget-object v0, Lcom/taobao/qianniu/ww/a/a;->a:Lcom/taobao/qianniu/ww/a/a;

    iput-object v0, p0, Lcom/taobao/qianniu/App;->b:Lcom/taobao/qianniu/ww/a/a;

    return-void
.end method

.method public static A()Lcom/taobao/qianniu/ww/model/j;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->s:Lcom/taobao/qianniu/ww/model/j;

    return-object v0
.end method

.method public static B()Lcom/taobao/qianniu/ww/model/a;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->t:Lcom/taobao/qianniu/ww/model/a;

    return-object v0
.end method

.method public static C()Lcom/taobao/qianniu/d/at;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->u:Lcom/taobao/qianniu/d/at;

    return-object v0
.end method

.method public static D()Lcom/taobao/qianniu/d/aq;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->v:Lcom/taobao/qianniu/d/aq;

    return-object v0
.end method

.method public static E()Lcom/taobao/qianniu/d/az;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->w:Lcom/taobao/qianniu/d/az;

    return-object v0
.end method

.method static synthetic F()Lcom/taobao/top/android/TopAndroidClient;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->m:Lcom/taobao/top/android/TopAndroidClient;

    return-object v0
.end method

.method static synthetic G()Lcom/taobao/qianniu/d/ab;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->h:Lcom/taobao/qianniu/d/ab;

    return-object v0
.end method

.method private H()V
    .registers 9

    const/16 v7, 0xc8

    const/4 v6, 0x3

    const/4 v5, 0x1

    sget-object v0, Lcom/taobao/qianniu/ww/a/a;->b:Lcom/taobao/qianniu/ww/a/a;

    iput-object v0, p0, Lcom/taobao/qianniu/App;->b:Lcom/taobao/qianniu/ww/a/a;

    invoke-virtual {p0}, Lcom/taobao/qianniu/App;->getPackageName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->a:Ljava/lang/String;

    invoke-static {}, Lcom/taobao/qianniu/app/c;->a()Lcom/taobao/qianniu/app/c;

    move-result-object v0

    sget-object v1, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/taobao/qianniu/app/c;->a(Landroid/content/Context;)V

    :try_start_17
    new-instance v0, Lcom/taobao/qianniu/dao/DaoMaster;

    invoke-static {}, Lcom/taobao/qianniu/dao/DBOpenHelper;->getInstance()Lcom/taobao/qianniu/dao/DBOpenHelper;

    move-result-object v1

    invoke-virtual {v1}, Lcom/taobao/qianniu/dao/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/taobao/qianniu/dao/DaoMaster;-><init>(Landroid/database/sqlite/SQLiteDatabase;)V

    invoke-virtual {v0}, Lcom/taobao/qianniu/dao/DaoMaster;->newSession()Lcom/taobao/qianniu/dao/DaoSession;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->d:Lcom/taobao/qianniu/dao/DaoSession;
    :try_end_2a
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_17 .. :try_end_2a} :catch_219

    invoke-static {}, Lcom/taobao/qianniu/d/l;->b()Lcom/taobao/qianniu/d/l;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    sget-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    iget-object v0, v0, Lcom/taobao/qianniu/d/l;->k:Ljava/lang/String;

    sget-object v1, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    iget-object v1, v1, Lcom/taobao/qianniu/d/l;->j:Ljava/lang/String;

    sget-object v2, Lcom/alibaba/mobileim/inet/WXType$WXAppClientType;->android_seller:Lcom/alibaba/mobileim/inet/WXType$WXAppClientType;

    invoke-static {p0, v0, v1, v2}, Lcom/alibaba/mobileim/inet/IMManager;->prepare(Landroid/app/Application;Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/mobileim/inet/WXType$WXAppClientType;)V

    sget-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/l;->c()Lcom/taobao/qianniu/d/m;

    move-result-object v0

    sget-object v1, Lcom/taobao/qianniu/d/m;->a:Lcom/taobao/qianniu/d/m;

    if-ne v0, v1, :cond_4c

    sput-boolean v5, Lcom/alibaba/mobileim/inet/IMManager;->DEBUG:Z

    invoke-static {p0, v5}, Lcom/alibaba/mobileim/inet/IMManager;->setDebugDomain(Landroid/content/Context;I)V

    :cond_4c
    sget-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/l;->c()Lcom/taobao/qianniu/d/m;

    move-result-object v0

    sget-object v1, Lcom/taobao/qianniu/d/m;->a:Lcom/taobao/qianniu/d/m;

    if-ne v0, v1, :cond_23f

    sget-object v0, Lcom/taobao/top/android/TopAndroidClient$Env;->DAILY:Lcom/taobao/top/android/TopAndroidClient$Env;

    :goto_58
    sget-object v1, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    sget-object v2, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    iget-object v2, v2, Lcom/taobao/qianniu/d/l;->d:Ljava/lang/String;

    sget-object v3, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    iget-object v3, v3, Lcom/taobao/qianniu/d/l;->e:Ljava/lang/String;

    sget-object v4, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    iget-object v4, v4, Lcom/taobao/qianniu/d/l;->g:Ljava/lang/String;

    invoke-static {v1, v2, v3, v4, v0}, Lcom/taobao/top/android/TopAndroidClient;->registerAndroidClient(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/taobao/top/android/TopAndroidClient$Env;)V

    sget-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    iget-object v0, v0, Lcom/taobao/qianniu/d/l;->d:Ljava/lang/String;

    invoke-static {v0}, Lcom/taobao/top/android/TopAndroidClient;->getAndroidClientByAppKey(Ljava/lang/String;)Lcom/taobao/top/android/TopAndroidClient;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->m:Lcom/taobao/top/android/TopAndroidClient;

    invoke-static {}, Lcom/taobao/qianniu/d/aq;->a()Lcom/taobao/qianniu/d/aq;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->v:Lcom/taobao/qianniu/d/aq;

    invoke-static {}, Lcom/taobao/qianniu/d/d;->a()Lcom/taobao/qianniu/d/d;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->l:Lcom/taobao/qianniu/d/d;

    invoke-static {}, Lcom/taobao/qianniu/d/s;->b()Lcom/taobao/qianniu/d/s;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->e:Lcom/taobao/qianniu/d/s;

    invoke-static {}, Lcom/taobao/qianniu/d/b;->b()Lcom/taobao/qianniu/d/b;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-static {}, Lcom/taobao/qianniu/d/ab;->b()Lcom/taobao/qianniu/d/ab;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->h:Lcom/taobao/qianniu/d/ab;

    invoke-static {}, Lcom/taobao/qianniu/d/ae;->a()Lcom/taobao/qianniu/d/ae;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->j:Lcom/taobao/qianniu/d/ae;

    invoke-static {}, Lcom/taobao/qianniu/d/e/c;->b()Lcom/taobao/qianniu/d/e/c;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->k:Lcom/taobao/qianniu/d/e/c;

    invoke-static {}, Lcom/taobao/qianniu/d/j;->b()Lcom/taobao/qianniu/d/j;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->g:Lcom/taobao/qianniu/d/j;

    invoke-static {}, Lcom/taobao/qianniu/d/f/g;->a()Lcom/taobao/qianniu/d/f/g;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->n:Lcom/taobao/qianniu/d/f/g;

    invoke-static {}, Lcom/taobao/qianniu/d/au;->a()Lcom/taobao/qianniu/d/au;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->o:Lcom/taobao/qianniu/d/au;

    invoke-static {}, Lcom/taobao/qianniu/d/d/b;->a()Lcom/taobao/qianniu/d/d/b;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->q:Lcom/taobao/qianniu/d/d/b;

    invoke-static {}, Lcom/taobao/qianniu/ww/model/c;->a()Lcom/taobao/qianniu/ww/model/c;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->r:Lcom/taobao/qianniu/ww/model/c;

    invoke-static {}, Lcom/taobao/qianniu/ww/model/j;->a()Lcom/taobao/qianniu/ww/model/j;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->s:Lcom/taobao/qianniu/ww/model/j;

    invoke-static {}, Lcom/taobao/qianniu/ww/model/a;->a()Lcom/taobao/qianniu/ww/model/a;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->t:Lcom/taobao/qianniu/ww/model/a;

    invoke-static {}, Lcom/taobao/qianniu/d/at;->a()Lcom/taobao/qianniu/d/at;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->u:Lcom/taobao/qianniu/d/at;

    invoke-static {}, Lcom/taobao/qianniu/d/az;->a()Lcom/taobao/qianniu/d/az;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->w:Lcom/taobao/qianniu/d/az;

    invoke-static {}, Lcom/taobao/top/android/comm/EventHandlerManager;->getInstance()Lcom/taobao/top/android/comm/EventHandlerManager;

    move-result-object v0

    new-instance v1, Lcom/taobao/qianniu/d/v;

    invoke-direct {v1}, Lcom/taobao/qianniu/d/v;-><init>()V

    sget-object v2, Lcom/taobao/top/android/comm/Event$Type;->SSO:Lcom/taobao/top/android/comm/Event$Type;

    invoke-virtual {v0, v2, v1}, Lcom/taobao/top/android/comm/EventHandlerManager;->registerEventHandler(Lcom/taobao/top/android/comm/Event$Type;Lcom/taobao/top/android/comm/EventHandler;)V

    sget-object v2, Lcom/taobao/top/android/comm/Event$Type;->WANGWANG_CHAT:Lcom/taobao/top/android/comm/Event$Type;

    invoke-virtual {v0, v2, v1}, Lcom/taobao/top/android/comm/EventHandlerManager;->registerEventHandler(Lcom/taobao/top/android/comm/Event$Type;Lcom/taobao/top/android/comm/EventHandler;)V

    sget-object v2, Lcom/taobao/top/android/comm/Event$Type;->BACK_PLATFORM:Lcom/taobao/top/android/comm/Event$Type;

    invoke-virtual {v0, v2, v1}, Lcom/taobao/top/android/comm/EventHandlerManager;->registerEventHandler(Lcom/taobao/top/android/comm/Event$Type;Lcom/taobao/top/android/comm/EventHandler;)V

    sget-object v2, Lcom/taobao/top/android/comm/Event$Type;->GO_H5:Lcom/taobao/top/android/comm/Event$Type;

    invoke-virtual {v0, v2, v1}, Lcom/taobao/top/android/comm/EventHandlerManager;->registerEventHandler(Lcom/taobao/top/android/comm/Event$Type;Lcom/taobao/top/android/comm/EventHandler;)V

    sget-object v2, Lcom/taobao/top/android/comm/Event$Type;->PAY:Lcom/taobao/top/android/comm/Event$Type;

    invoke-virtual {v0, v2, v1}, Lcom/taobao/top/android/comm/EventHandlerManager;->registerEventHandler(Lcom/taobao/top/android/comm/Event$Type;Lcom/taobao/top/android/comm/EventHandler;)V

    sget-object v2, Lcom/taobao/top/android/comm/Event$Type;->UI:Lcom/taobao/top/android/comm/Event$Type;

    invoke-virtual {v0, v2, v1}, Lcom/taobao/top/android/comm/EventHandlerManager;->registerEventHandler(Lcom/taobao/top/android/comm/Event$Type;Lcom/taobao/top/android/comm/EventHandler;)V

    sput-object v1, Lcom/taobao/qianniu/App;->p:Lcom/taobao/qianniu/d/v;

    new-instance v0, Lcom/a/a/b/d;

    invoke-direct {v0}, Lcom/a/a/b/d;-><init>()V

    invoke-virtual {v0}, Lcom/a/a/b/d;->c()Lcom/a/a/b/c;

    move-result-object v0

    new-instance v1, Lcom/a/a/b/i;

    invoke-virtual {p0}, Lcom/taobao/qianniu/App;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/a/a/b/i;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1, v6}, Lcom/a/a/b/i;->b(I)Lcom/a/a/b/i;

    move-result-object v1

    invoke-virtual {v1, v6}, Lcom/a/a/b/i;->a(I)Lcom/a/a/b/i;

    move-result-object v1

    invoke-virtual {v1, v7, v7}, Lcom/a/a/b/i;->a(II)Lcom/a/a/b/i;

    move-result-object v1

    new-instance v2, Lcom/a/a/a/b/a/c;

    invoke-direct {v2}, Lcom/a/a/a/b/a/c;-><init>()V

    invoke-virtual {v1, v2}, Lcom/a/a/b/i;->a(Lcom/a/a/a/b/c;)Lcom/a/a/b/i;

    move-result-object v1

    const/high16 v2, 0x200000

    invoke-virtual {v1, v2}, Lcom/a/a/b/i;->c(I)Lcom/a/a/b/i;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/a/a/b/i;->a(Lcom/a/a/b/c;)Lcom/a/a/b/i;

    move-result-object v0

    new-instance v1, Lcom/a/a/a/a/b/c;

    invoke-direct {v1}, Lcom/a/a/a/a/b/c;-><init>()V

    invoke-virtual {v0, v1}, Lcom/a/a/b/i;->a(Lcom/a/a/a/a/b/a;)Lcom/a/a/b/i;

    move-result-object v0

    sget-object v1, Lcom/a/a/b/a/h;->b:Lcom/a/a/b/a/h;

    invoke-virtual {v0, v1}, Lcom/a/a/b/i;->a(Lcom/a/a/b/a/h;)Lcom/a/a/b/i;

    move-result-object v0

    invoke-virtual {v0}, Lcom/a/a/b/i;->a()Lcom/a/a/b/g;

    move-result-object v0

    invoke-static {}, Lcom/a/a/b/f;->a()Lcom/a/a/b/f;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/a/a/b/f;->a(Lcom/a/a/b/g;)V

    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v0}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager;

    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v0

    invoke-virtual {v0, v5}, Landroid/webkit/CookieManager;->setAcceptCookie(Z)V

    :try_start_153
    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/taobao/qianniu/utils/bb;->a(Landroid/content/Context;)V
    :try_end_158
    .catch Ljava/lang/Exception; {:try_start_153 .. :try_end_158} :catch_243

    :goto_158
    invoke-virtual {p0}, Lcom/taobao/qianniu/App;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Screen density: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, v0, Landroid/util/DisplayMetrics;->density:F

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Screen densityDpi: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, v0, Landroid/util/DisplayMetrics;->densityDpi:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Screen widthPixels: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Screen heightPixels: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, v0, Landroid/util/DisplayMetrics;->heightPixels:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Screen xdpi: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, v0, Landroid/util/DisplayMetrics;->xdpi:F

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Screen ydpi: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v0, v0, Landroid/util/DisplayMetrics;->ydpi:F

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    const-string v1, "activity"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    invoke-virtual {v0}, Landroid/app/ActivityManager;->getMemoryClass()I

    move-result v0

    const-string v1, "App"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Heap Size: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, "M"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    sget-object v0, Lcom/taobao/qianniu/ww/a/a;->c:Lcom/taobao/qianniu/ww/a/a;

    iput-object v0, p0, Lcom/taobao/qianniu/App;->b:Lcom/taobao/qianniu/ww/a/a;

    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/taobao/qianniu/ww/b/l;->a(Landroid/content/Context;)V

    invoke-direct {p0}, Lcom/taobao/qianniu/App;->I()V

    return-void

    :catch_219
    move-exception v0

    const-string v1, "App"

    const-string v2, "Init app encounted exception:"

    invoke-static {v1, v2, v0}, Lcom/taobao/qianniu/utils/am;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "Init DB failed,"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteException;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/taobao/qianniu/App;->a(Ljava/lang/String;)V

    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "App init , daoMaster init exception!"

    invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_23f
    sget-object v0, Lcom/taobao/top/android/TopAndroidClient$Env;->PRODUCTION:Lcom/taobao/top/android/TopAndroidClient$Env;

    goto/16 :goto_58

    :catch_243
    move-exception v0

    const-string v1, "App"

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/taobao/qianniu/utils/am;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_158
.end method

.method private I()V
    .registers 3

    sget-object v0, Lcom/taobao/qianniu/app/c;->a:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_16

    invoke-virtual {v0}, Ljava/io/File;->listFiles()[Ljava/io/File;

    move-result-object v0

    if-eqz v0, :cond_16

    new-instance v1, Lcom/taobao/qianniu/a;

    invoke-direct {v1, p0, v0}, Lcom/taobao/qianniu/a;-><init>(Lcom/taobao/qianniu/App;[Ljava/io/File;)V

    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    :cond_16
    return-void
.end method

.method public static a(J)V
    .registers 2

    sput-wide p0, Lcom/taobao/qianniu/App;->y:J

    return-void
.end method

.method private static a(Lcom/taobao/qianniu/activity/bd;Landroid/os/Bundle;)V
    .registers 5

    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v0}, Landroid/support/v4/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroid/support/v4/content/LocalBroadcastManager;

    move-result-object v0

    new-instance v1, Landroid/content/Intent;

    const-string v2, "com.taobao.jindouyun.bc.action.clean.context"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/support/v4/content/LocalBroadcastManager;->sendBroadcastSync(Landroid/content/Intent;)V

    sget-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/b;->i()V

    sget-object v0, Lcom/taobao/qianniu/App;->l:Lcom/taobao/qianniu/d/d;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/d;->b()V

    :try_start_1a
    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/taobao/qianniu/utils/bb;->a(Landroid/content/Context;)V
    :try_end_1f
    .catch Ljava/lang/Exception; {:try_start_1a .. :try_end_1f} :catch_6f

    :goto_1f
    sget-object v0, Lcom/taobao/qianniu/App;->h:Lcom/taobao/qianniu/d/ab;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/ab;->a()V

    sget-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/l;->a()V

    sget-object v0, Lcom/taobao/qianniu/App;->k:Lcom/taobao/qianniu/d/e/c;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/e/c;->a()V

    sget-object v0, Lcom/taobao/qianniu/App;->e:Lcom/taobao/qianniu/d/s;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/s;->a()V

    sget-object v0, Lcom/taobao/qianniu/App;->r:Lcom/taobao/qianniu/ww/model/c;

    invoke-virtual {v0}, Lcom/taobao/qianniu/ww/model/c;->b()V

    sget-object v0, Lcom/taobao/qianniu/App;->g:Lcom/taobao/qianniu/d/j;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/j;->a()V

    sget-object v0, Lcom/taobao/qianniu/App;->t:Lcom/taobao/qianniu/ww/model/a;

    invoke-virtual {v0}, Lcom/taobao/qianniu/ww/model/a;->b()V

    sget-object v0, Lcom/taobao/qianniu/App;->q:Lcom/taobao/qianniu/d/d/b;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/d/b;->c()V

    sget-object v0, Lcom/taobao/qianniu/App;->n:Lcom/taobao/qianniu/d/f/g;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/f/g;->b()V

    new-instance v0, Landroid/content/Intent;

    sget-object v1, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    const-class v2, Lcom/taobao/qianniu/activity/ScavengerActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const v1, 0x14000004

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    const-string v1, "type"

    invoke-virtual {p0}, Lcom/taobao/qianniu/activity/bd;->name()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v1, "extras"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent;

    sget-object v1, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void

    :catch_6f
    move-exception v0

    const-string v1, "App"

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/taobao/qianniu/utils/am;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1f
.end method

.method public static a()Z
    .registers 1

    sget-boolean v0, Lcom/taobao/qianniu/App;->x:Z

    return v0
.end method

.method public static b(J)V
    .registers 2

    sput-wide p0, Lcom/taobao/qianniu/App;->z:J

    return-void
.end method

.method public static b(Ljava/lang/String;)V
    .registers 3

    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    const-string v1, "acc_nick"

    invoke-virtual {v0, v1, p0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v1, Lcom/taobao/qianniu/activity/bd;->b:Lcom/taobao/qianniu/activity/bd;

    invoke-static {v1, v0}, Lcom/taobao/qianniu/App;->a(Lcom/taobao/qianniu/activity/bd;Landroid/os/Bundle;)V

    return-void
.end method

.method public static c()Landroid/content/Context;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    return-object v0
.end method

.method public static d()Lcom/taobao/qianniu/dao/DaoSession;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->d:Lcom/taobao/qianniu/dao/DaoSession;

    return-object v0
.end method

.method public static e()Z
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    if-eqz v0, :cond_b

    sget-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/b;->f()Z

    move-result v0

    :goto_a
    return v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public static declared-synchronized f()Z
    .registers 7

    const/4 v0, 0x1

    const-class v1, Lcom/taobao/qianniu/App;

    monitor-enter v1

    :try_start_4
    sget-object v2, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    if-eqz v2, :cond_62

    sget-object v2, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v2}, Lcom/taobao/qianniu/d/b;->f()Z
    :try_end_d
    .catchall {:try_start_4 .. :try_end_d} :catchall_5f

    move-result v2

    if-eqz v2, :cond_12

    :cond_10
    :goto_10
    monitor-exit v1

    return v0

    :cond_12
    :try_start_12
    sget-object v2, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v2}, Lcom/taobao/qianniu/d/b;->d()Lcom/taobao/qianniu/pojo/a;

    move-result-object v2

    if-eqz v2, :cond_62

    const-string v3, "App"

    const-string v4, "--->restore qianniu application"

    invoke-static {v3, v4}, Lcom/taobao/qianniu/utils/am;->c(Ljava/lang/String;Ljava/lang/String;)I

    sget-object v3, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v3, v2}, Lcom/taobao/qianniu/d/b;->a(Lcom/taobao/qianniu/pojo/a;)V

    invoke-virtual {v2}, Lcom/taobao/qianniu/pojo/a;->getOnlineStatus()Ljava/lang/Integer;

    move-result-object v3

    if-eqz v3, :cond_10

    sget-object v4, Lcom/taobao/qianniu/App;->h:Lcom/taobao/qianniu/d/ab;

    if-eqz v4, :cond_10

    sget-object v4, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v4}, Lcom/taobao/qianniu/utils/aq;->a(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_10

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

    move-result v3

    sget-object v4, Lcom/taobao/qianniu/ww/a/k;->d:Lcom/taobao/qianniu/ww/a/k;

    invoke-virtual {v4}, Lcom/taobao/qianniu/ww/a/k;->a()I

    move-result v4

    if-eq v3, v4, :cond_10

    invoke-virtual {v2}, Lcom/taobao/qianniu/pojo/a;->getWxToken()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcom/taobao/qianniu/utils/ay;->d(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_10

    invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadScheduledExecutor()Ljava/util/concurrent/ScheduledExecutorService;

    move-result-object v3

    new-instance v4, Lcom/taobao/qianniu/c;

    invoke-direct {v4, v2}, Lcom/taobao/qianniu/c;-><init>(Lcom/taobao/qianniu/pojo/a;)V

    const-wide/16 v5, 0x2

    sget-object v2, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v3, v4, v5, v6, v2}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
    :try_end_5e
    .catchall {:try_start_12 .. :try_end_5e} :catchall_5f

    goto :goto_10

    :catchall_5f
    move-exception v0

    monitor-exit v1

    throw v0

    :cond_62
    const/4 v0, 0x0

    goto :goto_10
.end method

.method public static g()V
    .registers 3

    sget-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/b;->i()V

    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    const-string v1, "whyCallMe"

    const/16 v2, 0xb

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    sget-object v1, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v1, v0}, Lcom/taobao/qianniu/activity/DialogActivity;->a(Landroid/content/Context;Landroid/os/Bundle;)V

    return-void
.end method

.method public static h()V
    .registers 3

    sget-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    invoke-virtual {v0}, Lcom/taobao/qianniu/d/b;->i()V

    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    const-string v1, "whyCallMe"

    const/16 v2, 0xd

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    sget-object v1, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    invoke-static {v1, v0}, Lcom/taobao/qianniu/activity/DialogActivity;->a(Landroid/content/Context;Landroid/os/Bundle;)V

    return-void
.end method

.method public static i()V
    .registers 2

    sget-object v0, Lcom/taobao/qianniu/activity/bd;->a:Lcom/taobao/qianniu/activity/bd;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/taobao/qianniu/App;->a(Lcom/taobao/qianniu/activity/bd;Landroid/os/Bundle;)V

    return-void
.end method

.method public static j()V
    .registers 2

    sget-object v0, Lcom/taobao/qianniu/activity/bd;->c:Lcom/taobao/qianniu/activity/bd;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/taobao/qianniu/App;->a(Lcom/taobao/qianniu/activity/bd;Landroid/os/Bundle;)V

    return-void
.end method

.method public static k()J
    .registers 6

    const-wide/16 v4, 0x0

    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    sget-wide v2, Lcom/taobao/qianniu/App;->z:J

    cmp-long v0, v0, v2

    if-lez v0, :cond_26

    sget-wide v0, Lcom/taobao/qianniu/App;->y:J

    cmp-long v0, v0, v4

    if-eqz v0, :cond_26

    sget-wide v0, Lcom/taobao/qianniu/App;->z:J

    cmp-long v0, v0, v4

    if-eqz v0, :cond_26

    sget-wide v0, Lcom/taobao/qianniu/App;->y:J

    const-wide/16 v2, 0x3e8

    mul-long/2addr v0, v2

    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    add-long/2addr v0, v2

    sget-wide v2, Lcom/taobao/qianniu/App;->z:J

    sub-long/2addr v0, v2

    :goto_25
    return-wide v0

    :cond_26
    sget-object v0, Lcom/taobao/qianniu/App;->m:Lcom/taobao/top/android/TopAndroidClient;

    if-eqz v0, :cond_36

    sget-object v0, Lcom/taobao/qianniu/App;->m:Lcom/taobao/top/android/TopAndroidClient;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/taobao/top/android/TopAndroidClient;->getRemoteTimestamp(Z)Ljava/lang/Long;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v0

    goto :goto_25

    :cond_36
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    goto :goto_25
.end method

.method public static l()J
    .registers 3

    const-wide/16 v0, 0x0

    :try_start_2
    invoke-static {}, Lcom/taobao/qianniu/App;->m()Lcom/taobao/qianniu/d/b;

    move-result-object v2

    invoke-virtual {v2}, Lcom/taobao/qianniu/d/b;->c()Lcom/taobao/qianniu/pojo/a;

    move-result-object v2

    invoke-virtual {v2}, Lcom/taobao/qianniu/pojo/a;->getUserId()J
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_d} :catch_f

    move-result-wide v0

    :goto_e
    return-wide v0

    :catch_f
    move-exception v2

    goto :goto_e
.end method

.method public static m()Lcom/taobao/qianniu/d/b;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->f:Lcom/taobao/qianniu/d/b;

    return-object v0
.end method

.method public static n()Lcom/taobao/qianniu/d/j;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->g:Lcom/taobao/qianniu/d/j;

    return-object v0
.end method

.method public static o()Lcom/taobao/qianniu/d/l;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->i:Lcom/taobao/qianniu/d/l;

    return-object v0
.end method

.method public static p()Lcom/taobao/qianniu/d/ae;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->j:Lcom/taobao/qianniu/d/ae;

    return-object v0
.end method

.method public static q()Lcom/taobao/qianniu/d/e/c;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->k:Lcom/taobao/qianniu/d/e/c;

    return-object v0
.end method

.method public static r()Lcom/taobao/qianniu/d/d;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->l:Lcom/taobao/qianniu/d/d;

    return-object v0
.end method

.method public static s()Lcom/taobao/top/android/TopAndroidClient;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->m:Lcom/taobao/top/android/TopAndroidClient;

    return-object v0
.end method

.method public static t()Lcom/taobao/qianniu/d/f/g;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->n:Lcom/taobao/qianniu/d/f/g;

    return-object v0
.end method

.method public static u()Lcom/taobao/qianniu/d/au;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->o:Lcom/taobao/qianniu/d/au;

    return-object v0
.end method

.method public static v()Lcom/taobao/qianniu/d/v;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->p:Lcom/taobao/qianniu/d/v;

    return-object v0
.end method

.method public static w()Lcom/taobao/qianniu/d/s;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->e:Lcom/taobao/qianniu/d/s;

    if-nez v0, :cond_a

    invoke-static {}, Lcom/taobao/qianniu/d/s;->b()Lcom/taobao/qianniu/d/s;

    move-result-object v0

    sput-object v0, Lcom/taobao/qianniu/App;->e:Lcom/taobao/qianniu/d/s;

    :cond_a
    sget-object v0, Lcom/taobao/qianniu/App;->e:Lcom/taobao/qianniu/d/s;

    return-object v0
.end method

.method public static x()Lcom/taobao/qianniu/d/d/b;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->q:Lcom/taobao/qianniu/d/d/b;

    return-object v0
.end method

.method public static y()Lcom/taobao/qianniu/ww/model/c;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->r:Lcom/taobao/qianniu/ww/model/c;

    return-object v0
.end method

.method public static z()Lcom/taobao/qianniu/d/ab;
    .registers 1

    sget-object v0, Lcom/taobao/qianniu/App;->h:Lcom/taobao/qianniu/d/ab;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)V
    .registers 4

    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/taobao/qianniu/b;

    invoke-direct {v1, p0, p1}, Lcom/taobao/qianniu/b;-><init>(Lcom/taobao/qianniu/App;Ljava/lang/String;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method public b()Z
    .registers 4

    invoke-static {}, Lcom/taobao/qianniu/App;->c()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/taobao/qianniu/utils/aq;->a(Landroid/content/Context;)Z

    move-result v0

    if-nez v0, :cond_22

    const-string v1, "App"

    const-string v2, "test cannot connect network now"

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->e(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {p0}, Lcom/taobao/qianniu/App;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0800c0

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

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/taobao/qianniu/App;->a(Ljava/lang/String;)V

    :cond_1f
    :goto_1f
    sput-boolean v0, Lcom/taobao/qianniu/App;->A:Z

    return v0

    :cond_22
    sget-boolean v1, Lcom/taobao/qianniu/App;->A:Z

    if-nez v1, :cond_1f

    const-string v1, "App"

    const-string v2, "network connect again"

    invoke-static {v1, v2}, Lcom/taobao/qianniu/utils/am;->b(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {p0}, Lcom/taobao/qianniu/App;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0800c1

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

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/taobao/qianniu/App;->a(Ljava/lang/String;)V

    goto :goto_1f
.end method

.method public onCreate()V
    .registers 4

    sput-object p0, Lcom/taobao/qianniu/App;->c:Landroid/content/Context;

    :try_start_2
    invoke-direct {p0}, Lcom/taobao/qianniu/App;->H()V
    :try_end_5
    .catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_5} :catch_6

    :goto_5
    return-void

    :catch_6
    move-exception v0

    const/4 v1, 0x1

    sput-boolean v1, Lcom/taobao/qianniu/App;->x:Z

    sget-object v1, Lcom/taobao/qianniu/ww/a/a;->d:Lcom/taobao/qianniu/ww/a/a;

    iput-object v1, p0, Lcom/taobao/qianniu/App;->b:Lcom/taobao/qianniu/ww/a/a;

    const-string v1, "App"

    const-string v2, "\u521d\u59cb\u5316\u9519\u8bef"

    invoke-static {v1, v2, v0}, Lcom/taobao/qianniu/utils/am;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_5
.end method

.method public onLowMemory()V
    .registers 1

    invoke-super {p0}, Landroid/app/Application;->onLowMemory()V

    return-void
.end method

.method public onTerminate()V
    .registers 2

    invoke-static {}, Lcom/taobao/qianniu/dao/DBOpenHelper;->getInstance()Lcom/taobao/qianniu/dao/DBOpenHelper;

    move-result-object v0

    invoke-virtual {v0}, Lcom/taobao/qianniu/dao/DBOpenHelper;->close()V

    return-void
.end method


    
[2] Ext.ux.touch.grid 批改 列的高度
    来源: 互联网  发布时间: 2014-02-18
Ext.ux.touch.grid 修改 列的高度

Ext.ux.touch.grid是一个Sencha Touch 表格组件的插件,使用起来比较简单,但是使用过程中发现,即使表格内部的元素所占用的高度很小,表格的高度依然保持47个像素,于是尝试修改CSS,但是失败,因为这个控制最小高度的属性min-height:47px是写在div属性中,而且加了!import注释,所以只能修改js源码了:

 

在List.js的constructor里增加:

me.getItemMap()._minimumHeight = #期望高度; 

me.getItemMap().config.minimumHeight =#期望高度;


    
[3] 并发成为学习二(线程安全类)
    来源: 互联网  发布时间: 2014-02-18
并发变成学习二(线程安全类)

1.当多个线程访问某个状态变量并且其中有一个线程执行写入操作时,必须采用同步机制来协同这些线程对变量的访问.
java中的主要同步机制是关键字synchronized,提供一种独占的加锁方式.

2.同步 这个术语还包括volatile类型的变量,显示锁,以及原子变量.

3.线程安全程序和线程安全类:
  线程安全程序不一定完全由线程安全类构成,线程安全类构成的也不一定是线程安全程序

4.线程安全性:多个线程调用时,不会出现错误的交互.

5.无状态对象一定是线程安全的

6.竞态条件: 并发编程中,由于不恰当 执行时序而出现不正确的结果,避免竞态条件问题,就必须在某个线程修改该变量时,通过某种方式防止其他线程使用这个变量,从而确保其他线程只能在修改操作完成之前或者之后读取和修改状态,而不是在修改状态的过程中.

7.原子变量类: java.util.concurrent.atomic包中包含了一些原子变量类,用来实现在数值和对象引用上的状态转换.
eg:通过AtomicLong来代替long类型的计数器,确保所有对计数器的访问操作都是原子的.

8.加锁机制

9.内置锁:java提供了一种内置的锁机制来支持原子性:同步代码块.同步代码块包括两部分:一个作为锁的对象引用,一个作为由这个锁保护的代码块。
每个java对象都可以用作一个实现同步的锁,,这些所被称为内置锁或者是监视器锁。线程在进入同步代码块之前会自动获得锁,并且在退出同步代码块时自动释放锁,无论通过正常控制路径退出还是从代码块中抛出异常退出,获得内置锁的唯一途径就是进入由这个锁保护的同步代码块或者方法。
这个锁保护的同步代码块会以原子的方式执行。

10.用锁来保护状态









    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3