package com.tencent.mm.plugin.downloader.model;

import android.app.PendingIntent;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.downloader.f.a;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.ytcommon.BuildConfig;

class d$2 implements Runnable {
    final /* synthetic */ a kMF;
    final /* synthetic */ boolean kML;
    final /* synthetic */ d kMX;

    d$2(d dVar, a aVar, boolean z) {
        this.kMX = dVar;
        this.kMF = aVar;
        this.kML = z;
    }

    public final void run() {
        AppMethodBeat.i(2408);
        PendingIntent pendingIntent = null;
        if (this.kMF.field_fileType == 1) {
            pendingIntent = d.a(this.kMF.field_filePath, this.kMF);
        }
        if (this.kMF.field_showNotification && bo.isNullOrNil(this.kMF.field_fileName)) {
            d.b(this.kMF.field_appId, ah.getContext().getString(2131299777), BuildConfig.FLAVOR, pendingIntent);
        } else if (this.kMF.field_showNotification && !bo.isNullOrNil(this.kMF.field_fileName)) {
            d.b(this.kMF.field_appId, this.kMF.field_fileName, ah.getContext().getString(2131299777), pendingIntent);
        }
        if (this.kMF.field_autoInstall && this.kMF.field_fileType == 1 && !this.kMF.field_reserveInWifi) {
            d.f(this.kMF);
        }
        d.a(this.kMX).c(this.kMF.field_downloadId, this.kMF.field_filePath, this.kML);
        AppMethodBeat.o(2408);
    }
}
