package z8; import android.app.ActivityManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import com.tencent.wcdb.database.SQLiteDatabase; import d9.u; import java.util.List; import java.util.Map; /* compiled from: OnNotificationClickTask */ public final class e0 implements Runnable { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ Context f160990a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ Map f160991b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ d0 f160992c; public e0(d0 d0Var, Context context, Map map) { this.f160992c = d0Var; this.f160990a = context; this.f160991b = map; } public final void run() { String packageName = this.f160990a.getPackageName(); try { List<ActivityManager.RunningTaskInfo> runningTasks = ((ActivityManager) this.f160990a.getSystemService("activity")).getRunningTasks(100); if (runningTasks != null) { for (ActivityManager.RunningTaskInfo runningTaskInfo : runningTasks) { ComponentName componentName = runningTaskInfo.topActivity; if (componentName.getPackageName().equals(packageName)) { u.n("OnNotificationClickTask", "topClassName=" + componentName.getClassName()); Intent intent = new Intent(); intent.setComponent(componentName); intent.setFlags(335544320); d0.g(intent, this.f160991b); this.f160990a.startActivity(intent); return; } } } } catch (Exception e14) { u.b("OnNotificationClickTask", "start recentIntent is error", e14); } Intent launchIntentForPackage = this.f160990a.getPackageManager().getLaunchIntentForPackage(this.f160990a.getPackageName()); if (launchIntentForPackage != null) { launchIntentForPackage.setFlags(SQLiteDatabase.CREATE_IF_NECESSARY); d0.g(launchIntentForPackage, this.f160991b); this.f160990a.startActivity(launchIntentForPackage); return; } u.a("OnNotificationClickTask", "LaunchIntent is null"); } }