正在查看: Cashalo v2.25.0.0 应用的 AdaEmbedActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cashalo v2.25.0.0 应用的 AdaEmbedActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package support.ada.embed.ui;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import support.ada.embed.widget.AdaEmbedView;
@Metadata(bv = {1, 0, 3}, d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0016\u0018\u0000 \u00132\u00020\u0001:\u0001\u0013B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u0007\u001a\u00020\u0004H\u0004J\"\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\u000b2\b\u0010\r\u001a\u0004\u0018\u00010\u000eH\u0014J\u0012\u0010\u000f\u001a\u00020\t2\b\u0010\u0010\u001a\u0004\u0018\u00010\u0011H\u0014J\b\u0010\u0012\u001a\u00020\tH\u0014R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082.¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0014"}, d2 = {"Lsupport/ada/embed/ui/AdaEmbedActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "()V", "adaView", "Lsupport/ada/embed/widget/AdaEmbedView;", "filePickerHandler", "Lsupport/ada/embed/ui/FilePickerHandler;", "getAdaView", "onActivityResult", "", "requestCode", "", "resultCode", "intent", "Landroid/content/Intent;", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onDestroy", "Companion", "ada-embed-appcompat_release"}, k = 1, mv = {1, 1, 15})
public class AdaEmbedActivity extends AppCompatActivity {
public static final String EXTRA_SETTINGS = "EXTRA_SETTINGS";
private HashMap _$_findViewCache;
private AdaEmbedView adaView;
private FilePickerHandler filePickerHandler;
public void _$_clearFindViewByIdCache() {
HashMap hashMap = this._$_findViewCache;
if (hashMap != null) {
hashMap.clear();
}
}
public View _$_findCachedViewById(int i) {
if (this._$_findViewCache == null) {
this._$_findViewCache = new HashMap();
}
View view = (View) this._$_findViewCache.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
this._$_findViewCache.put(Integer.valueOf(i), findViewById);
return findViewById;
}
public static final AdaEmbedView access$getAdaView$p(AdaEmbedActivity adaEmbedActivity) {
AdaEmbedView adaEmbedView = adaEmbedActivity.adaView;
if (adaEmbedView == null) {
Intrinsics.throwUninitializedPropertyAccessException("adaView");
}
return adaEmbedView;
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AdaEmbedView.Settings settings = (AdaEmbedView.Settings) getIntent().getParcelableExtra(EXTRA_SETTINGS);
if (settings == null) {
throw new IllegalArgumentException("Settings must not be null!");
}
AttributeSet attributeSet = null;
AdaEmbedView adaEmbedView = new AdaEmbedView((Context) this, attributeSet, 2, attributeSet);
adaEmbedView.initialize(settings);
this.adaView = adaEmbedView;
setContentView(adaEmbedView);
AdaEmbedView adaEmbedView2 = this.adaView;
if (adaEmbedView2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("adaView");
}
adaEmbedView2.setFilePickerCallback(new Function1<AdaEmbedView.FilePickerCallback, Boolean>() {
{
super(1);
}
public Object invoke(Object obj) {
return Boolean.valueOf(invoke((AdaEmbedView.FilePickerCallback) obj));
}
public final boolean invoke(AdaEmbedView.FilePickerCallback filePickerCallback) {
Intrinsics.checkParameterIsNotNull(filePickerCallback, "filePickerCallback");
AdaEmbedActivity adaEmbedActivity = AdaEmbedActivity.this;
FilePickerHandler filePickerHandler = new FilePickerHandler(filePickerCallback);
filePickerHandler.openFilePicker(AdaEmbedActivity.this);
adaEmbedActivity.filePickerHandler = filePickerHandler;
return true;
}
});
}
protected final AdaEmbedView getAdaView() {
if (this.adaView == null) {
throw new UnsupportedOperationException("Ada view is not assigned yet");
}
AdaEmbedView adaEmbedView = this.adaView;
if (adaEmbedView == null) {
Intrinsics.throwUninitializedPropertyAccessException("adaView");
}
return adaEmbedView;
}
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
FilePickerHandler filePickerHandler = this.filePickerHandler;
if (filePickerHandler != null) {
filePickerHandler.handleResult(requestCode, resultCode, intent);
}
}
protected void onDestroy() {
super.onDestroy();
FilePickerHandler filePickerHandler = this.filePickerHandler;
if (filePickerHandler != null) {
filePickerHandler.cancel();
}
this.filePickerHandler = null;
}
}