287 lines
8.8 KiB
Smali
287 lines
8.8 KiB
Smali
.class public Lcom/moji/share/IAPIShareImpl;
|
|
.super Ljava/lang/Object;
|
|
.source "IAPIShareImpl.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/share/IAPIShare;
|
|
|
|
|
|
# instance fields
|
|
.field private mContext:Landroid/content/Context;
|
|
|
|
.field private mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
.field private mShareFromType:Lcom/moji/share/entity/ShareFromType;
|
|
|
|
.field private mShareListener:Ljava/lang/ref/WeakReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ref/WeakReference<",
|
|
"Lcom/moji/share/listener/ShareListener;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mShareRecordManager:Lcom/moji/share/ShareRecordManager;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/ref/WeakReference;Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareFromType;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/ref/WeakReference<",
|
|
"Lcom/moji/share/listener/ShareListener;",
|
|
">;",
|
|
"Lcom/moji/share/entity/ShareChannelType;",
|
|
"Lcom/moji/share/entity/ShareFromType;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 26
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 27
|
|
iput-object p1, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
.line 28
|
|
iput-object p2, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
.line 29
|
|
iput-object p3, p0, Lcom/moji/share/IAPIShareImpl;->mShareFromType:Lcom/moji/share/entity/ShareFromType;
|
|
|
|
.line 30
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
.line 31
|
|
new-instance p1, Lcom/moji/share/ShareRecordManager;
|
|
|
|
invoke-direct {p1}, Lcom/moji/share/ShareRecordManager;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/moji/share/IAPIShareImpl;->mShareRecordManager:Lcom/moji/share/ShareRecordManager;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onCancel()V
|
|
.locals 4
|
|
|
|
.line 60
|
|
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 62
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
iget-object v1, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
sget v2, Lcom/moji/share/R$string;->share_content_cancel:I
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 64
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareRecordManager:Lcom/moji/share/ShareRecordManager;
|
|
|
|
const/4 v1, 0x3
|
|
|
|
iget-object v2, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
iget-object v3, p0, Lcom/moji/share/IAPIShareImpl;->mShareFromType:Lcom/moji/share/entity/ShareFromType;
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lcom/moji/share/ShareRecordManager;->a(ILcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareFromType;)V
|
|
|
|
.line 65
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 66
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/share/listener/ShareListener;
|
|
|
|
iget-object v1, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
invoke-interface {v0, v1}, Lcom/moji/share/listener/ShareListener;->c(Lcom/moji/share/entity/ShareChannelType;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public onError()V
|
|
.locals 4
|
|
|
|
.line 48
|
|
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 50
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
iget-object v1, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
sget v2, Lcom/moji/share/R$string;->share_content_failed:I
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 52
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareRecordManager:Lcom/moji/share/ShareRecordManager;
|
|
|
|
const/4 v1, 0x2
|
|
|
|
iget-object v2, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
iget-object v3, p0, Lcom/moji/share/IAPIShareImpl;->mShareFromType:Lcom/moji/share/entity/ShareFromType;
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lcom/moji/share/ShareRecordManager;->a(ILcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareFromType;)V
|
|
|
|
.line 53
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 54
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/share/listener/ShareListener;
|
|
|
|
iget-object v1, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
invoke-interface {v0, v1}, Lcom/moji/share/listener/ShareListener;->b(Lcom/moji/share/entity/ShareChannelType;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSuccess()V
|
|
.locals 4
|
|
|
|
.line 36
|
|
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 38
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
iget-object v1, p0, Lcom/moji/share/IAPIShareImpl;->mContext:Landroid/content/Context;
|
|
|
|
sget v2, Lcom/moji/share/R$string;->share_content_success:I
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 40
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareRecordManager:Lcom/moji/share/ShareRecordManager;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
iget-object v2, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
iget-object v3, p0, Lcom/moji/share/IAPIShareImpl;->mShareFromType:Lcom/moji/share/entity/ShareFromType;
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lcom/moji/share/ShareRecordManager;->a(ILcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareFromType;)V
|
|
|
|
.line 41
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 42
|
|
iget-object v0, p0, Lcom/moji/share/IAPIShareImpl;->mShareListener:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/share/listener/ShareListener;
|
|
|
|
iget-object v1, p0, Lcom/moji/share/IAPIShareImpl;->mShareChannelType:Lcom/moji/share/entity/ShareChannelType;
|
|
|
|
invoke-interface {v0, v1}, Lcom/moji/share/listener/ShareListener;->a(Lcom/moji/share/entity/ShareChannelType;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|