正在查看: Adobe Acrobat v15.3 应用的 AdobeReader.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Adobe Acrobat v15.3 应用的 AdobeReader.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.adobe.reader;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.accessibility.AccessibilityManager;
import android.widget.Toast;
import com.adobe.libs.buildingblocks.utils.BBFileUtils;
import com.adobe.libs.buildingblocks.utils.e;
import com.adobe.libs.c.a.a;
import com.adobe.reader.analytics.ARDCMAnalytics;
import com.adobe.reader.config.ARConstants;
import com.adobe.reader.emm.AREMMManager;
import com.adobe.reader.filebrowser.ARFileBrowserUtils;
import com.adobe.reader.filebrowser.Recents.ARRecentsFilesManager;
import com.adobe.reader.framework.ui.FWDownloadFileAsyncTask;
import com.adobe.reader.help.AROnboardingHelpActivity;
import com.adobe.reader.misc.ARApp;
import com.adobe.reader.misc.ARFileTransferActivity;
import com.adobe.reader.misc.ARFileURLDownloadActivity;
import com.adobe.reader.utils.ARIntentUtils;
import com.adobe.reader.viewer.ARSplitPaneActivity;
import com.adobe.reader.viewer.ARViewerActivity;
import java.io.File;
public class AdobeReader extends a {
private FWDownloadFileAsyncTask mDownloadFileAsyncTask;
class DeleteCopyTempFolderAsyncTask extends AsyncTask<Void, Void, Void> {
private DeleteCopyTempFolderAsyncTask() {
}
@Override
public Void doInBackground(Void... voidArr) {
BBFileUtils.a(new File(ARFileBrowserUtils.getTempFileCopyPath()), true);
return null;
}
}
class MoveEntriesToDBAsyncTask extends AsyncTask<Void, Void, Void> {
private Intent mIntent;
public MoveEntriesToDBAsyncTask(Intent intent) {
this.mIntent = intent;
}
@Override
public Void doInBackground(Void... voidArr) {
ARRecentsFilesManager.moveExistingEntriesToDatabase();
return null;
}
@Override
public void onPostExecute(Void r3) {
super.onPostExecute((MoveEntriesToDBAsyncTask) r3);
AdobeReader.this.handleIntent(this.mIntent);
}
}
public void doActionAfterGettingDocPath(Intent intent, String str) {
Context appContext = ARApp.getAppContext();
if (intent.getData() != null && str == null) {
Toast.makeText(appContext, R.string.IDS_UNABLE_TO_SAVE_STREAM_AS_TEMPORARY_FILE, ARConstants.TOAST_MSG_DISPLAY_TIME_IN_MS).show();
} else if (str != null) {
Intent intent2 = new Intent(this, (Class<?>) ARViewerActivity.class);
intent2.putExtra(ARViewerActivity.EXTERNAL_CONTENT_DATA, str);
startActivity(intent2);
} else if (ARApp.wasWhatsNewDisplayed()) {
startActivity(new Intent(this, (Class<?>) ARSplitPaneActivity.class));
} else {
String a2 = BBFileUtils.a(this, ARFileBrowserUtils.getDefaultFileCopyPath(), getResources().getString(R.string.IDS_GETTING_STARTED_FILENAME) + ".pdf");
if (a2 != null) {
ARRecentsFilesManager.updateLocalEntryInRecentFilesList(a2, null, e.a());
}
if (((AccessibilityManager) getSystemService("accessibility")).isTouchExplorationEnabled()) {
ARApp.setWhatsNewDisplayed(true);
startActivity(new Intent(this, (Class<?>) ARSplitPaneActivity.class));
} else {
startActivity(new Intent(this, (Class<?>) AROnboardingHelpActivity.class));
}
}
finish();
}
public void handleIntent(final Intent intent) {
if (intent.getScheme() != null && (intent.getScheme().equalsIgnoreCase("http") || intent.getScheme().equalsIgnoreCase("https"))) {
Intent intent2 = new Intent(this, (Class<?>) ARFileURLDownloadActivity.class);
intent2.putExtra(ARFileTransferActivity.FILE_PATH_KEY, intent.getData());
startActivity(intent2);
finish();
return;
}
if (intent.getData() == null) {
doActionAfterGettingDocPath(intent, null);
return;
}
Context appContext = ARApp.getAppContext();
try {
String docPathFromIntentDataLocally = ARIntentUtils.getDocPathFromIntentDataLocally(intent, getContentResolver());
if (docPathFromIntentDataLocally == null || !BBFileUtils.e(docPathFromIntentDataLocally)) {
this.mDownloadFileAsyncTask = new FWDownloadFileAsyncTask(this, intent, new FWDownloadFileAsyncTask.FWAfterDownloadFileHandler() {
@Override
public void onFailure() {
AdobeReader.this.finish();
}
@Override
public void onSuccess(String str) {
AdobeReader.this.doActionAfterGettingDocPath(intent, str);
}
}, null, false);
this.mDownloadFileAsyncTask.taskExecute(new Void[0]);
} else {
doActionAfterGettingDocPath(intent, docPathFromIntentDataLocally);
}
} catch (IncompatibleClassChangeError e) {
Toast.makeText(appContext, R.string.IDS_ERR_NONE, ARConstants.TOAST_MSG_DISPLAY_TIME_IN_MS).show();
finish();
}
}
@Override
public void onBackPressed() {
if (this.mDownloadFileAsyncTask != null) {
this.mDownloadFileAsyncTask.cancel();
this.mDownloadFileAsyncTask = null;
}
super.onBackPressed();
}
@Override
public void onCreateRAW(Bundle bundle) {
super.onCreateRAW(bundle);
}
@Override
public void onPauseRAW() {
super.onPauseRAW();
ARDCMAnalytics.getInstance().pauseCollectingLifecycleData();
}
@Override
public void onResumeRAW() {
new DeleteCopyTempFolderAsyncTask().execute(new Void[0]);
Intent intent = getIntent();
if (getSharedPreferences(ARApp.ADOBE_READER_PREFERENCES, 0).getString("recentFile0", null) == null) {
handleIntent(intent);
} else {
new MoveEntriesToDBAsyncTask(intent).execute(new Void[0]);
}
String str = "EMM being used is: " + AREMMManager.getInstance().getEMMName();
super.onResumeRAW();
ARDCMAnalytics.getInstance().collectLifecycleData();
}
}