Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 AuthActivity.java 源代码,内容仅作参考
package com.dropbox.core.android;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.dropbox.core.c;
import com.inmobi.commons.core.configs.AdConfig;
import java.util.Locale;
import java.util.Random;
public class AuthActivity extends Activity {
public static final Object i = new Object();
public static Intent j = null;
public static String k = null;
public static String l = "www.dropbox.com";
public static String m;
public static String n;
public static String[] o;
public static String p;
public String a;
public String b;
public String c;
public String d;
public String[] e;
public String f;
public String g = null;
public boolean h = false;
public static class a {
}
public class b implements Runnable {
public final Intent a;
public final String b;
public b(Intent intent, String str) {
this.a = intent;
this.b = str;
}
@Override
public final void run() {
Intent intent = this.a;
AuthActivity authActivity = AuthActivity.this;
Object obj = AuthActivity.i;
Log.d("com.dropbox.core.android.AuthActivity", "running startActivity in handler");
try {
PackageInfo a = myobfuscated.jh.b.a(authActivity, intent);
String str = this.b;
if (a != null) {
authActivity.startActivity(intent);
} else {
AuthActivity.a(authActivity, str);
}
authActivity.g = str;
AuthActivity.k = null;
AuthActivity.n = null;
AuthActivity.o = new String[0];
AuthActivity.p = null;
AuthActivity.l = "www.dropbox.com";
AuthActivity.m = null;
} catch (ActivityNotFoundException e) {
Object obj2 = AuthActivity.i;
Log.e("com.dropbox.core.android.AuthActivity", "Could not launch intent. User may have restricted profile", e);
authActivity.finish();
}
}
}
public static void a(AuthActivity authActivity, String str) {
authActivity.getClass();
Locale locale = Locale.getDefault();
Locale locale2 = new Locale(locale.getLanguage(), locale.getCountry());
String[] strArr = authActivity.e;
String str2 = strArr.length > 0 ? strArr[0] : "0";
String locale3 = locale2.toString();
String str3 = authActivity.b;
Random random = c.a;
authActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(c.a(str3, "1/connect") + "?" + c.b(locale3, new String[]{"k", authActivity.a, "n", str2, "api", authActivity.c, "state", str}))));
}
@Override
public final void onCreate(Bundle bundle) {
this.a = k;
this.b = l;
this.c = m;
this.d = n;
this.e = o;
this.f = p;
if (bundle == null) {
j = null;
this.g = null;
} else {
this.g = bundle.getString("SIS_KEY_AUTH_STATE_NONCE");
}
setTheme(16973840);
super.onCreate(bundle);
}
@Override
public final void onNewIntent(Intent intent) {
String str;
String str2;
String str3;
String str4;
Intent intent2;
if (this.g == null) {
j = null;
this.g = null;
k = null;
n = null;
o = new String[0];
p = null;
l = "www.dropbox.com";
m = null;
finish();
return;
}
if (intent.hasExtra("ACCESS_TOKEN")) {
str2 = intent.getStringExtra("ACCESS_TOKEN");
str3 = intent.getStringExtra("ACCESS_SECRET");
str4 = intent.getStringExtra("UID");
str = intent.getStringExtra("AUTH_STATE");
} else {
Uri data2 = intent.getData();
if (data2 == null || !"/connect".equals(data2.getPath())) {
str = null;
str2 = null;
str3 = null;
str4 = null;
} else {
try {
str2 = data2.getQueryParameter("oauth_token");
} catch (UnsupportedOperationException unused) {
str2 = null;
str3 = null;
}
try {
str3 = data2.getQueryParameter("oauth_token_secret");
try {
str4 = data2.getQueryParameter("uid");
try {
str = data2.getQueryParameter("state");
} catch (UnsupportedOperationException unused2) {
str = null;
if (str2 != null) {
}
intent2 = null;
j = intent2;
this.g = null;
k = null;
n = null;
o = new String[0];
p = null;
l = "www.dropbox.com";
m = null;
finish();
}
} catch (UnsupportedOperationException unused3) {
str4 = null;
}
} catch (UnsupportedOperationException unused4) {
str3 = null;
str4 = str3;
str = null;
if (str2 != null) {
}
intent2 = null;
j = intent2;
this.g = null;
k = null;
n = null;
o = new String[0];
p = null;
l = "www.dropbox.com";
m = null;
finish();
}
}
}
if (str2 != null || str2.equals("") || str3 == null || str3.equals("") || str4 == null || str4.equals("") || str == null || str.equals("")) {
intent2 = null;
} else if (!this.g.equals(str)) {
j = null;
this.g = null;
k = null;
n = null;
o = new String[0];
p = null;
l = "www.dropbox.com";
m = null;
finish();
return;
} else {
intent2 = new Intent();
intent2.putExtra("ACCESS_TOKEN", str2);
intent2.putExtra("ACCESS_SECRET", str3);
intent2.putExtra("UID", str4);
}
j = intent2;
this.g = null;
k = null;
n = null;
o = new String[0];
p = null;
l = "www.dropbox.com";
m = null;
finish();
}
@Override
public final void onResume() {
super.onResume();
if (isFinishing()) {
return;
}
if (this.g != null || this.a == null) {
j = null;
this.g = null;
k = null;
n = null;
o = new String[0];
p = null;
l = "www.dropbox.com";
m = null;
finish();
return;
}
j = null;
if (this.h) {
Log.w("com.dropbox.core.android.AuthActivity", "onResume called again before Handler run");
return;
}
byte[] bArr = new byte[16];
synchronized (i) {
}
FixedSecureRandom.get().nextBytes(bArr);
StringBuilder sb = new StringBuilder("oauth2:");
for (int i2 = 0; i2 < 16; i2++) {
sb.append(String.format("%02x", Integer.valueOf(bArr[i2] & AdConfig.NETWORK_LOAD_LIMIT_DISABLED)));
}
String sb2 = sb.toString();
Intent intent = new Intent("com.dropbox.android.AUTHENTICATE_V2");
intent.setPackage("com.dropbox.android");
intent.putExtra("CONSUMER_KEY", this.a);
intent.putExtra("CONSUMER_SIG", "");
intent.putExtra("DESIRED_UID", this.d);
intent.putExtra("ALREADY_AUTHED_UIDS", this.e);
intent.putExtra("SESSION_ID", this.f);
intent.putExtra("CALLING_PACKAGE", getPackageName());
intent.putExtra("CALLING_CLASS", getClass().getName());
intent.putExtra("AUTH_STATE", sb2);
new Handler(Looper.getMainLooper()).post(new b(intent, sb2));
this.h = true;
}
@Override
public final void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putString("SIS_KEY_AUTH_STATE_NONCE", this.g);
}
}