搜书大师 v23.2版本的 MD5 值为:5ee433f6456b6278bd6e80a5d44df55e
以下内容为反编译后的 AboutAct.java 源代码,内容仅作参考
package com.flyersoft.WB;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.Parcelable;
import android.text.ClipboardManager;
import android.text.Html;
import android.text.Spanned;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import cd.InterfaceC0548;
import com.flyersoft.baseapplication.been.account.UploadUserDateResult;
import com.flyersoft.baseapplication.z2;
import com.flyersoft.components.m;
import com.flyersoft.components.q;
import com.flyersoft.components.r;
import com.flyersoft.discuss.z;
import com.flyersoft.seekbooks.ActivityMain;
import com.flyersoft.seekbooks.R;
import com.flyersoft.seekbooks.k;
import com.flyersoft.seekbooks.q;
import com.ksdk.ssds.manager.b;
import com.lygame.aaa.e50;
import com.lygame.aaa.e81;
import com.lygame.aaa.o50;
import com.lygame.aaa.pk2;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
public class AboutAct extends SwipeBaseHeaderActivity implements View.OnClickListener {
public static final int BACKUP_FAILED = 1002;
public static final int BACKUP_FINISHED = 1001;
public static final int CLOUD_BACKUP_FINISH = 1006;
public static final int CLOUD_BACKUP_PROGRESS = 1007;
public static final int CLOUD_BACKUP_READY = 1005;
public static final int CLOUD_RESTORE_FILE = 1009;
public static final int CLOUD_RESTORE_PROGRESS = 1008;
public static final int HIDE_TOAST = 1022;
static String PROMO_PIC = "http://www.moonreader.cn/downloader/promo.jpg";
public static final int RESTORE_FAILED = 1004;
public static final int RESTORE_FINISHED = 1003;
public static final int SHOW_ALERT = 1021;
public static final int SHOW_TOAST = 1020;
public static final String SUGGEST_TO_FRIEND = "碰到喜欢看书的朋友,记得推荐大师给他们哦";
static String shareCls;
static String sharePkg;
ProgressDialog progressDlg;
String post_no_ad = "<font color=#009689>发帖免广告</font><br><br><small>在任何网上论坛/微博/朋友圈/QQ空间/公众号/头条等推荐搜书大师,免3个月广告起,每多1个跟帖/评论/点赞/转发多免1个月,可高达2年(只需有20个跟帖/评论/点赞即可获得免广告两年服务)。<br><br><b><font color=#ee1601>如跟帖/评论/转发/点赞超过100, 将可获得永久免广告特权!</font></b><br><br>请注意,如果帖子被删除,需要换地方重新发帖, 否则免广告特权将被取消;发帖前请先加QQ群跟管理员确认。</small><br>";
public Handler handler = new Handler(Looper.getMainLooper()) {
@Override
public void handleMessage(Message msg) {
if (AboutAct.this.isFinishing()) {
return;
}
int i = msg.what;
if (i == 1020) {
o50.p2(AboutAct.this, (String) msg.obj);
return;
}
if (i == 1021) {
o50.n2(AboutAct.this, (CharSequence) msg.obj);
return;
}
if (i == 1022) {
o50.n1();
return;
}
if (i == 1009) {
AboutAct.this.doCloudRestore4((String) msg.obj);
return;
}
if (i == 1007) {
AboutAct aboutAct = AboutAct.this;
aboutAct.createProgressDlg(aboutAct.getString(R.string.backup), (String) msg.obj);
return;
}
if (i == 1008) {
AboutAct aboutAct2 = AboutAct.this;
aboutAct2.createProgressDlg(aboutAct2.getString(R.string.restore), (String) msg.obj);
return;
}
if (i == 1005) {
AboutAct.this.doCloudBackup3();
return;
}
AboutAct.this.hideProgressDlg();
if (msg.what == 1001) {
String str = msg.arg1 == 1 ? "备份文件仅包含在线书籍, 如要迁移本地书籍到新设备" : "备份文件未包含书籍资料, 如要完整迁移到新设备";
new m.c(AboutAct.this).m(Html.fromHtml(e50.W0("<br>已备份到<br>" + AboutAct.this.getBackupFile() + "<br><br><small><font color=\"#888888\">(提示: " + str + ", 请把整个目录\"/sdcard/Books/Soushu\"拷贝过去)</font><br></small>"))).w(e50.W0("知道了"), null).p(e50.W0("发送备份文件"), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AboutAct aboutAct3 = AboutAct.this;
e50.y6(aboutAct3, aboutAct3.getBackupFile());
}
}).d(false).C();
}
if (msg.what == 1002) {
AboutAct aboutAct3 = AboutAct.this;
o50.o2(aboutAct3, aboutAct3.getString(R.string.backup_failed), (String) msg.obj);
}
if (msg.what == 1003) {
new m.c(AboutAct.this).z(e50.W0("恢复成功")).m("\n请自行重启搜书大师").v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
System.exit(0);
}
}).d(false).C();
}
if (msg.what == 1004) {
o50.n2(AboutAct.this, (String) msg.obj);
}
if (msg.what == 1006) {
o50.n2(AboutAct.this, Html.fromHtml(e50.W0("<br>云端备份已完成.<br><br><small><font color=\"#888888\">(提示: 备份内容包括在线书籍, 追书列表, 阅读设置, 读书笔记, 书架等; 不包含本地书籍文件, 请自行备份本地书籍目录\"<b>/sdcard/Books/Soushu</b>\")</font><br></small>")));
}
}
};
public interface AfterShare {
void OnShared();
}
public static class ChooserArrayAdapter extends ArrayAdapter<String> {
Context mContext;
List<String> mPackages;
PackageManager mPm;
int mTextViewResourceId;
public ChooserArrayAdapter(Context context, int resource, int textViewResourceId, List<String> packages) {
super(context, resource, textViewResourceId, packages);
this.mContext = context;
this.mPm = context.getPackageManager();
this.mTextViewResourceId = textViewResourceId;
this.mPackages = packages;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
String str = this.mPackages.get(position);
View view = super.getView(position, convertView, parent);
try {
CharSequence applicationLabel = this.mPm.getApplicationLabel(this.mPm.getApplicationInfo(str, 0));
Drawable K2 = o50.K2(this.mContext.getResources(), this.mPm.getApplicationIcon(str), e50.k0(40.0f), e50.k0(40.0f));
TextView textView = (TextView) view.findViewById(this.mTextViewResourceId);
textView.setTextSize(17.0f);
textView.setText(applicationLabel);
textView.setCompoundDrawablesWithIntrinsicBounds(K2, (Drawable) null, (Drawable) null, (Drawable) null);
textView.setCompoundDrawablePadding((int) TypedValue.applyDimension(1, 12.0f, getContext().getResources().getDisplayMetrics()));
} catch (Exception e) {
e50.S0(e);
}
return view;
}
}
public void createProgressDlg(String title, String info) {
ProgressDialog progressDialog = this.progressDlg;
if (progressDialog != null) {
progressDialog.setTitle(title);
this.progressDlg.setMessage(info);
} else {
ProgressDialog g0 = e50.g0(this, title, info, true, true);
this.progressDlg = g0;
g0.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
AboutAct.this.progressDlg = null;
}
});
}
}
public void doCloudBackup() {
String str;
if (e50.T5(this)) {
return;
}
if (q.d() && q.x()) {
doCloudBackup2();
return;
}
m.c cVar = new m.c(this);
if (q.d()) {
str = "<font color=#009689>加入会员</font><br><br>注册成为搜书大师会员, 每月" + q.p() + "元会员费即可获得云端备份, 免广告特权等服务。";
} else {
str = "<br>请先登录.";
}
cVar.m(Html.fromHtml(e50.W0(str))).v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (q.d()) {
AboutAct.this.doJoinMember2();
} else {
q.D(AboutAct.this, 101);
}
}
}).o(R.string.cancel, null).d(false).C();
}
private void doCloudBackup2() {
createProgressDlg(getString(R.string.backup), e50.W0("正在备份, 请稍等..."));
new Thread() {
@Override
public void run() {
try {
r.j(e50.g8, AboutAct.this.getCloudBackupFile(), true, true);
Handler handler = AboutAct.this.handler;
handler.sendMessage(handler.obtainMessage(1005, 3, 0));
} catch (Exception e) {
e50.S0(e);
Handler handler2 = AboutAct.this.handler;
handler2.sendMessage(handler2.obtainMessage(1002, e50.U0(e)));
}
}
}.start();
}
public void doCloudBackup3() {
try {
createProgressDlg(getString(R.string.backup), e50.W0("正在上传, 请稍等..."));
q.E(getCloudBackupFile(), new z.ResultProgressInterface() {
@Override
public void done(boolean success, Object obj) {
if (success) {
AboutAct.this.handler.sendEmptyMessage(1006);
return;
}
AboutAct aboutAct = AboutAct.this;
StringBuilder sb = new StringBuilder();
sb.append("\n云端备份失败. ");
sb.append(obj instanceof Throwable ? e50.U0((Throwable) obj) : "");
aboutAct.alert(sb.toString());
}
@Override
public void progress(int progress, int total) {
Handler handler = AboutAct.this.handler;
handler.sendMessage(handler.obtainMessage(1007, e50.W0("云端备份上传进度: " + progress + "%")));
}
});
} catch (Exception e) {
e50.S0(e);
hideProgressDlg();
alert("\n云端备份错误: " + e50.U0(e));
}
}
public void doCloudRestore() {
String str;
if (e50.T5(this)) {
return;
}
if (q.d() && q.x()) {
doCloudRestore2();
return;
}
m.c cVar = new m.c(this);
if (q.d()) {
str = "<font color=#009689>加入会员</font><br><br>注册成为搜书大师会员, 每月" + q.p() + "元会员费即可获得云端备份, 免广告特权等服务。";
} else {
str = "<br>请先登录.";
}
cVar.m(Html.fromHtml(e50.W0(str))).v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (q.d()) {
AboutAct.this.doJoinMember2();
} else {
q.D(AboutAct.this, 102);
}
}
}).o(R.string.cancel, null).d(false).C();
}
private void doCloudRestore2() {
new m.c(this).m(Html.fromHtml("<h5>云端恢复</h5>执行恢复操作将用备份数据替换所有阅读设置, 追书列表, 书架等内容, 是否继续?")).v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AboutAct.this.doCloudRestore3();
AboutAct.this.toast("正在检查云端备份...");
}
}).o(R.string.cancel, null).C();
}
public void doCloudRestore3() {
q.getUserFiles(new e81() {
@Override
public void onComplete() {
}
@Override
public void onError(Throwable e) {
AboutAct.this.alert("\n查找云端备份时发生错误: " + e50.U0(e));
}
@Override
public void onNext(Object o) {
AboutAct.this.hideToast();
boolean z = true;
if (o != null) {
String str = null;
String v0 = o50.v0(AboutAct.this.getCloudBackupFile());
for (UploadUserDateResult uploadUserDateResult : (List) o) {
if (o50.v0(uploadUserDateResult.getFilePath()).equals(v0) && (str == null || uploadUserDateResult.getFilePath().contains(".myqcloud.com"))) {
str = uploadUserDateResult.getFilePath();
}
}
if (str != null) {
e50.N5("target: " + str);
Handler handler = AboutAct.this.handler;
handler.sendMessage(handler.obtainMessage(1009, str));
if (z) {
AboutAct.this.alert("\n云端备份未创建");
return;
}
return;
}
}
z = false;
if (z) {
}
}
@Override
public void onStart() {
}
@Override
public void updateProgress(long readLength, long countLength) {
}
});
}
public void doCloudRestore4(String cloud_file) {
createProgressDlg(getString(R.string.restore), e50.W0("正在下载..."));
o50.L(cloud_file, getCloudBackupFile(), new o50.d() {
@Override
public void done(String filename, String err) {
if (filename != null) {
AboutAct aboutAct = AboutAct.this;
aboutAct.doRestore4(aboutAct.getCloudBackupFile());
return;
}
AboutAct.this.alert("云端恢复失败: " + err);
}
}, this.handler, 1008);
}
public void doJoinMember1() {
if (e50.T5(this)) {
return;
}
if (!q.d()) {
q.D(this, 100);
} else {
doJoinMember2();
}
}
public void doJoinMember2() {
Intent intent = new Intent(this, (Class<?>) UserInfoAct.class);
intent.putExtra("join", true);
startActivity(intent);
}
public static void doJoinQQ(Context context) {
try {
ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService("clipboard");
String str = "" + z2.qqNumber;
clipboardManager.setText(str);
o50.q2(context, e50.W0("搜书大师QQ群号已复制到粘贴板:" + str), 0);
} catch (Exception e) {
e50.S0(e);
}
}
public static void doOpenMarket(Activity act) {
e50.Z5(act, true);
}
public static void doSocialShare(final Activity act, final AfterShare afterShare, final boolean recordShare, final int usePromoPicRate) {
boolean z;
shareCls = null;
sharePkg = null;
boolean z2 = false;
try {
final ArrayList arrayList = new ArrayList();
final ArrayList arrayList2 = new ArrayList();
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
List<ResolveInfo> queryIntentActivities = act.getPackageManager().queryIntentActivities(intent, 0);
if (!queryIntentActivities.isEmpty()) {
Iterator<ResolveInfo> it = queryIntentActivities.iterator();
boolean z3 = false;
boolean z4 = false;
boolean z5 = false;
while (it.hasNext()) {
String str = it.next().activityInfo.name;
if (str.equals("com.tencent.mm.ui.tools.ShareImgUI")) {
z3 = true;
} else if (str.equals("com.tencent.mobileqq.activity.JumpActivity")) {
z4 = true;
} else if (str.equals("com.sina.weibo.composerinde.ComposerDispatchActivity")) {
z5 = true;
}
}
for (ResolveInfo resolveInfo : queryIntentActivities) {
String str2 = resolveInfo.activityInfo.name;
if (str2.contains("tencent.mm")) {
if (z3) {
z = str2.equals("com.tencent.mm.ui.tools.ShareImgUI");
}
z = true;
} else if (str2.contains("mobileqq")) {
if (z4) {
z = str2.equals("com.tencent.mobileqq.activity.JumpActivity");
}
z = true;
} else if (str2.contains("weibo")) {
if (z5) {
z = str2.equals("com.sina.weibo.composerinde.ComposerDispatchActivity");
}
z = true;
} else {
z = false;
}
if (z) {
arrayList.add(resolveInfo.activityInfo.packageName);
arrayList2.add(resolveInfo.activityInfo.name);
}
}
if (arrayList.size() > 0) {
new AlertDialog.Builder(act).setTitle(e50.W0("分享到")).setAdapter(new ChooserArrayAdapter(act, android.R.layout.select_dialog_item, android.R.id.text1, arrayList), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int item) {
AboutAct.sharePkg = (String) arrayList.get(item);
AboutAct.shareCls = (String) arrayList2.get(item);
AboutAct.doSocialShareFinal(act, usePromoPicRate);
AfterShare afterShare2 = afterShare;
if (afterShare2 != null) {
afterShare2.OnShared();
}
if (recordShare) {
AboutAct.recordAppShare();
}
}
}).setCancelable(false).show();
z2 = true;
}
}
} catch (Exception e) {
e50.S0(e);
}
if (z2) {
return;
}
shareCls = null;
sharePkg = null;
doSocialShareFinal(act, usePromoPicRate);
if (afterShare != null) {
afterShare.OnShared();
}
if (recordShare) {
recordAppShare();
}
}
public static void doSocialShareContent(Activity act) {
try {
Intent intent = new Intent();
intent.setAction("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.SUBJECT", e50.W0("超好用的搜书大师"));
intent.putExtra("android.intent.extra.TEXT", getShareAppContent());
if (sharePkg != null && shareCls != null) {
intent.setComponent(new ComponentName(sharePkg, shareCls));
intent.setPackage(shareCls);
act.startActivity(intent);
} else {
act.startActivity(Intent.createChooser(intent, ""));
}
} catch (Exception e) {
e50.S0(e);
}
}
public static void doSocialShareFinal(Activity act, int usePromoPicRate) {
if (o50.R1(100) < usePromoPicRate) {
doSocialSharePromo(act);
} else {
doSocialShareContent(act);
}
}
public static void doSocialSharePromo(final Activity act) {
final ProgressDialog g0 = e50.g0(act, null, "正在生成永久会员分享图...", true, true);
new Thread() {
@Override
public void run() {
AboutAct.getPromoPicFromNetwork();
act.runOnUiThread(new Runnable() {
@Override
public void run() {
ProgressDialog progressDialog = g0;
if (progressDialog != null) {
progressDialog.dismiss();
}
if (act.isFinishing() || AboutAct.doSocialSharePromoFinal(act)) {
return;
}
AboutAct.doSocialShareContent(act);
}
});
}
}.start();
}
public static boolean doSocialSharePromoFinal(Activity act) {
if (!o50.A1(promoCacheFile())) {
return false;
}
try {
Uri k4 = e50.k4(act, new File(promoCacheFile()));
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("image/png");
intent.putExtra("android.intent.extra.SUBJECT", "免费获取搜书大师永久会员");
intent.putExtra("android.intent.extra.STREAM", k4);
intent.addFlags(1);
intent.addFlags(268435456);
if (sharePkg != null && shareCls != null) {
intent.setComponent(new ComponentName(sharePkg, shareCls));
intent.setPackage(shareCls);
act.startActivity(intent);
} else {
act.startActivity(Intent.createChooser(intent, ""));
}
return true;
} catch (Exception e) {
e50.S0(e);
return false;
}
}
public static String getNotShareContent() {
return e50.W0(new String[]{"大师失望的走了", "大师默默地转身离开了", "是我们做的不够好吗?请给我们继续努力的机会吧!", SUGGEST_TO_FRIEND}[o50.R1(4)]);
}
static void getPromoPicFromNetwork() {
o50.C(promoCacheFile());
try {
o50.t1(o50.d1(PROMO_PIC), promoCacheFile());
if (o50.o0(promoCacheFile()) < 1000) {
e50.N5("*delete empty promo file");
o50.C(promoCacheFile());
} else {
e50.N5("#promo file ok");
}
} catch (Exception e) {
e50.S0(e);
}
}
private static int getRateBackground() {
int R1 = o50.R1(5);
return R1 != 1 ? R1 != 2 ? R1 != 3 ? R1 != 4 ? R.drawable.ratedlg : R.drawable.ratedlg4 : R.drawable.ratedlg3 : R.drawable.ratedlg2 : R.drawable.ratedlg1;
}
public static String getShareAppContent() {
String o1 = e50.o1();
return e50.W0(new String[]{"我想看的书,99%都能搜到,强烈推荐:" + o1, "这个免费小说App很好用,功能强大:" + o1, "感觉很惊喜,功能齐全,找书方面也格外强大,我要的书,大部分都有:" + o1, "免费的看书App,想看的书大都能找到,推荐大家用一下,亲测好用:" + o1, "发现一款绝对良心的小说app,叫搜书大师,强烈推荐:" + o1, "用着感觉非常不错,书源非常多,很意外,推荐!" + o1, "先定个小目标,比如一秒钟找到你想看的书:" + o1, "先定个小目标,比如一秒钟找到你想看的书:" + o1, "书荒?不可能的,这辈子都不会书荒的,因为有我超喜欢的搜书大师:" + o1, "书荒?不可能的,这辈子都不会书荒的,因为有我超喜欢的搜书大师:" + o1}[o50.R1(10)]);
}
static String promoCacheFile() {
return e50.x + "/promo.jpg";
}
public static void recordAppShare() {
if (o50.R1(10) != 0) {
e50.Ea = System.currentTimeMillis();
}
if (e50.m <= 0 || !e50.F()) {
return;
}
o50.q2(e50.S1(), "提示: 在分享搜书大师给您的朋友后, 可获得" + e50.m + "天内免广告特权", 1);
}
public static boolean showPromoPic(final Activity act) {
Drawable g0;
if (!o50.A1(promoCacheFile()) || (g0 = o50.g0(act, promoCacheFile())) == null) {
return false;
}
new k(act, g0, new o50.g() {
@Override
public void onCallBack(Object obj) {
AboutAct.shareCls = null;
AboutAct.sharePkg = null;
AboutAct.doSocialSharePromoFinal(act);
}
}, new o50.g() {
@Override
public void onCallBack(Object obj) {
AboutAct.doJoinQQ(act);
}
}).show();
return true;
}
public static void showRateTip(final Activity act, boolean forceShow, final int usePromoPicRate) {
boolean z;
int i;
if (!forceShow) {
if (e50.r2 < 8 || (i = e50.t2) > 5) {
return;
}
int i2 = i + 1;
if (o50.R1((i2 * i2 * i2 * i2 * i2) + 8) != 0) {
return;
}
long X0 = o50.X0();
SharedPreferences sharedPreferences = act.getSharedPreferences(e50.q0, 0);
if (sharedPreferences.getLong("lastRateDate", 0L) == X0) {
return;
}
sharedPreferences.edit().putLong("lastRateDate", X0).apply();
if (o50.R1(100) < usePromoPicRate) {
new Thread() {
@Override
public void run() {
AboutAct.getPromoPicFromNetwork();
act.runOnUiThread(new Runnable() {
@Override
public void run() {
if (act.isFinishing() || AboutAct.showPromoPic(act)) {
return;
}
AboutAct.showRateTip(act, true, 0);
}
});
}
}.start();
return;
}
}
e50.t2++;
try {
z = new Date(System.currentTimeMillis()).before(new SimpleDateFormat("yyyy-MM-dd", Locale.US).parse("2019-2-10"));
} catch (Exception e) {
e50.S0(e);
z = false;
}
View inflate = LayoutInflater.from(act).inflate(z ? R.layout.rate_dialog2 : R.layout.rate_dialog, (ViewGroup) null);
if (!z) {
inflate.findViewById(R.id.base).setBackgroundResource(getRateBackground());
}
e50.d6((ViewGroup) inflate.findViewById(R.id.base));
final RadioGroup radioGroup = (RadioGroup) inflate.findViewById(R.id.rg);
RadioButton radioButton = (RadioButton) inflate.findViewById(R.id.rb3);
radioButton.setText(radioButton.getText().toString() + "(" + z2.qqNumber + ")");
AlertDialog.Builder builder = new AlertDialog.Builder(act);
builder.setView(inflate).setCancelable(false);
final AlertDialog show = builder.show();
inflate.findViewById(R.id.ok).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
switch (radioGroup.getCheckedRadioButtonId()) {
case R.id.rb1:
AboutAct.doOpenMarket(act);
e50.q7("doShare", "popup", "market", 1);
o50.q2(act, e50.W0("感谢您的支持!"), 0);
break;
case R.id.rb2:
AboutAct.doSocialShare(act, null, true, usePromoPicRate);
e50.q7("doShare", "popup", "share_to", 1);
break;
case R.id.rb3:
AboutAct.doJoinQQ(act);
e50.q7("doShare", "popup", "qq", 1);
break;
}
show.cancel();
}
});
inflate.findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AlertDialog.this.cancel();
e50.q7("doShare", "popup", "cancel", 1);
o50.q2(act, AboutAct.getNotShareContent(), 1);
}
});
if (e50.o8 || e50.g5()) {
show.getWindow().setLayout(e50.k0(380.0f), -2);
WindowManager.LayoutParams attributes = show.getWindow().getAttributes();
attributes.gravity = 17;
show.getWindow().setAttributes(attributes);
}
}
void alert(CharSequence text) {
Handler handler = this.handler;
handler.sendMessage(handler.obtainMessage(1021, text));
}
public void doBackup() {
if (e50.k7(this, "请注意, 备份和恢复需要应用获取本地存储空间的权限以读写相关文件, 是否进行权限设置?")) {
z.initTencentConfig();
new m.c(this).x(new String[]{"本地备份", "云端备份"}, -1, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == 0) {
AboutAct.this.doBackup2();
}
if (which == 1) {
AboutAct.this.doCloudBackup();
}
dialog.dismiss();
}
}).C();
}
}
public void doBackup2() {
o50.v(getBackupFile(), getBackupFile() + ".old", true);
doBackup3();
}
public void doBackup3() {
doBackup3(true);
}
public void doRestore() {
if (e50.k7(this, "请注意, 备份和恢复需要应用获取本地存储空间的权限以读写相关文件, 是否进行权限设置?")) {
z.initTencentConfig();
new m.c(this).x(new String[]{"本地恢复", "云端恢复"}, -1, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == 0) {
AboutAct aboutAct = AboutAct.this;
aboutAct.doRestore2(aboutAct.getRestoreFile(), true);
}
if (which == 1) {
AboutAct.this.doCloudRestore();
}
dialog.dismiss();
}
}).C();
}
}
public void doRestore2(final String restore_file, boolean showTip) {
File file = new File(restore_file);
if (!file.isFile()) {
o50.n2(this, "\n没有找到备份文件(" + restore_file + ")");
return;
}
new m.c(this).m(Html.fromHtml("<br>备份文件创建于[" + o50.p(Long.valueOf(file.lastModified())) + "], 请确认是否要恢复?")).v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
new m.c(AboutAct.this).m(Html.fromHtml("<h5>再次确认</h5>执行恢复操作将用备份数据替换所有阅读设置, 追书列表, 书架等内容, 是否继续?")).v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog2, int which2) {
AnonymousClass17 anonymousClass17 = AnonymousClass17.this;
AboutAct.this.doRestore3(restore_file);
}
}).o(R.string.cancel, null).C();
}
}).o(R.string.cancel, null).C();
}
public void doRestore3(final String restore_file) {
if (e50.E() && z2.signatureFailed) {
o50.n2(this, e50.W0("\n恢复失败, 请到官网或各大应用市场下载最新版本, 然后重新恢复."));
} else {
createProgressDlg(getString(R.string.restore), e50.W0("正在恢复, 请稍等..."));
new Thread() {
@Override
public void run() {
AboutAct.this.doRestore4(restore_file);
}
}.start();
}
}
public void doRestore4(final String restore_file) {
try {
r.y(restore_file, o50.n0(e50.g8), false, new q.b() {
private void deleteUnusedShare_PrefFiles(ArrayList<String> fileList) {
e50.M5("==================delete unused files================(1)", true);
if (!o50.G1(fileList)) {
try {
Iterator<String> it = o50.w0(e50.g8, true, true, true, false).iterator();
while (it.hasNext()) {
String next = it.next();
if (!fileList.contains(next)) {
if (!next.contains("/lib") && !next.endsWith("settings.xml")) {
e50.M5("delete: " + next + " " + o50.C(next), true);
} else {
e50.N5("don't delete: " + next);
}
}
}
} catch (Throwable th) {
e50.S0(th);
}
}
e50.M5("==================delete unused files================(2)", true);
}
private String getValue(String s, String key, boolean isString) {
int indexOf = s.indexOf("\"" + key + "\"");
if (indexOf <= 0) {
return "";
}
try {
if (isString) {
int indexOf2 = s.indexOf(">", indexOf);
return s.substring(indexOf2 + 1, s.indexOf("<", indexOf2));
}
int indexOf3 = s.indexOf("value=", indexOf) + 7;
return s.substring(indexOf3, s.indexOf("\"", indexOf3));
} catch (Exception e) {
e50.S0(e);
return "";
}
}
private boolean sameScreenSize(String s) {
long j;
long r3 = e50.r3() * e50.v3();
try {
j = Long.valueOf(getValue(s, "screensize", false)).longValue();
} catch (Exception e) {
e50.S0(e);
j = 0;
}
return r3 == j;
}
private String updateValue(String s, String key, String value, boolean isString) {
int indexOf;
int indexOf2 = s.indexOf("name=\"" + key + "\"");
if (indexOf2 <= 0) {
if (!key.equals("v23.2") || (indexOf = s.indexOf("<boolean")) <= 0) {
return s;
}
return s.substring(0, indexOf) + "<boolean name=\"v23.2\" value=\"false\" />\n " + s.substring(indexOf);
}
if (isString) {
int indexOf3 = s.indexOf(">", indexOf2);
return s.substring(0, indexOf3 + 1) + value + s.substring(s.indexOf("<", indexOf3));
}
int indexOf4 = s.indexOf("value=", indexOf2) + 7;
return s.substring(0, indexOf4) + value + s.substring(s.indexOf("\" ", indexOf4));
}
@Override
public void OnZipDone(boolean success, ArrayList<String> fileList) {
if (success) {
try {
String updateValue = updateValue(updateValue(updateValue(updateValue(updateValue(updateValue(o50.p0(e50.R1 + b.b + e50.q0 + ".xml"), "isFoldablePhone", "false", false), "v23.2", "false", false), "privacyOk", pk2.e, false), "cutoutScreen3", "0", false), "autoCollectVer", "0", false), "fitCutout3", "0", false);
StringBuilder sb = new StringBuilder();
sb.append("");
sb.append(e50.e2);
String updateValue2 = updateValue(updateValue, "cacheNoAdTime", sb.toString(), false);
if (!sameScreenSize(updateValue2)) {
updateValue2 = updateValue(updateValue(updateValue(updateValue(updateValue(updateValue2, "statusFontSize", "" + e50.k7, false), "statusMargin", "" + e50.l7, false), "shelfFontSize5", "" + e50.G7, false), "shelfCoverSize6", "" + e50.H7, false), "fileCoverSize5", "" + e50.I7, false);
}
if (!o50.B1(getValue(updateValue2, "default_book_folder", true))) {
e50.t = e50.r;
e50.w4(true);
updateValue2 = updateValue(updateValue2, "default_book_folder", e50.t, true);
}
o50.i2(e50.R1 + b.b + e50.q0 + ".xml", updateValue2);
} catch (Exception e) {
e50.S0(e);
}
deleteUnusedShare_PrefFiles(fileList);
AboutAct.this.handler.sendEmptyMessage(1003);
return;
}
AboutAct aboutAct = AboutAct.this;
Handler handler = aboutAct.handler;
handler.sendMessage(handler.obtainMessage(1004, aboutAct.getString(R.string.restore_failed)));
}
}, true, true, true);
} catch (Exception e) {
e50.S0(e);
Handler handler = this.handler;
handler.sendMessage(handler.obtainMessage(1004, e50.U0(e)));
}
}
public String getBackupFile() {
return e50.u + "/ssds.backup";
}
public String getCloudBackupFile() {
return e50.u + "/cloud.backup";
}
public String getRestoreFile() {
String str = e50.u + "/ssds.backup";
String str2 = e50.u + "/.sssq.backup";
return (o50.A1(str) || !o50.A1(str2)) ? str : str2;
}
public void hideProgressDlg() {
ProgressDialog progressDialog = this.progressDlg;
if (progressDialog != null) {
progressDialog.dismiss();
}
this.progressDlg = null;
}
void hideToast() {
this.handler.sendEmptyMessage(1022);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode >= 100) {
com.flyersoft.seekbooks.q.v(false);
if (com.flyersoft.seekbooks.q.d()) {
o50.C(com.flyersoft.seekbooks.q.s());
ActivityMain.G1();
if (requestCode == 100) {
doJoinMember2();
}
}
}
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.head_back) {
finish();
}
v.getId();
if (v.getId() == R.id.privacy || v.getId() == R.id.xuke || v.getId() == R.id.mianze || v.getId() == R.id.vipc || v.getId() == R.id.baohu) {
try {
String str = (String) v.getTag();
Intent intent = new Intent(this, (Class<?>) BrowserAct.class);
intent.putExtra("filename", str);
startActivity(intent);
} catch (Exception e) {
e50.S0(e);
}
}
if (v.getId() == R.id.webLay || v.getId() == R.id.helpLay || v.getId() == R.id.faqLay) {
try {
String str2 = (String) v.getTag();
String str3 = v.getId() == R.id.webLay ? "网站" : v.getId() == R.id.helpLay ? "新手帮助" : "常见问题";
Intent intent2 = new Intent(this, (Class<?>) BrowserAct.class);
intent2.putExtra("url", str2);
intent2.putExtra("title", str3);
if (v.getId() == R.id.helpLay) {
intent2.putExtra("allowCache", true);
}
startActivity(intent2);
} catch (Exception e2) {
e50.S0(e2);
}
}
if (v.getId() == R.id.email) {
try {
Intent intent3 = new Intent("android.intent.action.SEND_MULTIPLE");
intent3.putExtra("android.intent.extra.EMAIL", new String[]{"soushushenqi@163.com"});
intent3.putExtra("android.intent.extra.SUBJECT", getString(R.string.sendemail));
intent3.putExtra("android.intent.extra.TEXT", "手机: " + Build.ID + "|" + Build.VERSION.RELEASE + "|" + e50.r1() + "\n\n");
if (o50.A1(z2.errorSaveFile())) {
ArrayList<? extends Parcelable> arrayList = new ArrayList<>();
arrayList.add(e50.k4(this, new File(z2.errorSaveFile())));
intent3.setType(InterfaceC0548.f1142);
intent3.putParcelableArrayListExtra("android.intent.extra.STREAM", arrayList);
} else {
intent3.setType("plain/text");
}
intent3.addFlags(1);
intent3.addFlags(268435456);
startActivity(intent3);
} catch (Exception unused) {
o50.n2(this, "\n没有找到邮件客户端.");
}
}
if (v.getId() == R.id.fenxiang) {
showRateTip(this, true, S.promoPicRate);
e50.q7("doShare", "about", "rate_dlg", 1);
}
if (v.getId() == R.id.shareLay) {
doSocialShare(this, null, true, 0);
e50.q7("doShare", "about", "share_to", 1);
}
if (v.getId() == R.id.marketLay) {
doOpenMarket(this);
e50.q7("doShare", "about", "market", 1);
}
if (v.getId() == R.id.qqLay) {
doJoinQQ(this);
e50.q7("doShare", "about", "qq", 1);
}
if (v.getId() == R.id.newLay) {
IntroActivity.start(this, -1);
}
if (v.getId() == R.id.backup) {
doBackup();
}
if (v.getId() == R.id.restore) {
doRestore();
}
if (v.getId() == R.id.adTipLay) {
Spanned fromHtml = Html.fromHtml("<b><font color=#ee1601>推荐可获永久免广告</font></b>");
String str4 = "会员免广告(" + com.flyersoft.seekbooks.q.p() + "元/月)";
String str5 = "分享应用免" + e50.m + "天广告";
new m.c(this).x(new CharSequence[]{fromHtml, str4}, -1, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AboutAct.this.showAdFreeTip(which);
dialog.dismiss();
}
}).C();
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.about_act);
findViewById(R.id.head_back).setOnClickListener(this);
((TextView) findViewById(R.id.head_title)).setText(e50.p1());
findViewById(R.id.head_progress).setVisibility(8);
findViewById(R.id.head_button1).setVisibility(8);
findViewById(R.id.head_menu).setVisibility(8);
findViewById(R.id.base).setBackgroundColor(e50.X2());
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.base2);
for (int i = 0; i < viewGroup.getChildCount(); i++) {
if (viewGroup.getChildAt(i) instanceof ViewGroup) {
viewGroup.getChildAt(i).setBackgroundColor(e50.K2());
}
}
if (e50.M2) {
e50.b1(findViewById(R.id.base));
}
findViewById(R.id.head_title).setOnClickListener(this);
findViewById(R.id.xuke).setOnClickListener(this);
findViewById(R.id.privacy).setOnClickListener(this);
findViewById(R.id.mianze).setOnClickListener(this);
findViewById(R.id.vipc).setOnClickListener(this);
findViewById(R.id.baohu).setOnClickListener(this);
findViewById(R.id.backup).setOnClickListener(this);
findViewById(R.id.restore).setOnClickListener(this);
findViewById(R.id.email).setOnClickListener(this);
findViewById(R.id.fenxiang).setOnClickListener(this);
findViewById(R.id.shareLay).setOnClickListener(this);
findViewById(R.id.marketLay).setOnClickListener(this);
findViewById(R.id.qqLay).setOnClickListener(this);
findViewById(R.id.webLay).setOnClickListener(this);
findViewById(R.id.helpLay).setOnClickListener(this);
findViewById(R.id.faqLay).setOnClickListener(this);
findViewById(R.id.newLay).setOnClickListener(this);
if (e50.F()) {
((TextView) findViewById(R.id.adTipTv)).setText(e50.W0("查看如何移除广告"));
findViewById(R.id.adTipLay).setOnClickListener(this);
} else {
findViewById(R.id.adTipLay).setVisibility(8);
}
TextView textView = (TextView) findViewById(R.id.qqText);
textView.setText(textView.getText().toString() + "(" + z2.qqNumber + ")");
findViewById(R.id.head_title).setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
return true;
}
});
e50.d6((ViewGroup) findViewById(R.id.base2));
if (getIntent().getExtras() == null || !getIntent().getExtras().getBoolean("bottom")) {
return;
}
((TextView) findViewById(R.id.adTipTv)).getPaint().setFakeBoldText(true);
new Handler(Looper.getMainLooper()) {
@Override
public void handleMessage(Message msg) {
((ScrollView) AboutAct.this.findViewById(R.id.sv)).smoothScrollTo(0, e50.k0(800.0f));
AboutAct aboutAct = AboutAct.this;
aboutAct.onClick(aboutAct.findViewById(R.id.adTipLay));
}
}.sendEmptyMessageDelayed(0, 300L);
}
public void showAdFreeTip(int which) {
String str = "";
if (which == 0) {
createProgressDlg("", "推荐可获永久免广告");
new Thread() {
@Override
public void run() {
String i1 = o50.i1(S.POST_NOAD_URL);
if (!o50.F1(i1) && i1.contains("广告")) {
AboutAct.this.post_no_ad = i1;
}
AboutAct.getPromoPicFromNetwork();
AboutAct.this.runOnUiThread(new Runnable() {
@Override
public void run() {
if (AboutAct.this.isFinishing()) {
return;
}
AboutAct.this.hideProgressDlg();
if (AboutAct.showPromoPic(AboutAct.this)) {
return;
}
AboutAct.this.showPostNoAdTip();
}
});
}
}.start();
}
if (which == 1) {
m.c cVar = new m.c(this);
StringBuilder sb = new StringBuilder();
sb.append("<font color=#009689>会员免广告</font><br><br><small>注册成为搜书大师会员, 每月");
sb.append(com.flyersoft.seekbooks.q.p());
sb.append("元会员费即可获得云端备份, 免广告特权等服务。");
if (com.flyersoft.seekbooks.q.x()) {
str = "<br><br><b>您已获得免广告服务, 到期时间: " + o50.p(Long.valueOf(com.flyersoft.seekbooks.q.q())) + "</b>";
}
sb.append(str);
sb.append("</small>");
cVar.m(Html.fromHtml(e50.W0(sb.toString()))).v(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which2) {
if (com.flyersoft.seekbooks.q.x()) {
return;
}
AboutAct.this.doJoinMember1();
}
}).o(R.string.cancel, null).d(false).C();
}
if (which == 2) {
if (e50.m > 0) {
o50.n2(this, Html.fromHtml(e50.W0("<font color=#009689>分享免广告</font><br><br><small>点击“分享至QQ群或微信群”,在分享搜书大师给您的朋友后,未来<b>" + e50.m + "天</b>内将不再显示新的广告。</small>")));
return;
}
o50.n2(this, Html.fromHtml(e50.W0("<font color=#009689>订阅免广告</font><br><br><small>充值订阅正版可获得免广告服务。<br><br>更舒心的阅读,排版好无错字更新快。\n</small>")));
}
}
public void showPostNoAdTip() {
hideProgressDlg();
new m.c(this).m(Html.fromHtml(e50.W0(this.post_no_ad))).w("加群参与", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AboutAct.doJoinQQ(AboutAct.this);
e50.q7("doShare", "about", "post_no_ad", 1);
}
}).p("下次再说", null).d(false).C();
}
void toast(String text) {
Handler handler = this.handler;
handler.sendMessage(handler.obtainMessage(1020, text));
}
public void doBackup3(final boolean includeBooks) {
createProgressDlg(getString(R.string.backup), e50.W0("正在备份, 请稍等..."));
new Thread() {
@Override
public void run() {
try {
int i = 1;
r.j(e50.g8, AboutAct.this.getBackupFile(), true, includeBooks);
Handler handler = AboutAct.this.handler;
if (!includeBooks) {
i = 0;
}
handler.sendMessage(handler.obtainMessage(1001, i, 0));
} catch (Exception e) {
e50.S0(e);
Handler handler2 = AboutAct.this.handler;
handler2.sendMessage(handler2.obtainMessage(1002, e50.U0(e)));
}
}
}.start();
}
}