正在查看: Uptodown App Store v6.80 应用的 F.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 F.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package u2;
import W1.G;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.service.notification.StatusBarNotification;
import androidx.core.app.NotificationCompat;
import androidx.core.app.TaskStackBuilder;
import androidx.core.content.ContextCompat;
import com.google.android.material.card.MaterialCardViewHelper;
import com.uptodown.activities.AppDetailActivity;
import com.uptodown.activities.MainActivity;
import com.uptodown.activities.MyDownloads;
import com.uptodown.activities.SecurityActivity;
import com.uptodown.activities.Updates;
import com.uptodown.core.activities.InstallerActivity;
import com.uptodown.receivers.DownloadNotificationReceiver;
import com.uptodown.workers.DownloadWorker;
import g2.C0944E;
import g2.C0950a;
import g2.C0955f;
import g2.C0965p;
import g2.P;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import kotlin.jvm.internal.AbstractC1004b;
public final class F {
public static final F a = new F();
private F() {
}
private final void A(P p, Context context) {
Drawable drawable;
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationManager notificationManager = (NotificationManager) systemService;
v a4 = v.v.a(context);
a4.a();
p.s(1);
a4.x1(p);
a4.i();
String str = null;
try {
PackageManager packageManager = context.getPackageManager();
kotlin.jvm.internal.m.d(packageManager, "getPackageManager(...)");
PackageInfo d = W1.s.d(packageManager, p.h(), 0);
drawable = d.applicationInfo.loadIcon(context.getPackageManager());
try {
str = d.applicationInfo.loadLabel(context.getPackageManager()).toString();
} catch (Exception unused) {
}
} catch (Exception unused2) {
drawable = null;
}
if (str != null) {
String string = context.getString(2131952432);
kotlin.jvm.internal.m.d(string, "getString(...)");
String string2 = context.getString(2131952431, str);
kotlin.jvm.internal.m.d(string2, "getString(...)");
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
inboxStyle.setBigContentTitle(string);
inboxStyle.addLine(string2);
StringBuilder sb = new StringBuilder();
sb.append(string2);
kotlin.jvm.internal.m.d(sb, "append(...)");
sb.append('\n');
kotlin.jvm.internal.m.d(sb, "append(...)");
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
builder.setOnlyAlertOnce(true);
H(builder);
builder.setAutoCancel(true);
if (drawable != null) {
builder.setLargeIcon(r(drawable));
}
builder.setTimeoutAfter(3600000L);
builder.setOngoing(false);
builder.setContentText(string2);
builder.setStyle(inboxStyle);
Intent intent = new Intent(context, (Class<?>) Updates.class);
TaskStackBuilder create = TaskStackBuilder.create(context);
kotlin.jvm.internal.m.d(create, "create(...)");
create.addParentStack(Updates.class);
create.addNextIntent(intent);
builder.setContentIntent(create.getPendingIntent(0, t()));
notificationManager.notify(258, builder.build());
com.uptodown.activities.preferences.a.a.I0(context, String.valueOf(System.currentTimeMillis()));
E(string, String.valueOf(System.currentTimeMillis()), sb.toString(), null, null, context);
}
}
private final void C(Context context) {
int a4 = P.k.a(context);
if (a4 > 0) {
D(context, a4);
return;
}
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).cancel(258);
}
private final void D(Context context, int i) {
String string = context.getResources().getString(N1.i.b);
kotlin.jvm.internal.m.d(string, "getString(...)");
String string2 = context.getString(2131952768, String.valueOf(i));
kotlin.jvm.internal.m.d(string2, "getString(...)");
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
inboxStyle.setBigContentTitle(string);
inboxStyle.addLine(string2);
StringBuilder sb = new StringBuilder();
sb.append(string2);
kotlin.jvm.internal.m.d(sb, "append(...)");
sb.append('\n');
kotlin.jvm.internal.m.d(sb, "append(...)");
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
builder.setOnlyAlertOnce(true);
H(builder);
builder.setAutoCancel(false);
builder.setOngoing(false);
builder.setContentText(string2);
builder.setStyle(inboxStyle);
Intent intent = new Intent(context, (Class<?>) Updates.class);
TaskStackBuilder create = TaskStackBuilder.create(context);
kotlin.jvm.internal.m.d(create, "create(...)");
create.addParentStack(Updates.class);
create.addNextIntent(intent);
builder.setContentIntent(create.getPendingIntent(0, t()));
builder.setNumber(i);
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).notify(258, builder.build());
com.uptodown.activities.preferences.a.a.I0(context, String.valueOf(System.currentTimeMillis()));
E(string, String.valueOf(System.currentTimeMillis()), sb.toString(), null, null, context);
}
private final void E(String str, String str2, String str3, String str4, String str5, Context context) {
g2.z zVar = new g2.z();
zVar.m(str);
zVar.l(str2);
zVar.k(str3);
zVar.i(str4);
zVar.j(str5);
zVar.h(context);
}
private final void G(NotificationCompat.Builder builder, int i) {
builder.setOnlyAlertOnce(true);
H(builder);
builder.setAutoCancel(false);
builder.setOngoing(true);
builder.setProgress(100, i, false);
}
private final void H(NotificationCompat.Builder builder) {
builder.setSmallIcon(2131231561);
}
private final void b(Context context, int i) {
String str;
if (Build.VERSION.SDK_INT < 24 || i <= 0) {
return;
}
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationManager notificationManager = (NotificationManager) systemService;
StatusBarNotification[] a4 = androidx.browser.trusted.b.a(notificationManager);
Iterator a5 = AbstractC1004b.a(a4);
while (true) {
if (!a5.hasNext()) {
str = null;
break;
}
StatusBarNotification statusBarNotification = (StatusBarNotification) a5.next();
if (i == statusBarNotification.getId()) {
str = statusBarNotification.getGroupKey();
break;
}
}
if (str != null) {
Iterator a6 = AbstractC1004b.a(a4);
while (a6.hasNext()) {
StatusBarNotification statusBarNotification2 = (StatusBarNotification) a6.next();
if (i != statusBarNotification2.getId() && kotlin.jvm.internal.m.a(statusBarNotification2.getGroupKey(), str)) {
return;
}
}
notificationManager.cancel(i);
}
}
private final Bitmap r(Drawable drawable) {
Bitmap createBitmap;
if (drawable instanceof BitmapDrawable) {
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
if (bitmapDrawable.getBitmap() != null) {
Bitmap bitmap = bitmapDrawable.getBitmap();
kotlin.jvm.internal.m.d(bitmap, "getBitmap(...)");
return bitmap;
}
}
if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) {
createBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
kotlin.jvm.internal.m.b(createBitmap);
} else {
createBitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
kotlin.jvm.internal.m.b(createBitmap);
}
Canvas canvas = new Canvas(createBitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return createBitmap;
}
private final int s(Context context) {
v a4 = v.v.a(context);
a4.a();
int q02 = a4.q0();
a4.i();
return q02 == 0 ? MaterialCardViewHelper.DEFAULT_FADE_ANIM_DURATION : q02 + 1;
}
private final int t() {
return Build.VERSION.SDK_INT >= 31 ? 201326592 : 134217728;
}
private final void v(Context context, C0965p c0965p, String str) {
String string;
String str2 = null;
String i = c0965p != null ? c0965p.i() : null;
if (i == null || i.length() == 0) {
String w = c0965p != null ? c0965p.w() : null;
if (w != null && w.length() != 0) {
kotlin.jvm.internal.m.b(c0965p);
str2 = c0965p.w();
kotlin.jvm.internal.m.b(str2);
}
} else {
kotlin.jvm.internal.m.b(c0965p);
str2 = c0965p.i();
kotlin.jvm.internal.m.b(str2);
}
String str3 = str2;
if (str == null || str.length() == 0) {
string = context.getString(2131951904);
} else {
string = context.getString(2131951904) + str;
}
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationManager notificationManager = (NotificationManager) systemService;
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
H(builder);
if (str3 != null && str3.length() != 0) {
builder.setContentTitle(str3);
}
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(string));
builder.setContentText(string);
builder.setAutoCancel(true);
Intent intent = new Intent(context, (Class<?>) MainActivity.class);
TaskStackBuilder create = TaskStackBuilder.create(context);
kotlin.jvm.internal.m.d(create, "create(...)");
create.addParentStack(MainActivity.class);
create.addNextIntent(intent);
builder.setContentIntent(create.getPendingIntent(0, t()));
Intent intent2 = new Intent(context, (Class<?>) MyDownloads.class);
TaskStackBuilder create2 = TaskStackBuilder.create(context);
kotlin.jvm.internal.m.d(create2, "create(...)");
create2.addParentStack(MyDownloads.class);
create2.addNextIntent(intent2);
builder.setContentIntent(create2.getPendingIntent(0, t()));
notificationManager.notify(257, builder.build());
E(str3, String.valueOf(System.currentTimeMillis()), str, null, null, context);
}
private final void w(android.content.Context r13, g2.C0965p r14) {
throw new UnsupportedOperationException("Method not decompiled: u2.F.w(android.content.Context, g2.p):void");
}
private final void x(android.content.Context r14, java.lang.String r15) {
throw new UnsupportedOperationException("Method not decompiled: u2.F.x(android.content.Context, java.lang.String):void");
}
public final void B(Context context, Uri uri) {
kotlin.jvm.internal.m.e(context, "context");
if (uri != null) {
String string = context.getString(N1.i.b);
kotlin.jvm.internal.m.d(string, "getString(...)");
String string2 = context.getString(2131952425);
kotlin.jvm.internal.m.d(string2, "getString(...)");
Intent intent = new Intent("android.intent.action.VIEW");
intent.setPackage(context.getPackageName());
intent.setDataAndType(uri, "application/vnd.android.package-archive");
PendingIntent activity = PendingIntent.getActivity(context, 0, intent, t());
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
H(builder);
builder.setContentTitle(string);
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(string2));
builder.setContentText(string2);
builder.setAutoCancel(true);
builder.setContentIntent(activity);
((NotificationManager) systemService).notify(259, builder.build());
E(string, String.valueOf(System.currentTimeMillis()), string2, "update_uptodown", uri.getPath(), context);
}
}
public final void F(android.content.Context r19) {
throw new UnsupportedOperationException("Method not decompiled: u2.F.F(android.content.Context):void");
}
public final boolean a(Context context) {
kotlin.jvm.internal.m.e(context, "context");
return Build.VERSION.SDK_INT >= 33 ? u(context) && com.uptodown.activities.preferences.a.a.U(context) : com.uptodown.activities.preferences.a.a.U(context);
}
public final void c(Context context) {
kotlin.jvm.internal.m.e(context, "context");
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).cancel(8);
}
public final void d(Context context, int i) {
kotlin.jvm.internal.m.e(context, "context");
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).cancel(i);
}
public final void e(Context context) {
kotlin.jvm.internal.m.e(context, "context");
d(context, 261);
}
public final void f(Context context) {
kotlin.jvm.internal.m.e(context, "context");
d(context, 255);
}
public final void g(Context context) {
kotlin.jvm.internal.m.e(context, "context");
d(context, 259);
}
public final void h(Context context) {
kotlin.jvm.internal.m.e(context, "context");
d(context, 258);
}
public final void i(Context context) {
kotlin.jvm.internal.m.e(context, "context");
if (Build.VERSION.SDK_INT >= 24) {
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
StatusBarNotification[] a4 = androidx.browser.trusted.b.a((NotificationManager) systemService);
v a5 = v.v.a(context);
a5.a();
Iterator it = a5.V().iterator();
kotlin.jvm.internal.m.d(it, "iterator(...)");
boolean z = false;
while (it.hasNext()) {
Object next = it.next();
kotlin.jvm.internal.m.d(next, "next(...)");
C0950a c0950a = (C0950a) next;
Iterator a6 = AbstractC1004b.a(a4);
while (true) {
if (!a6.hasNext()) {
break;
}
if (c0950a.a() == ((StatusBarNotification) a6.next()).getId()) {
z = true;
break;
}
}
if (!z) {
a5.n(c0950a);
}
}
a5.i();
}
}
public final void j(Context context) {
Intent intent;
String string;
int i;
kotlin.jvm.internal.m.e(context, "context");
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
C0965p g = DownloadWorker.d.g();
if (g != null) {
v a4 = v.v.a(context);
a4.a();
ArrayList l02 = a4.l0();
a4.i();
Iterator it = l02.iterator();
kotlin.jvm.internal.m.d(it, "iterator(...)");
int i4 = 0;
int i5 = 0;
while (it.hasNext()) {
Object next = it.next();
kotlin.jvm.internal.m.d(next, "next(...)");
C0965p c0965p = (C0965p) next;
if (c0965p.O()) {
if (c0965p.x() == 0) {
i5++;
} else if (DownloadWorker.d.j(c0965p.h())) {
i4++;
}
}
}
int i6 = i4 + i5;
String i7 = g.i();
String str = context.getResources().getString(2131952424) + ' ' + ((i7 == null || i7.length() == 0) ? g.w() : g.i()) + " (" + g.x() + context.getResources().getString(2131952488) + ')';
String str2 = new W1.i().d(g.y(), context) + '/' + new W1.i().d(g.z(), context);
G(builder, g.x());
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
inboxStyle.addLine(str2);
if (i5 > 0) {
kotlin.jvm.internal.F f = kotlin.jvm.internal.F.a;
String string2 = context.getString(2131952537);
kotlin.jvm.internal.m.d(string2, "getString(...)");
String format = String.format(string2, Arrays.copyOf(new Object[]{Integer.valueOf(i6)}, 1));
kotlin.jvm.internal.m.d(format, "format(...)");
inboxStyle.addLine(format);
Intent intent2 = new Intent(context, (Class<?>) DownloadNotificationReceiver.class);
intent2.setAction("CANCEL_ALL");
intent2.putExtra("download", g);
intent2.putExtra("notificationID", 261);
builder.addAction(2131230925, context.getString(2131951933), PendingIntent.getBroadcast(context, 0, intent2, t()));
}
builder.setStyle(inboxStyle);
builder.setContentTitle(str);
Intent intent3 = new Intent(context, (Class<?>) MyDownloads.class);
TaskStackBuilder create = TaskStackBuilder.create(context);
kotlin.jvm.internal.m.d(create, "create(...)");
create.addParentStack(MyDownloads.class);
create.addNextIntent(intent3);
builder.setContentIntent(create.getPendingIntent(0, t()));
if (DownloadWorker.d.h()) {
intent = new Intent(context, (Class<?>) DownloadNotificationReceiver.class);
intent.setAction("RESUME");
string = context.getString(2131952771);
i = 2131231497;
} else {
intent = new Intent(context, (Class<?>) DownloadNotificationReceiver.class);
intent.setAction("PAUSE");
string = context.getString(2131951655);
i = 2131231490;
}
builder.addAction(i, string, PendingIntent.getBroadcast(context, 0, intent, t()));
Intent intent4 = new Intent(context, (Class<?>) DownloadNotificationReceiver.class);
intent4.setAction("CANCEL");
intent4.putExtra("download", g);
intent4.putExtra("notificationID", 261);
builder.addAction(2131230925, context.getString(N1.i.j0), PendingIntent.getBroadcast(context, 0, intent4, t()));
} else {
builder.setOnlyAlertOnce(true);
H(builder);
builder.setAutoCancel(false);
builder.setOngoing(true);
String string3 = context.getString(2131952515);
kotlin.jvm.internal.m.d(string3, "getString(...)");
builder.setContentTitle(string3);
}
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).notify(261, builder.build());
}
public final void k(Context context, C0965p download) {
kotlin.jvm.internal.m.e(context, "context");
kotlin.jvm.internal.m.e(download, "download");
if (a(context) && com.uptodown.activities.preferences.a.a.N(context)) {
w(context, download);
}
}
public final void l(Context context, String packagename) {
kotlin.jvm.internal.m.e(context, "context");
kotlin.jvm.internal.m.e(packagename, "packagename");
if (a(context) && com.uptodown.activities.preferences.a.a.T(context)) {
x(context, packagename);
}
}
public final void m(Context context, String contentText) {
kotlin.jvm.internal.m.e(context, "context");
kotlin.jvm.internal.m.e(contentText, "contentText");
if (a(context) && com.uptodown.activities.preferences.a.a.T(context)) {
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
H(builder);
String string = context.getString(N1.i.T);
kotlin.jvm.internal.m.d(string, "getString(...)");
builder.setContentTitle(string);
builder.setContentText(contentText);
builder.setProgress(100, 0, true);
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).notify(255, builder.build());
E(string, String.valueOf(System.currentTimeMillis()), contentText, null, null, context);
}
}
public final void n(Context context, File file, boolean z, int i) {
String format;
Drawable d;
kotlin.jvm.internal.m.e(context, "context");
kotlin.jvm.internal.m.e(file, "file");
if (a(context) && new P1.a(context).p()) {
int i4 = i + 260;
Intent intent = new Intent("android.intent.action.VIEW");
intent.setPackage(context.getPackageName());
intent.setDataAndType(new p().s(file, context), "application/vnd.android.package-archive");
intent.putExtra("notificationId", i4);
PendingIntent activity = PendingIntent.getActivity(context, 0, intent, Build.VERSION.SDK_INT >= 31 ? 67108864 : 0);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
H(builder);
String name = file.getName();
kotlin.jvm.internal.m.d(name, "getName(...)");
if (m3.m.o(name, ".apk", false, 2, null)) {
try {
PackageManager packageManager = context.getPackageManager();
kotlin.jvm.internal.m.d(packageManager, "getPackageManager(...)");
String absolutePath = file.getAbsolutePath();
kotlin.jvm.internal.m.d(absolutePath, "getAbsolutePath(...)");
PackageInfo c = W1.s.c(packageManager, absolutePath, 128);
if (c != null) {
Drawable loadIcon = c.applicationInfo.loadIcon(context.getPackageManager());
kotlin.jvm.internal.m.d(loadIcon, "loadIcon(...)");
builder.setLargeIcon(r(loadIcon));
}
} catch (Exception e) {
e.printStackTrace();
}
} else {
G.a aVar = W1.G.b;
String name2 = file.getName();
kotlin.jvm.internal.m.d(name2, "getName(...)");
if (aVar.a(name2) && (d = new W1.G().d(file, context)) != null) {
builder.setLargeIcon(r(d));
}
}
String name3 = file.getName();
builder.setContentTitle(name3);
if (z) {
kotlin.jvm.internal.F f = kotlin.jvm.internal.F.a;
String string = context.getString(2131952422);
kotlin.jvm.internal.m.d(string, "getString(...)");
String absolutePath2 = file.getAbsolutePath();
kotlin.jvm.internal.m.d(absolutePath2, "getAbsolutePath(...)");
String absolutePath3 = file.getAbsolutePath();
kotlin.jvm.internal.m.d(absolutePath3, "getAbsolutePath(...)");
String substring = absolutePath2.substring(0, m3.m.R(absolutePath3, "/", 0, false, 6, null));
kotlin.jvm.internal.m.d(substring, "substring(...)");
format = String.format(string, Arrays.copyOf(new Object[]{substring}, 1));
kotlin.jvm.internal.m.d(format, "format(...)");
} else {
kotlin.jvm.internal.F f4 = kotlin.jvm.internal.F.a;
String string2 = context.getString(2131952423);
kotlin.jvm.internal.m.d(string2, "getString(...)");
String absolutePath4 = file.getAbsolutePath();
kotlin.jvm.internal.m.d(absolutePath4, "getAbsolutePath(...)");
String absolutePath5 = file.getAbsolutePath();
kotlin.jvm.internal.m.d(absolutePath5, "getAbsolutePath(...)");
String substring2 = absolutePath4.substring(0, m3.m.R(absolutePath5, "/", 0, false, 6, null));
kotlin.jvm.internal.m.d(substring2, "substring(...)");
format = String.format(string2, Arrays.copyOf(new Object[]{substring2}, 1));
kotlin.jvm.internal.m.d(format, "format(...)");
}
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(format));
builder.setContentText(format);
builder.setAutoCancel(true);
builder.setGroup("com.uptodown.INSTALLABLE_FOUND");
Intent intent2 = new Intent(context, (Class<?>) InstallerActivity.class);
intent2.putExtra("realPath", file.getAbsolutePath());
intent2.putExtra("action", "delete");
intent2.putExtra("notificationId", i4);
PendingIntent activity2 = PendingIntent.getActivity(context, i4, intent2, t());
StringBuilder sb = new StringBuilder();
if (z) {
builder.addAction(2131231570, context.getString(2131952451), activity);
builder.setContentIntent(activity);
sb.append("install");
sb.append(";");
}
builder.addAction(2131230925, context.getString(N1.i.k0), activity2);
sb.append("delete");
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationManager notificationManager = (NotificationManager) systemService;
if (Build.VERSION.SDK_INT >= 24) {
NotificationCompat.Builder groupSummary = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN").setContentTitle(format).setSmallIcon(2131231561).setGroup("com.uptodown.INSTALLABLE_FOUND").setAutoCancel(true).setGroupSummary(true);
kotlin.jvm.internal.m.d(groupSummary, "setGroupSummary(...)");
notificationManager.notify(5, groupSummary.build());
}
notificationManager.notify(i4, builder.build());
E(name3, String.valueOf(System.currentTimeMillis()), format, sb.toString(), file.getAbsolutePath(), context);
}
}
public final void o(Context context, int i, String str) {
String format;
kotlin.jvm.internal.m.e(context, "context");
try {
if (a(context)) {
Intent intent = new Intent(context, (Class<?>) SecurityActivity.class);
intent.setPackage(context.getPackageName());
PendingIntent activity = PendingIntent.getActivity(context, 0, intent, Build.VERSION.SDK_INT >= 31 ? 67108864 : 0);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
H(builder);
builder.setContentIntent(activity);
if (i > 0) {
if (i == 1 && str != null && str.length() != 0) {
kotlin.jvm.internal.F f = kotlin.jvm.internal.F.a;
String string = context.getString(2131952419);
kotlin.jvm.internal.m.d(string, "getString(...)");
format = String.format(string, Arrays.copyOf(new Object[]{context.getString(N1.i.b), str}, 2));
kotlin.jvm.internal.m.d(format, "format(...)");
String str2 = format;
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(str2));
builder.setContentText(str2);
builder.setAutoCancel(true);
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).notify(256, builder.build());
E(null, String.valueOf(System.currentTimeMillis()), str2, "positive_apps", null, context);
}
kotlin.jvm.internal.F f4 = kotlin.jvm.internal.F.a;
String string2 = context.getString(2131952420);
kotlin.jvm.internal.m.d(string2, "getString(...)");
format = String.format(string2, Arrays.copyOf(new Object[]{context.getString(N1.i.b), String.valueOf(i)}, 2));
kotlin.jvm.internal.m.d(format, "format(...)");
String str22 = format;
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(str22));
builder.setContentText(str22);
builder.setAutoCancel(true);
Object systemService2 = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService2, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService2).notify(256, builder.build());
E(null, String.valueOf(System.currentTimeMillis()), str22, "positive_apps", null, context);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public final void p(Context context, C0955f appInfo, int i, Bitmap bitmap, C0944E preRegister) {
kotlin.jvm.internal.m.e(context, "context");
kotlin.jvm.internal.m.e(appInfo, "appInfo");
kotlin.jvm.internal.m.e(preRegister, "preRegister");
if (a(context)) {
int i4 = i + 500;
Intent intent = new Intent(context, (Class<?>) AppDetailActivity.class);
intent.putExtra("appInfo", appInfo);
PendingIntent activity = PendingIntent.getActivity(context, 0, intent, Build.VERSION.SDK_INT >= 31 ? 67108864 : 0);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "CHANNEL_ID_UPTODOWN");
H(builder);
builder.setContentIntent(activity);
kotlin.jvm.internal.F f = kotlin.jvm.internal.F.a;
String string = context.getString(2131952430);
kotlin.jvm.internal.m.d(string, "getString(...)");
String format = String.format(string, Arrays.copyOf(new Object[]{appInfo.M(), context.getString(N1.i.b)}, 2));
kotlin.jvm.internal.m.d(format, "format(...)");
if (bitmap != null) {
builder.setLargeIcon(bitmap);
}
builder.setContentIntent(activity);
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(format));
builder.setContentText(format);
builder.setAutoCancel(true);
builder.setGroup("com.uptodown.PREREGISTER");
Object systemService = context.getSystemService("notification");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).notify(i4, builder.build());
E(null, String.valueOf(System.currentTimeMillis()), format, "preregister", String.valueOf(appInfo.e()), context);
Bundle bundle = new Bundle();
bundle.putString("type", "notification_shown");
new z(context).d("preregister", bundle);
} else {
v a4 = v.v.a(context);
a4.a();
if (a4.v0(preRegister.c()) == null) {
a4.T0(preRegister);
}
a4.i();
}
preRegister.j(context);
}
public final void q(Context context, C0965p c0965p, String str) {
kotlin.jvm.internal.m.e(context, "context");
if (a(context) && com.uptodown.activities.preferences.a.a.N(context)) {
z(context, c0965p, str);
}
}
public final boolean u(Context context) {
kotlin.jvm.internal.m.e(context, "context");
return ContextCompat.checkSelfPermission(context, "android.permission.POST_NOTIFICATIONS") == 0;
}
public final void y(Context context, C0965p c0965p, String str) {
kotlin.jvm.internal.m.e(context, "context");
if (a(context) && com.uptodown.activities.preferences.a.a.N(context)) {
v(context, c0965p, str);
}
}
public final void z(android.content.Context r13, g2.C0965p r14, java.lang.String r15) {
throw new UnsupportedOperationException("Method not decompiled: u2.F.z(android.content.Context, g2.p, java.lang.String):void");
}
}