正在查看: Oolka v2.4.42 应用的 n.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 n.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package cl.json.social;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Parcelable;
import android.text.TextUtils;
import co.hyperverge.hyperkyc.data.models.WorkflowModule;
import co.hyperverge.hyperkyc.ui.WebViewFragment;
import co.hyperverge.hyperkyc.ui.form.FormFragment;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableMap;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
public abstract class n {
public final ReactApplicationContext a;
public Intent b;
public String c = "Share";
public cl.json.d d;
public ReadableMap e;
public n(ReactApplicationContext reactApplicationContext) {
this.a = reactApplicationContext;
n(new Intent("android.intent.action.SEND"));
f().setType("text/plain");
}
public static boolean j(String str, ReadableMap readableMap) {
return (readableMap == null || !readableMap.hasKey(str) || readableMap.isNull(str)) ? false : true;
}
public static boolean k(String str, Context context) {
try {
context.getPackageManager().getPackageInfo(str, 1);
return true;
} catch (PackageManager.NameNotFoundException unused) {
return false;
}
}
public static String o(String str) {
try {
return URLEncoder.encode(str, "UTF-8");
} catch (UnsupportedEncodingException unused) {
throw new RuntimeException("URLEncoder.encode() failed for " + str);
}
}
public String a() {
return null;
}
public abstract String b();
public final ComponentName[] c(ReadableArray readableArray) {
if (readableArray == null) {
return null;
}
Intent intent = new Intent(f().getAction());
intent.setType(f().getType());
ArrayList arrayList = new ArrayList();
List<ResolveInfo> queryIntentActivities = this.a.getPackageManager().queryIntentActivities(intent, 0);
for (int i = 0; i < readableArray.size(); i++) {
String string = readableArray.getString(i);
for (ResolveInfo resolveInfo : queryIntentActivities) {
if (resolveInfo.activityInfo.packageName.equals(string)) {
ActivityInfo activityInfo = resolveInfo.activityInfo;
arrayList.add(new ComponentName(activityInfo.packageName, activityInfo.name));
}
}
}
return (ComponentName[]) arrayList.toArray(new ComponentName[0]);
}
public cl.json.d d(ReadableMap readableMap) {
String string = j("filename", readableMap) ? readableMap.getString("filename") : null;
Boolean bool = Boolean.FALSE;
if (j("useInternalStorage", readableMap)) {
bool = Boolean.valueOf(readableMap.getBoolean("useInternalStorage"));
}
Boolean bool2 = bool;
return j(FormFragment.ARG_TYPE, readableMap) ? new cl.json.d(readableMap.getString(WebViewFragment.ARG_URL), readableMap.getString(FormFragment.ARG_TYPE), string, bool2, this.a) : new cl.json.d(readableMap.getString(WebViewFragment.ARG_URL), string, bool2, this.a);
}
public cl.json.e e(ReadableMap readableMap) {
ArrayList arrayList = new ArrayList();
if (j("filenames", readableMap)) {
ReadableArray array = readableMap.getArray("filenames");
for (int i = 0; i < array.size(); i++) {
arrayList.add(array.getString(i));
}
}
Boolean bool = Boolean.FALSE;
if (j("useInternalStorage", readableMap)) {
bool = Boolean.valueOf(readableMap.getBoolean("useInternalStorage"));
}
Boolean bool2 = bool;
return j(FormFragment.ARG_TYPE, readableMap) ? new cl.json.e(readableMap.getArray("urls"), arrayList, readableMap.getString(FormFragment.ARG_TYPE), bool2, this.a) : new cl.json.e(readableMap.getArray("urls"), arrayList, bool2, this.a);
}
public Intent f() {
return this.b;
}
public Intent[] g(Intent intent, Uri uri) {
List<ResolveInfo> queryIntentActivities = this.a.getPackageManager().queryIntentActivities(intent, 0);
Intent[] intentArr = new Intent[queryIntentActivities.size()];
for (int i = 0; i < queryIntentActivities.size(); i++) {
ResolveInfo resolveInfo = queryIntentActivities.get(i);
String str = resolveInfo.activityInfo.packageName;
Intent intent2 = new Intent();
intent2.setComponent(new ComponentName(str, resolveInfo.activityInfo.name));
intent2.setAction("android.intent.action.VIEW");
intent2.setDataAndType(uri, intent.getType());
intent2.addFlags(1);
intentArr[i] = new Intent(intent2);
}
return intentArr;
}
public abstract String h();
public abstract String i();
public void l(ReadableMap readableMap) throws ActivityNotFoundException {
this.e = readableMap;
if (j("isNewTask", readableMap) && readableMap.getBoolean("isNewTask")) {
f().addFlags(268468224);
}
if (j("subject", readableMap)) {
f().putExtra("android.intent.extra.SUBJECT", readableMap.getString("subject"));
}
if (j("email", readableMap)) {
f().putExtra("android.intent.extra.EMAIL", new String[]{readableMap.getString("email")});
}
if (j(WorkflowModule.Properties.Section.Component.SubType.Label.TITLE, readableMap)) {
this.c = readableMap.getString(WorkflowModule.Properties.Section.Component.SubType.Label.TITLE);
}
String string = j("message", readableMap) ? readableMap.getString("message") : "";
String string2 = j("social", readableMap) ? readableMap.getString("social") : "";
if (string2.equals("sms")) {
String string3 = readableMap.getString("recipient");
if (!string3.isEmpty()) {
f().putExtra("address", string3);
}
}
if (string2.equals("whatsapp") && readableMap.hasKey("whatsAppNumber")) {
f().putExtra("jid", readableMap.getString("whatsAppNumber") + "@s.whatsapp.net");
}
if (string2.equals("whatsappbusiness") && readableMap.hasKey("whatsAppNumber")) {
f().putExtra("jid", readableMap.getString("whatsAppNumber") + "@s.whatsapp.net");
}
if (j("urls", readableMap)) {
cl.json.e e = e(readableMap);
if (e.f()) {
ArrayList<? extends Parcelable> d = e.d();
f().setAction("android.intent.action.SEND_MULTIPLE");
f().setType(e.c());
f().putParcelableArrayListExtra("android.intent.extra.STREAM", d);
f().addFlags(1);
if (TextUtils.isEmpty(string)) {
return;
}
f().putExtra("android.intent.extra.TEXT", string);
return;
}
if (TextUtils.isEmpty(string)) {
f().putExtra("android.intent.extra.TEXT", readableMap.getArray("urls").getString(0));
return;
}
f().putExtra("android.intent.extra.TEXT", string + " " + readableMap.getArray("urls").getString(0));
return;
}
if (!j(WebViewFragment.ARG_URL, readableMap)) {
if (TextUtils.isEmpty(string)) {
return;
}
f().putExtra("android.intent.extra.TEXT", string);
return;
}
cl.json.d d2 = d(readableMap);
this.d = d2;
if (d2.f()) {
Uri d3 = this.d.d();
f().setType(this.d.c());
f().putExtra("android.intent.extra.STREAM", d3);
f().addFlags(1);
if (TextUtils.isEmpty(string)) {
return;
}
f().putExtra("android.intent.extra.TEXT", string);
return;
}
if (TextUtils.isEmpty(string)) {
f().putExtra("android.intent.extra.TEXT", readableMap.getString(WebViewFragment.ARG_URL));
return;
}
f().putExtra("android.intent.extra.TEXT", string + " " + readableMap.getString(WebViewFragment.ARG_URL));
}
public void m() throws ActivityNotFoundException {
Intent createChooser;
IntentSender intentSender;
Activity currentActivity = this.a.getCurrentActivity();
if (currentActivity == null) {
TargetChosenReceiver.a("Something went wrong");
return;
}
if (TargetChosenReceiver.d()) {
intentSender = TargetChosenReceiver.c(this.a);
createChooser = Intent.createChooser(f(), this.c, intentSender);
} else {
createChooser = Intent.createChooser(f(), this.c);
intentSender = null;
}
createChooser.addFlags(1073741824);
if (j("showAppsToView", this.e) && j(WebViewFragment.ARG_URL, this.e)) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setType(this.d.c());
createChooser.putExtra("android.intent.extra.INITIAL_INTENTS", g(intent, this.d.d()));
}
if (j("excludedActivityTypes", this.e)) {
createChooser.putExtra("android.intent.extra.EXCLUDE_COMPONENTS", c(this.e.getArray("excludedActivityTypes")));
currentActivity.startActivityForResult(createChooser, 16845);
} else {
currentActivity.startActivityForResult(createChooser, 16845);
}
if (intentSender == null) {
WritableMap createMap = Arguments.createMap();
createMap.putBoolean("success", true);
createMap.putString("message", "OK");
TargetChosenReceiver.b(createMap);
}
}
public void n(Intent intent) {
this.b = intent;
}
}