正在查看: Fancy Optimizer v4.6.3 应用的 WebBrowserPresenter.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Fancy Optimizer v4.6.3 应用的 WebBrowserPresenter.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fancyclean.boost.securebrowser.ui.presenter;
import android.app.DownloadManager;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Environment;
import bn.i;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import kb.g;
import vj.h;
public class WebBrowserPresenter extends hl.a<pb.d> implements pb.c {
public static final h k = h.f(WebBrowserPresenter.class);
public kb.b c;
public lb.c d;
public e e;
public DownloadManager f;
public fn.a h;
public g i;
public final ln.a<List<mb.c>> g = new ln.a<>();
public final d j = new d();
public class a implements Runnable {
public final String c;
public final String d;
public a(String str, String str2) {
this.c = str;
this.d = str2;
}
@Override
public final void run() {
String str = this.c;
WebBrowserPresenter webBrowserPresenter = WebBrowserPresenter.this;
try {
pb.d dVar = (pb.d) ((hl.a) webBrowserPresenter).a;
if (dVar == null) {
return;
}
URL url = new URL(str);
webBrowserPresenter.d.a(url, this.d);
kb.e b = kb.e.b();
dVar.getContext();
String host = url.getHost();
b.getClass();
kb.e.d(host);
mb.a c = webBrowserPresenter.c.b.c(str);
if (c != null) {
webBrowserPresenter.c.d(c.c, System.currentTimeMillis());
}
} catch (MalformedURLException e) {
WebBrowserPresenter.k.d((String) null, e);
}
}
}
public class b implements Runnable {
public final String c;
public final Bitmap d;
public b(String str, Bitmap bitmap) {
this.c = str;
this.d = bitmap;
}
@Override
public final void run() {
Cursor cursor;
WebBrowserPresenter webBrowserPresenter = WebBrowserPresenter.this;
try {
pb.d dVar = (pb.d) ((hl.a) webBrowserPresenter).a;
if (dVar == null) {
return;
}
URL url = new URL(this.c);
Bitmap bitmap = this.d;
if (bitmap == null) {
return;
}
try {
int i = 0;
cursor = ((ak.a) webBrowserPresenter.d.d).getReadableDatabase().query("browser_history", new String[]{"COUNT(*) AS host_count"}, "host = ?", new String[]{url.getHost()}, null, null, null);
if (cursor != null) {
try {
if (cursor.moveToFirst()) {
i = cursor.getInt(cursor.getColumnIndex("host_count"));
}
} catch (Throwable th) {
th = th;
if (cursor != null) {
cursor.close();
}
throw th;
}
}
if (cursor != null) {
cursor.close();
}
if (i > 0) {
kb.e b = kb.e.b();
dVar.getContext();
String host = url.getHost();
b.getClass();
kb.e.e(host, bitmap);
return;
}
kb.e b10 = kb.e.b();
dVar.getContext();
String host2 = url.getHost();
b10.getClass();
kb.e.f(host2, bitmap);
} catch (Throwable th2) {
th = th2;
cursor = null;
}
} catch (MalformedURLException e) {
WebBrowserPresenter.k.d((String) null, e);
}
}
}
public class c implements Runnable {
public final String c;
public final Bitmap d;
public c(String str, Bitmap bitmap) {
this.c = str;
this.d = bitmap;
}
@Override
public final void run() {
long currentTimeMillis = System.currentTimeMillis();
WebBrowserPresenter webBrowserPresenter = WebBrowserPresenter.this;
mb.a c = webBrowserPresenter.c.b.c(this.c);
if (c != null) {
byte[] b = webBrowserPresenter.c.b.b(c.c);
Bitmap bitmap = this.d;
if (bitmap != null) {
if (b == null || currentTimeMillis - c.j > 86400000) {
kb.b bVar = webBrowserPresenter.c;
long j = c.c;
bVar.b.e(j, bitmap);
bVar.c.j(bVar.a, 0, "BookmarkFavColor_" + j);
}
}
}
}
}
public class d implements e.a {
public d() {
}
}
public static class e extends yj.a<Void, Void, Void> {
public final kb.b c;
public final String d;
public final String e;
public final Bitmap f;
public a g;
public interface a {
}
public e(Context context, Bitmap bitmap, String str, String str2) {
this.c = kb.b.c(context);
this.d = str;
this.e = str2;
this.f = bitmap;
}
public final void b(Object obj) {
pb.d dVar;
a aVar = this.g;
if (aVar == null || (dVar = (pb.d) ((hl.a) WebBrowserPresenter.this).a) == null) {
return;
}
dVar.C0();
}
public final Object d(Object[] objArr) {
mb.a aVar = new mb.a();
aVar.e = this.d;
Bitmap bitmap = this.f;
byte[] a10 = bitmap != null ? kb.a.a(bitmap) : null;
aVar.d = this.e;
long currentTimeMillis = System.currentTimeMillis();
aVar.h = currentTimeMillis;
aVar.j = currentTimeMillis;
aVar.i = 1;
this.c.a(aVar, a10);
return null;
}
}
@Override
public final void A(String str, String str2) {
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(str));
int lastIndexOf = str.lastIndexOf("/");
if (lastIndexOf >= 0) {
str = lastIndexOf < str.length() ? str.substring(lastIndexOf + 1) : str.substring(lastIndexOf);
}
request.setAllowedNetworkTypes(3);
request.setTitle(str);
request.setMimeType(str2);
request.setVisibleInDownloadsUi(true);
request.allowScanningByMediaScanner();
request.setNotificationVisibility(1);
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).mkdir();
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, str);
this.f.enqueue(request);
}
@Override
public final void B(long j) {
pb.d dVar = (pb.d) ((hl.a) this).a;
if (dVar == null) {
return;
}
this.c.b(j);
dVar.C0();
}
@Override
public final void Q0(String str, String str2) {
new Thread(new a(str, str2)).start();
}
@Override
public final void X0() {
this.i.getClass();
ArrayList arrayList = new ArrayList();
mb.c cVar = new mb.c();
cVar.b = "Google";
cVar.a = "http://www.google.com/";
cVar.c = 2131231426;
arrayList.add(cVar);
mb.c cVar2 = new mb.c();
cVar2.b = "Youtube";
cVar2.a = "https://www.youtube.com/";
cVar2.c = 2131231594;
arrayList.add(cVar2);
mb.c cVar3 = new mb.c();
cVar3.b = "Facebook";
cVar3.a = "http://www.facebook.com/";
cVar3.c = 2131231415;
arrayList.add(cVar3);
mb.c cVar4 = new mb.c();
cVar4.b = "Amazon";
cVar4.a = "http://www.amazon.com/";
cVar4.c = 2131231305;
arrayList.add(cVar4);
this.g.a(arrayList);
}
@Override
public final void i(String str, String str2, Bitmap bitmap) {
pb.d dVar = (pb.d) ((hl.a) this).a;
if (dVar == null) {
return;
}
e eVar = new e(dVar.getContext(), bitmap, str, str2);
this.e = eVar;
eVar.g = this.j;
vj.c.a(eVar, new Void[0]);
}
@Override
public final void j1(String str, Bitmap bitmap) {
new Thread(new c(str, bitmap)).start();
}
@Override
public final void l(String str, Bitmap bitmap) {
new Thread(new b(str, bitmap)).start();
}
public final void n1() {
fn.a aVar = this.h;
if (aVar != null && !aVar.d()) {
fn.a aVar2 = this.h;
aVar2.getClass();
gn.b.a(aVar2);
}
yj.a aVar3 = this.e;
if (aVar3 != null) {
aVar3.cancel(true);
this.e = null;
}
}
public final void q1(il.e eVar) {
pb.d dVar = (pb.d) eVar;
dVar.getContext();
if (g.a == null) {
synchronized (g.class) {
if (g.a == null) {
g.a = new g();
}
}
}
this.i = g.a;
this.c = kb.b.c(dVar.getContext());
this.d = new lb.c(dVar.getContext());
this.f = (DownloadManager) dVar.getContext().getSystemService("download");
sm.a h = this.g.h();
sm.g gVar = kn.a.c;
if (gVar == null) {
throw new NullPointerException("scheduler is null");
}
i iVar = new i(h, gVar);
tm.b a10 = tm.a.a();
int i = sm.a.c;
com.google.ads.mediation.unity.b.z(i);
bn.d dVar2 = new bn.d(iVar, a10, i);
fn.a aVar = new fn.a(new qb.d(this));
dVar2.a(aVar);
this.h = aVar;
}
}