好友
阅读权限10
听众
最后登录1970-1-1
|
.line 161
invoke-virtual {p0}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getBinding()Landroidx/viewbinding/ViewBinding;
move-result-object v0
check-cast v0, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;
iget-object v0, v0, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;->tvTip1:Landroid/widget/TextView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 162
invoke-virtual {p0}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getBinding()Landroidx/viewbinding/ViewBinding;
move-result-object v0
check-cast v0, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;
iget-object v0, v0, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;->tvTip1:Landroid/widget/TextView;
const-string v1, "合成失败,请返回重试"
check-cast v1, Ljava/lang/CharSequence;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
return-void
.end method
.method private final faceChangeAgeGender(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/coroutines/Continuation<",
"-",
"Lkotlin/Unit;",
">;)",
"Ljava/lang/Object;"
}
.end annotation
const-string v0, "error_code"
const-string v1, "result"
instance-of v2, p1, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;
if-eqz v2, :cond_18
move-object v2, p1
check-cast v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;
iget v3, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->label:I
const/high16 v4, -0x80000000
and-int/2addr v3, v4
if-eqz v3, :cond_18
iget p1, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->label:I
sub-int/2addr p1, v4
iput p1, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->label:I
goto :goto_1d
:cond_18
new-instance v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;
invoke-direct {v2, p0, p1}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;-><init>(Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;Lkotlin/coroutines/Continuation;)V
:goto_1d
iget-object p1, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->result:Ljava/lang/Object;
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object v3
.line 85
iget v4, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->label:I
const/4 v5, 0x0
const/4 v6, 0x1
if-eqz v4, :cond_42
if-ne v4, v6, :cond_3a
iget-object v3, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->L$1:Ljava/lang/Object;
check-cast v3, Lkotlin/jvm/internal/Ref$ObjectRef;
iget-object v2, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->L$0:Ljava/lang/Object;
check-cast v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;
:try_start_33
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
:try_end_36
.catch Ljava/lang/Exception; {:try_start_33 .. :try_end_36} :catch_37
goto :goto_7b
:catch_37
move-exception p1
goto/16 :goto_124
.line 120
:cond_3a
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 85
:cond_42
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
.line 87
:try_start_45
invoke-virtual {p0}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getFile()Ljava/io/File;
move-result-object p1
if-nez p1, :cond_4d
move-object p1, v5
goto :goto_51
:cond_4d
invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object p1
:goto_51
invoke-static {p1}, Lcom/xly/psapp/ui/face/FileUtil;->readFileByBytes(Ljava/lang/String;)[B
move-result-object p1
const/4 v4, 0x0
invoke-static {p1, v4}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
move-result-object p1
.line 88
new-instance v4, Lkotlin/jvm/internal/Ref$ObjectRef;
invoke-direct {v4}, Lkotlin/jvm/internal/Ref$ObjectRef;-><init>()V
.line 89
invoke-static {}, Lkotlinx/coroutines/Dispatchers;->getIO()Lkotlinx/coroutines/CoroutineDispatcher;
move-result-object v7
check-cast v7, Lkotlin/coroutines/CoroutineContext;
new-instance v8, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$2;
invoke-direct {v8, v4, p0, p1, v5}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$2;-><init>(Lkotlin/jvm/internal/Ref$ObjectRef;Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;Ljava/lang/String;Lkotlin/coroutines/Continuation;)V
check-cast v8, Lkotlin/jvm/functions/Function2;
iput-object p0, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->L$0:Ljava/lang/Object;
iput-object v4, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->L$1:Ljava/lang/Object;
iput v6, v2, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity$faceChangeAgeGender$1;->label:I
invoke-static {v7, v8, v2}, Lkotlinx/coroutines/BuildersKt;->withContext(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p1
:try_end_76
.catch Ljava/lang/Exception; {:try_start_45 .. :try_end_76} :catch_122
if-ne p1, v3, :cond_79
return-object v3
:cond_79
move-object v2, p0
move-object v3, v4
.line 92
:goto_7b
:try_start_7b
invoke-virtual {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getBinding()Landroidx/viewbinding/ViewBinding;
move-result-object p1
check-cast p1, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;
iget-object p1, p1, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;->tvTip1:Landroid/widget/TextView;
const/16 v4, 0x8
invoke-virtual {p1, v4}, Landroid/widget/TextView;->setVisibility(I)V
.line 93
invoke-virtual {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getBinding()Landroidx/viewbinding/ViewBinding;
move-result-object p1
check-cast p1, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;
iget-object p1, p1, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;->spinKit:Lcom/github/ybq/android/spinkit/SpinKitView;
invoke-virtual {p1, v4}, Lcom/github/ybq/android/spinkit/SpinKitView;->setVisibility(I)V
.line 94
invoke-virtual {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getBinding()Landroidx/viewbinding/ViewBinding;
move-result-object p1
check-cast p1, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;
iget-object p1, p1, Lcom/xly/psapp/databinding/ActivityFaceSwapperLoadingBinding;->tvTip2:Landroid/widget/TextView;
invoke-virtual {p1, v4}, Landroid/widget/TextView;->setVisibility(I)V
.line 95
invoke-virtual {v2, v6}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->setGetResult(Z)V
.line 96
iget-object p1, v3, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
if-nez p1, :cond_b2
.line 97
move-object p1, v2
check-cast p1, Landroid/content/Context;
const-string v0, "请求失败,请重试"
invoke-static {p1, v0}, Lcom/xly/psapp/ui/ext/ContextExtKt;->toast(Landroid/content/Context;Ljava/lang/String;)V
.line 98
invoke-direct {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->error()V
goto/16 :goto_132
.line 100
:cond_b2
new-instance p1, Lorg/json/JSONObject;
iget-object v3, v3, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
check-cast v3, Ljava/lang/String;
invoke-direct {p1, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
.line 101
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string v4, "0"
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_f5
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v3
if-eqz v3, :cond_f5
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v3
:try_end_d1
.catch Ljava/lang/Exception; {:try_start_7b .. :try_end_d1} :catch_37
const-string v4, "image"
if-nez v3, :cond_d7
move-object v3, v5
goto :goto_db
:cond_d7
:try_start_d7
invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
:goto_db
check-cast v3, Ljava/lang/CharSequence;
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_f5
.line 102
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object p1
if-nez p1, :cond_ea
goto :goto_ee
:cond_ea
invoke-virtual {p1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
:goto_ee
invoke-virtual {v2, v5}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->setImageBase64(Ljava/lang/String;)V
.line 103
invoke-direct {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->saveResultPhoto()V
goto :goto_132
.line 105
:cond_f5
invoke-direct {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->error()V
.line 106
new-instance v1, Lcom/xly/psapp/ui/dialog/DialogTextViewBuilder$Builder;
invoke-virtual {v2}, Lcom/xly/psapp/ui/activity/FaceSwapperLoadingActivity;->getContext()Landroid/content/Context;
move-result-object v3
const-string v4, "合成提示"
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v5, "error_msg"
invoke-virtual {p1, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-static {v0, p1}, Lcom/xly/psapp/ui/face/FaceService;->getErrorMsg(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
const-string v0, "我知道了" |
-
-
|