正在查看: Adobe Acrobat v15.3 应用的 n.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Adobe Acrobat v15.3 应用的 n.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.adobe.libs.services;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v4.media.TransportMediator;
import android.view.View;
import android.webkit.WebView;
import com.adobe.libs.buildingblocks.utils.BBFileUtils;
import com.adobe.reader.analytics.ARDCMAnalytics;
import com.adobe.reader.filebrowser.ARFileEntry;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.Locale;
public abstract class n extends WebView implements m {
static final boolean g;
protected com.adobe.libs.services.h.g f219a;
protected String b;
protected ag c;
protected com.adobe.libs.buildingblocks.a.b d;
protected com.adobe.libs.a.b e;
protected boolean f;
private com.adobe.libs.buildingblocks.a.a h;
private boolean i;
private af j;
private boolean k;
private boolean l;
private AlertDialog m;
static {
g = !n.class.desiredAssertionStatus();
}
public n(Context context, ag agVar, com.adobe.libs.buildingblocks.a.b bVar, com.adobe.libs.services.h.g gVar, com.adobe.libs.a.b bVar2) {
super(context);
this.i = true;
this.f = false;
this.k = false;
this.l = false;
this.m = null;
this.c = agVar;
this.d = bVar;
this.e = bVar2;
this.f219a = gVar;
setFilterTouchesWhenObscured(true);
}
private boolean a(af afVar) {
if (com.adobe.libs.buildingblocks.utils.i.b(getContext())) {
return false;
}
a(getContext().getString(f.IDS_NETWORK_ERROR), afVar);
return true;
}
static boolean a(n nVar) {
nVar.k = true;
return true;
}
public void o() {
byte b = 0;
if (a(new ab(this)) || !this.f) {
return;
}
setWebViewClient(new ai(this, b));
getSettings().setJavaScriptEnabled(true);
requestFocus(TransportMediator.KEYCODE_MEDIA_RECORD);
setOnTouchListener(new p(this));
String a2 = com.adobe.libs.services.a.a.a().a(com.adobe.libs.services.a.d.IMS);
String locale = Locale.getDefault().toString();
String str = "0.0";
try {
str = getContext().getPackageManager().getPackageInfo(getContext().getPackageName(), 0).versionName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
String str2 = a2 + "ims/authorize/v1?client_id=" + com.adobe.libs.services.auth.d.getInstance().getActiveClientID() + (this.k ? "&idp_flow=create_account" : ARFileEntry.DEFAULT_ENTRY_ICON_STRING) + "&response_type=device&device_id=" + com.adobe.libs.services.auth.d.getInstance().getDeviceID() + "&scope=AdobeID,openid,skybox&locale=" + locale + "&state={\"ac\":\"ReaderMobileAndroid4:Login,\"av\":\"" + str + "\"}";
String str3 = "Sign-in URL : " + str2;
com.adobe.libs.services.h.n.g();
loadUrl(str2);
}
public void a() {
if (com.adobe.libs.services.auth.d.getInstance().isSignedIn()) {
h();
return;
}
if (f()) {
setWebViewClient(new x(this));
loadUrl(getMarketingPageURL());
getSettings().setJavaScriptEnabled(true);
} else if (!com.adobe.libs.buildingblocks.utils.i.b(getContext())) {
a(getContext().getString(f.IDS_NETWORK_ERROR), new w(this));
} else {
this.m = new AlertDialog.Builder(getContext()).setTitle(getResources().getString(f.IDS_GOOGLE_PLAY_ALREADY_SUBSCRIBED_DIALOG_TITLE)).setMessage(getResources().getString(f.IDS_GOOGLE_PLAY_ALREADY_SUBSCRIBED_DIALOG_MESSAGE)).setPositiveButton(getResources().getString(f.IDS_SIGN_IN_STR), new v(this)).setNegativeButton(getResources().getString(f.IDS_CANCEL_STR), new u(this)).setOnCancelListener(new t(this)).show();
}
}
public void a(String str, af afVar) {
String string;
if (this.f) {
c();
setWebViewClient(new q(this));
getSettings().setJavaScriptEnabled(true);
try {
string = com.adobe.libs.services.h.m.a(e.adc_errorpage);
} catch (IOException e) {
string = getContext().getString(f.IDS_NETWORK_ERROR);
}
String replace = string.replace("$ERROR_STRING$", str).replace("$RETRY_STRING$", afVar != null ? getContext().getString(f.IDS_CLOUD_TAP_TO_RETRY_STR) : ARFileEntry.DEFAULT_ENTRY_ICON_STRING);
this.j = afVar;
loadDataWithBaseURL("file:///android_res/raw/", replace, BBFileUtils.j(".html"), "utf-8", ARFileEntry.DEFAULT_ENTRY_ICON_STRING);
n();
}
}
public final void a(String str, String str2) {
HashMap<String, Object> hashMap = new HashMap<>();
String str3 = str + ":" + str2;
hashMap.put("adb.event.eventInfo.marketingPageAction", str3);
this.e.trackAction(str3, null, null, hashMap, false);
}
protected final void a(URL url) {
String path = url.getPath();
String substring = path != null ? path.substring(path.lastIndexOf(File.separator) + 1) : null;
if (substring == null || !substring.equals("create_account")) {
return;
}
com.adobe.libs.services.h.g gVar = this.f219a;
String serviceType$795af651 = getServiceType$795af651();
if (this.e == null || serviceType$795af651 == null) {
return;
}
a("Service Marketing Page Sign Up Tapped", serviceType$795af651);
}
protected void b() {
}
protected void c() {
loadUrl("about:blank");
clearHistory();
clearCache(true);
}
public final void d() {
destroy();
}
@Override
public void destroy() {
this.c = new o(this);
if (this.m != null && this.m.isShowing()) {
this.m.dismiss();
}
super.destroy();
}
public void e() {
}
protected boolean f() {
return true;
}
public final void g() {
com.adobe.libs.services.h.g gVar = this.f219a;
String serviceType$795af651 = getServiceType$795af651();
if (this.e != null && serviceType$795af651 != null) {
a("Service Marketing Page Login Success", serviceType$795af651);
}
new com.adobe.libs.services.g.a(new z(this)).taskExecute(new Void[0]);
h();
}
public com.adobe.libs.a.b getAnalyticsHandler() {
return this.e;
}
protected abstract String getMarketingPageGetStartedSignInURL();
protected abstract String getMarketingPageGetStartedSignUpURL();
protected abstract String getMarketingPageURL();
public final String getServiceType$795af651() {
switch (s.f224a[this.f219a.ordinal()]) {
case 1:
return ARDCMAnalytics.CREATE_PDF;
case 2:
return "Acrobat Pro";
case 3:
return ARDCMAnalytics.EXPORT_PDF;
case 4:
return "Document Cloud";
default:
return null;
}
}
public abstract String getWebViewTitle();
protected void h() {
this.c.onSuccess();
}
protected final void i() {
if (a(new aa(this))) {
return;
}
if (com.adobe.libs.services.a.a.a().c()) {
j();
} else {
new l(this).taskExecute(new Void[0]);
}
}
public void j() {
if (!com.adobe.libs.services.auth.d.getInstance().isSignedIn()) {
o();
} else if (!g) {
throw new AssertionError();
}
}
public final void k() {
a();
}
public final void l() {
this.j.execute();
}
public final void m() {
boolean isFinishing = ((Activity) getContext()).isFinishing();
if (this.h == null && !isFinishing) {
this.h = new com.adobe.libs.buildingblocks.a.a(getContext(), this.d);
this.h.show();
} else if (isFinishing) {
n();
}
}
public final void n() {
if (this.h != null) {
this.h.dismiss();
this.h = null;
}
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
if (this.f) {
return;
}
this.f = true;
if (this.l) {
return;
}
a();
}
@Override
public void onDetachedFromWindow() {
this.f = false;
n();
setWebViewClient(null);
if (!com.adobe.libs.services.auth.d.getInstance().isSignedIn()) {
c();
}
super.onDetachedFromWindow();
}
@Override
public void onPopulateBaseURIsSuccess() {
if (this.f) {
j();
}
}
@Override
public void onPopuplateBaseURIsFailure() {
if (this.f) {
a(getContext().getString(f.IDS_NETWORK_ERROR), new r(this));
}
}
@Override
protected void onVisibilityChanged(View view, int i) {
super.onVisibilityChanged(view, i);
if (i == 0) {
if (com.adobe.libs.services.auth.d.getInstance().isSignedIn()) {
this.i = false;
this.c.onSuccess();
} else {
if (!this.i) {
a();
}
this.i = true;
}
}
}
public void setShowErrorScreen(boolean z) {
this.l = z;
}
}