package epson.print.service;

import com.epson.iprint.apf.ApfEpImageAdapter;

import epson.print.EPImageList;
import epson.print.screen.PrintSetting;

public class LegacyRenderingController implements RenderingController {
    EPImageList mEpImageList;
    PrintService mEpsonService;
    PrintSetting.Kind mKind;

    public void interruptSubThreads() {
    }

    public void joinSubThread(long j) {
    }

    public void startDrawAfterStartJob(int i) {
    }

    public void waitPage(int i, int i2) throws Exception {
    }

    public LegacyRenderingController(PrintService printService, EPImageList ePImageList, PrintSetting.Kind kind) {
        mEpsonService = printService;
        mEpImageList = ePImageList;
        mKind = kind;
    }

    public void drawBeforeStartJob() throws LocalInterrupt {
        if (mEpImageList.apfModeInPrinting != 0 || mEpImageList.getSharpness() != 0) {
            EPImageList apfImageList = ApfEpImageAdapter.getApfImageList(mEpsonService.getLocalApplicationContext(), mEpImageList, mEpsonService);
            apfImageList.setRenderingMode(mEpImageList.getRenderingMode());
            if (mEpsonService.getCancelPrinting()) {
                throw new LocalInterrupt();
            } else if (apfImageList != null) {
                mEpImageList = apfImageList;
            } else {
                throw new IllegalStateException();
            }
        }
    }

    public EPImageList getImageList() {
        return mEpImageList;
    }

    public PrintSetting.Kind getKind() {
        return mKind;
    }
}
