123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757 |
- package epson.print.service;
- import android.app.Service;
- import android.content.Context;
- import android.content.Intent;
- import android.os.Binder;
- import android.os.Handler;
- import android.os.IBinder;
- import android.os.Message;
- import android.os.RemoteCallbackList;
- import android.os.RemoteException;
- import android.support.annotation.NonNull;
- import com.epson.cameracopy.printlayout.ImageAndLayout;
- import com.epson.iprint.apf.ApfEpImageAdapter;
- import com.epson.iprint.storage.StorageSecureStore;
- import com.epson.mobilephone.common.EpLog;
- import com.epson.mobilephone.common.PrintingLib.define.Constants;
- import com.epson.mobilephone.common.escpr.EscprError;
- import com.epson.mobilephone.common.escpr.EscprLib;
- import com.epson.mobilephone.common.wifidirect.WiFiDirectManager;
- import epson.common.Constants;
- import epson.common.ExternalFileUtils;
- import epson.common.Info_paper;
- import epson.common.Utils;
- import epson.print.EPImageCreator;
- import epson.print.EPImageList;
- import epson.print.EPPrinterManager;
- import epson.print.MyPrinter;
- import epson.print.Util.EPLog;
- import epson.print.ecclient.EcClientLib;
- import epson.print.ecclient.EcClientLibUtil;
- import epson.print.ecclient.EpsJobAttrib;
- import epson.print.ecclient.EpsMediaSize;
- import epson.print.ecclient.EpsMediaType;
- import epson.print.ecclient.EpsSupportedMedia;
- import epson.print.screen.PrintSetting;
- import epson.print.service.IEpsonService;
- import epson.provider.SharedPreferencesProvider;
- import java.io.DataOutputStream;
- import java.io.File;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.lang.Thread;
- import java.nio.ByteBuffer;
- import java.nio.ByteOrder;
- import java.util.ArrayList;
- import java.util.List;
- public class EpsonService extends Service implements ApfEpImageAdapter.ProgressCallback, PrintService {
- static final int DISABLE_SIMPLE_AP_TIMEOUT = 1800;
- public static final int EPS_ERR_MEMORY_ALLOCATION = -1001;
- public static final int EPS_ERR_NONE = 0;
- private static final int EPS_MLID_BORDERLESS = 1;
- static final int EPS_MSID_A3 = 62;
- static final int EPS_MSID_B4 = 63;
- static final int EPS_MSID_LEGAL = 2;
- public static final int MEDIA_INFO_MEMORY_ERROR = -5201;
- static final int NOT_SET_TIMEOUT = -1;
- public static final String PREFS_NAME = "PrintSetting";
- public static final int PROGRESS_NOTIFY_TYPE_APF = 2;
- public static final int PROGRESS_NOTIFY_TYPE_PRINTING = 1;
- /* access modifiers changed from: private */
- public static volatile boolean bCancelPrinting = false;
- public static boolean bNotifyPrinter = false;
- /* access modifiers changed from: private */
- public static boolean isInitDriver = false;
- static final RemoteCallbackList<IEpsonServiceCallback> mCallbacks = new RemoteCallbackList<>();
- /* access modifiers changed from: private */
- public static final Object mCancelLock = new Object();
- /* access modifiers changed from: private */
- public static final Object mConnect = new Object();
- /* access modifiers changed from: private */
- public static final Object mLock = new Object();
- /* access modifiers changed from: private */
- public static final Object mLockPrintingStatus = new Object();
- /* access modifiers changed from: private */
- public static final Object mLockSearchingStatus = new Object();
- /* access modifiers changed from: private */
- public static final Object mPrinting = new Object();
- private final int EPS_ERR_PRINTER_NOT_SET = EscprError.EPS_ERR_PRINTER_NOT_SET;
- private final int EPS_PRNERR_COMM = 102;
- private final int EPS_PRNERR_NOERROR = 0;
- private final int EPS_PRNST_BUSY = 2;
- private final int EPS_PRNST_ERROR = 4;
- private final String TAG = "EpsonService";
- /* access modifiers changed from: private */
- public String accessKey = "";
- /* access modifiers changed from: private */
- public boolean bEnd;
- /* access modifiers changed from: private */
- public volatile boolean bPrinting = false;
- /* access modifiers changed from: private */
- public volatile boolean bSearching = false;
- boolean bSetPrinter = false;
- /* access modifiers changed from: private */
- public String clientId = null;
- public String debugString;
- /* access modifiers changed from: private */
- public EpsJobAttrib epsJobattrib = new EpsJobAttrib();
- /* access modifiers changed from: private */
- /* renamed from: id */
- public String f406id;
- /* access modifiers changed from: private */
- /* renamed from: ip */
- public String f407ip;
- /* access modifiers changed from: private */
- public final IEpsonService.Stub mBinder = new IEpsonService.Stub() {
- EcClientLib mEcClientLib = new EcClientLib();
- boolean mEpsonConnectlogin;
- int mRemotePrintMaxFileSize = 0;
- {
- this.mEcClientLib.Initialize();
- this.mEpsonConnectlogin = false;
- }
- public void unregisterCallback(IEpsonServiceCallback iEpsonServiceCallback) throws RemoteException {
- if (iEpsonServiceCallback != null) {
- EpsonService.mCallbacks.unregister(iEpsonServiceCallback);
- }
- }
- public void registerCallback(IEpsonServiceCallback iEpsonServiceCallback) throws RemoteException {
- if (iEpsonServiceCallback != null) {
- EpsonService.mCallbacks.register(iEpsonServiceCallback);
- }
- }
- public synchronized int searchPrinters(String str, String str2, int i) throws RemoteException {
- synchronized (EpsonService.mLockSearchingStatus) {
- EpsonService.bNotifyPrinter = false;
- }
- String unused = EpsonService.this.f406id = str;
- String unused2 = EpsonService.this.f407ip = str2;
- int unused3 = EpsonService.this.probeMethod = i;
- if (EpsonService.this.searchingPrinter != null) {
- EPLog.m305d("EpsonService", "searchPrinters() search intterrupt()");
- EpsonService.this.searchingPrinter.interrupt();
- try {
- EpsonService.this.searchingPrinter.join();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- EpsonService.access$504(EpsonService.this);
- if (EpsonService.this.mSearchCount > 1) {
- EPLog.m307e("EpsonService", "search count error! mSearchCount => " + EpsonService.this.mSearchCount);
- }
- if (!EpsonService.isInitDriver) {
- EpsonService.this.mEscprLib.release_driver();
- boolean unused4 = EpsonService.isInitDriver = true;
- EpsonService.this.mEscprLib.init_driver(EpsonService.this.getApplicationContext(), ExternalFileUtils.getInstance(EpsonService.this.getApplicationContext()).getSupportedMediaDir());
- }
- EpsonService.this.createSearchingThread();
- EpsonService.this.searchingPrinter.start();
- return 0;
- }
- public synchronized int cancelSearchPrinter() throws RemoteException {
- EPLog.m307e("Epson", "cancelSearchPrinter() call");
- if (EpsonService.this.searchingPrinter == null) {
- EPLog.m307e("Epson", "cancelSearchPrinter() finish1");
- return 0;
- }
- EpsonService.this.searchingPrinter.interrupt();
- try {
- EPLog.m305d("EpsonService", "searchingPrinter.join() enter");
- EpsonService.this.searchingPrinter.join(1000);
- int i = 0;
- while (true) {
- if (!Thread.State.RUNNABLE.equals(EpsonService.this.searchingPrinter.getState())) {
- break;
- }
- int i2 = i + 1;
- if (i > 60) {
- EPLog.m318w("EpsonService", "mSearchThread.join() timeout");
- break;
- }
- EPLog.m305d("EpsonService", "retry doCancelFindPrinter() " + i2);
- EpsonService.this.searchingPrinter.interrupt();
- EpsonService.this.searchingPrinter.join(1000);
- i = i2;
- }
- EPLog.m305d("EpsonService", "searchingPrinter.join() leave");
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- EPLog.m307e("Epson", "cancelSearchPrinter() finish");
- return 0;
- }
- public void setTimeOut(int i) throws RemoteException {
- EpLog.d("EpsonService", "timeout = " + i);
- int unused = EpsonService.this.timeout_sec = i;
- }
- public int setCurPrinter(int i) throws RemoteException {
- int i2;
- EPLog.m305d("EpsonService", "setCurPrinter(): " + i);
- cancelSearchPrinter();
- EPLog.m307e("Epson", "Finish cancelSearchPrinter()");
- synchronized (EpsonService.mLock) {
- EPLog.m305d("EpsonService", "Start set_printer()");
- i2 = EpsonService.this.mEscprLib.set_printer(i);
- EPLog.m305d("EpsonService", "setCurPrinter: result = " + i2);
- }
- return i2;
- }
- public int print(EPImageList ePImageList, String str, boolean z) throws RemoteException {
- EpLog.i();
- boolean z2 = SharedPreferencesProvider.getInstace(EpsonService.this).getInt(Constants.PRINTER_LOCATION, 0) == 2;
- EpLog.m77i("☆☆ isRemotePrinter " + z2);
- PrintSetting.Kind valueOf = PrintSetting.Kind.valueOf(str);
- if (z2) {
- int unused = EpsonService.this.createECPrintingThread(valueOf, ePImageList);
- if (EpsonService.this.printingThread != null) {
- EpsonService.this.printingThread.start();
- }
- return 0;
- }
- EpsonService.this.startLocalNonPdfPrintThread(valueOf, ePImageList, z);
- return 0;
- }
- public int printLocalPdf(String str, String str2, String str3, boolean z, int i, int i2, boolean z2) {
- EpsonService.this.startPdfPrintThread(str, str2, str3, z, i, i2, z2);
- return 0;
- }
- public int printWithImagesAndLayouts(List<ImageAndLayout> list, boolean z) {
- EpsonService epsonService = EpsonService.this;
- Thread unused = epsonService.printingThread = new PrintAndLayoutThread(epsonService, list, z);
- EpsonService.this.printingThread.start();
- return 0;
- }
- public int cancelPrint() throws RemoteException {
- return EpsonService.this.mEscprLib.cancel_print();
- }
- public int getLang() throws RemoteException {
- int i;
- synchronized (EpsonService.mLock) {
- i = EpsonService.this.mEscprLib.get_lang();
- }
- return i;
- }
- public int getSupportedMedia(boolean z, int i, String str, String str2) throws RemoteException {
- int i2;
- synchronized (EpsonService.mPrinting) {
- synchronized (EpsonService.mLock) {
- synchronized (EpsonService.mPrinting) {
- if (z) {
- i2 = EpsonConnectGetSupportedMedia(i, str, str2);
- } else {
- i2 = EpsonService.this.mEscprLib.get_supported_media2();
- }
- }
- }
- }
- return i2;
- }
- public int[] getPaperSize() throws RemoteException {
- int[] iArr;
- synchronized (EpsonService.mLock) {
- iArr = EpsonService.this.mEscprLib.get_paper_size();
- }
- return iArr;
- }
- public int[] getPaperType(int i) throws RemoteException {
- int[] iArr;
- synchronized (EpsonService.mLock) {
- iArr = EpsonService.this.mEscprLib.get_paper_type(i);
- }
- return iArr;
- }
- public int[] getLayout(int i, int i2) throws RemoteException {
- int[] iArr;
- synchronized (EpsonService.mLock) {
- iArr = EpsonService.this.mEscprLib.get_layout(i, i2);
- }
- return iArr;
- }
- public int[] getQuality(int i, int i2) throws RemoteException {
- int[] iArr;
- synchronized (EpsonService.mLock) {
- iArr = EpsonService.this.mEscprLib.get_quality(i, i2);
- }
- return iArr;
- }
- public int[] getPaperSource(int i, int i2, int i3) throws RemoteException {
- int[] iArr;
- synchronized (EpsonService.mLock) {
- iArr = EpsonService.this.mEscprLib.get_paper_source(i, i2);
- }
- return iArr;
- }
- public int[] getColor(boolean z, int i, int i2, int i3) throws RemoteException {
- int[] iArr;
- int i4;
- synchronized (EpsonService.mLock) {
- if (z) {
- ArrayList arrayList = new ArrayList();
- if (i == 1) {
- i4 = this.mEcClientLib.mColorModeAtRemote;
- } else {
- i4 = this.mEcClientLib.mColorModeAtLocal;
- }
- if ((i4 & 1) != 0) {
- arrayList.add(0);
- }
- if ((i4 & 2) != 0) {
- arrayList.add(1);
- }
- int size = arrayList.size();
- iArr = new int[arrayList.size()];
- for (int i5 = 0; i5 < size; i5++) {
- iArr[i5] = ((Integer) arrayList.get(i5)).intValue();
- }
- } else {
- iArr = EpsonService.this.mEscprLib.get_color(i2, i3);
- }
- }
- return iArr;
- }
- public int getDuplex(int i, int i2) throws RemoteException {
- int i3;
- synchronized (EpsonService.mLock) {
- i3 = EpsonService.this.mEscprLib.get_duplex(i, i2);
- }
- return i3;
- }
- public boolean isPrinting() {
- boolean access$1700;
- synchronized (EpsonService.mLockPrintingStatus) {
- access$1700 = EpsonService.this.bPrinting;
- }
- return access$1700;
- }
- public boolean isSearchingPrinter() {
- boolean access$1800;
- synchronized (EpsonService.mLockSearchingStatus) {
- access$1800 = EpsonService.this.bSearching;
- }
- return access$1800;
- }
- public int confirmCancel(boolean z) {
- EPLog.m307e("LAM DAI HIEP", "confirmCancel() call");
- EPLog.m316v("cancel ", "iscancel " + z);
- if (!z) {
- return 0;
- }
- synchronized (EpsonService.mLockPrintingStatus) {
- boolean unused = EpsonService.bCancelPrinting = true;
- synchronized (EpsonService.mCancelLock) {
- if (EpsonService.this.mEPImageCreator != null) {
- EpsonService.this.mEPImageCreator.requestStop();
- }
- }
- if (EpsonService.this.bPrinting) {
- if (EpsonService.this.mLocalPrintThread != null) {
- EpsonService.this.mLocalPrintThread.interrupt();
- }
- EPLog.m307e("lam dai hiep", "confirm_cancel: " + z);
- EpsonService.this.mEscprLib.confirm_cancel(z);
- } else if (isSearchingPrinter()) {
- try {
- cancelSearchPrinter();
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
- }
- return 0;
- }
- public int confirmContinueable(boolean z) {
- EPLog.m307e("LAM DAI HIEP", "confirmContinueable() call: " + z);
- return EpsonService.this.mEscprLib.confirm_continue(z);
- }
- public int updatePrinterSettings(String str) {
- int i;
- int i2;
- int i3;
- int i4;
- int i5;
- int i6;
- int i7;
- EpLog.m83w("EpsonService", "call updatePrinterSettings() :: " + Binder.getCallingPid());
- PrintSetting printSetting = new PrintSetting(EpsonService.this, PrintSetting.Kind.valueOf(str));
- printSetting.loadSettings();
- int i8 = printSetting.paperSizeValue;
- int i9 = printSetting.paperTypeValue;
- int i10 = printSetting.layoutValue;
- int i11 = printSetting.qualityValue;
- int i12 = printSetting.paperSourceValue;
- int i13 = printSetting.duplexValue;
- int i14 = printSetting.colorValue;
- try {
- int[] paperSize = getPaperSize();
- if (paperSize != null) {
- if (paperSize.length != 0) {
- int i15 = 0;
- while (true) {
- if (i15 >= paperSize.length) {
- i = 0;
- break;
- } else if (i8 == paperSize[i15]) {
- i = i15;
- break;
- } else {
- i15++;
- }
- }
- if (i15 >= paperSize.length) {
- int defaultPaperSize = printSetting.getDefaultPaperSize();
- i2 = 0;
- while (true) {
- if (i2 >= paperSize.length) {
- break;
- } else if (defaultPaperSize == paperSize[i2]) {
- i8 = paperSize[i2];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperSize = " + i8);
- i = i2;
- break;
- } else {
- i2++;
- }
- }
- } else {
- i2 = i15;
- }
- if (i2 >= paperSize.length) {
- i8 = paperSize[0];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperSize = " + i8);
- i = 0;
- }
- int[] paperType = getPaperType(i);
- if (paperType != null) {
- if (paperType.length != 0) {
- int i16 = 0;
- while (true) {
- if (i16 >= paperType.length) {
- i3 = 0;
- break;
- } else if (i9 == paperType[i16]) {
- i3 = i16;
- break;
- } else {
- i16++;
- }
- }
- if (i16 >= paperType.length) {
- int defaultPaperType = printSetting.getDefaultPaperType();
- i4 = 0;
- while (true) {
- if (i4 >= paperType.length) {
- break;
- } else if (defaultPaperType == paperType[i4]) {
- i9 = paperType[i4];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperType = " + i9);
- i3 = i4;
- break;
- } else {
- i4++;
- }
- }
- } else {
- i4 = i16;
- }
- if (i4 >= paperType.length) {
- if (PrintSetting.Kind.photo.compareTo(PrintSetting.Kind.valueOf(str)) == 0) {
- int code = Constants.MediaName.EPS_MTID_MATTE.getCode();
- int i17 = 0;
- while (true) {
- if (i4 >= paperType.length) {
- break;
- } else if (code == paperType[i4]) {
- i9 = paperType[i4];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperType = " + i9);
- i3 = i4;
- break;
- } else {
- i17 = i4 + 1;
- }
- }
- } else {
- int code2 = Constants.MediaName.EPS_MTID_PLAIN1.getCode();
- int i18 = 0;
- while (true) {
- if (i4 >= paperType.length) {
- break;
- } else if (code2 == paperType[i4]) {
- i9 = paperType[i4];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperType = " + i9);
- i3 = i4;
- break;
- } else {
- i18 = i4 + 1;
- }
- }
- if (i4 >= paperType.length) {
- int code3 = Constants.MediaName.EPS_MTID_AUTO_PLAIN.getCode();
- int i19 = 0;
- while (true) {
- if (i4 >= paperType.length) {
- break;
- } else if (code3 == paperType[i4]) {
- i9 = paperType[i4];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperType = " + i9);
- i3 = i4;
- break;
- } else {
- i19 = i4 + 1;
- }
- }
- }
- }
- }
- if (i4 >= paperType.length) {
- i9 = paperType[0];
- EPLog.m318w("EpsonService", "updatePrinterSettings paperType = " + i9);
- i3 = 0;
- }
- int[] layout = getLayout(i, i3);
- if (layout != null) {
- int i20 = 0;
- while (true) {
- if (i20 >= layout.length) {
- break;
- } else if (i10 == layout[i20]) {
- i10 = layout[i20];
- break;
- } else {
- i20++;
- }
- }
- if (i20 >= layout.length) {
- EPLog.m318w("EpsonService", "updatePrinterSettings layout = EPS_MLID_BORDERS");
- i10 = 2;
- }
- } else {
- EPLog.m318w("EpsonService", "updatePrinterSettings layout = EPS_MLID_BORDERS");
- i10 = 2;
- }
- int[] quality = getQuality(i, i3);
- if (quality != null) {
- int i21 = 0;
- while (true) {
- if (i21 >= quality.length) {
- break;
- } else if (i11 == quality[i21]) {
- i11 = quality[i21];
- break;
- } else {
- i21++;
- }
- }
- if (i21 >= quality.length) {
- i5 = quality.length > 0 ? quality[0] : 2;
- EPLog.m318w("EpsonService", "updatePrinterSettings quality = " + i5);
- }
- } else {
- EPLog.m318w("EpsonService", "updatePrinterSettings quality = " + 2);
- i5 = 2;
- }
- int[] paperSource = getPaperSource(i, i3, 0);
- if (paperSource != null) {
- int i22 = 0;
- while (true) {
- if (i22 >= paperSource.length) {
- break;
- } else if (i12 == paperSource[i22]) {
- i12 = paperSource[i22];
- break;
- } else {
- i22++;
- }
- }
- if (i22 >= paperSource.length) {
- i6 = paperSource.length > 0 ? paperSource[0] : 0;
- EPLog.m318w("EpsonService", "updatePrinterSettings paperSource = " + i6);
- }
- } else {
- EPLog.m318w("EpsonService", "updatePrinterSettings paperSource = EPS_MPID_NOT_SPEC");
- i6 = 0;
- }
- int duplex = getDuplex(i, i3);
- if ((duplex == 0 || (i10 == 1 && (duplex & 2) != 0)) && i13 != 0) {
- EPLog.m318w("EpsonService", "updatePrinterSettings duplex = EPS_DUPLEX_NONE");
- i13 = 0;
- }
- int[] color = getColor(false, 0, i, i3);
- if (color != null) {
- int i23 = 0;
- while (true) {
- if (i23 >= color.length) {
- break;
- } else if (i14 == color[i23]) {
- i14 = color[i23];
- break;
- } else {
- i23++;
- }
- }
- if (i23 >= color.length) {
- i7 = color.length > 0 ? color[0] : 0;
- EPLog.m318w("EpsonService", "updatePrinterSettings color = " + i7);
- }
- } else {
- EPLog.m318w("EpsonService", "updatePrinterSettings color = " + 0);
- i7 = 0;
- }
- printSetting.paperSizeValue = i8;
- printSetting.paperTypeValue = i9;
- printSetting.layoutValue = i10;
- printSetting.qualityValue = i5;
- printSetting.paperSourceValue = i6;
- printSetting.duplexValue = i13;
- printSetting.colorValue = i7;
- printSetting.saveSettings();
- return 0;
- }
- }
- EPLog.m318w("EpsonService", "updatePrinterSettings Failed getPaperType");
- return -1;
- }
- }
- EPLog.m318w("EpsonService", "updatePrinterSettings Failed getPaperSize");
- return -1;
- } catch (RemoteException e) {
- e.printStackTrace();
- return -1;
- }
- }
- public int EpsonConnectUpdatePrinterSettings(String str) {
- int i;
- EpsSupportedMedia epsSupportedMedia;
- boolean z;
- boolean z2;
- int i2;
- int i3;
- EpLog.d("EpsonService", "EpsonConnectUpdatePrinterSettings() called.");
- PrintSetting instance = PrintSetting.getInstance(EpsonService.this, str);
- instance.loadSettings();
- int i4 = instance.paperSizeValue;
- int i5 = instance.paperTypeValue;
- int i6 = instance.layoutValue;
- int i7 = instance.qualityValue;
- int i8 = instance.paperSourceValue;
- int i9 = instance.duplexValue;
- int i10 = instance.colorValue;
- try {
- int i11 = 0;
- WiFiDirectManager.setPriorityToSimpleAP(EpsonService.this, false);
- int updateSettingsRemoteSourceType = instance.getUpdateSettingsRemoteSourceType();
- int supportedMedia = getSupportedMedia(true, updateSettingsRemoteSourceType, (String) null, (String) null);
- switch (updateSettingsRemoteSourceType) {
- case 1:
- epsSupportedMedia = this.mEcClientLib.mMediaAtRemote;
- i = this.mEcClientLib.mColorModeAtRemote;
- break;
- case 2:
- epsSupportedMedia = this.mEcClientLib.mMediaAtPhoto;
- i = this.mEcClientLib.mColorModeAtPhoto;
- break;
- case 3:
- epsSupportedMedia = this.mEcClientLib.mMediaAtLocal;
- i = this.mEcClientLib.mColorModeAtLocal;
- break;
- default:
- EPLog.m307e("EpsonService", "remoteSourceType is invalid.");
- return -1;
- }
- if (supportedMedia == 0) {
- int i12 = 0;
- while (true) {
- if (i12 >= epsSupportedMedia.mSizeList.length) {
- z = true;
- i12 = 0;
- } else if (i4 == epsSupportedMedia.mSizeList[i12].mMediaSizeID) {
- z = false;
- } else {
- i12++;
- }
- }
- if (z) {
- int defaultPaperSize = instance.getDefaultPaperSize();
- while (true) {
- if (i11 >= epsSupportedMedia.mSizeList.length) {
- i11 = i12;
- } else if (defaultPaperSize == epsSupportedMedia.mSizeList[i11].mMediaSizeID) {
- EPLog.m318w("EpsonService", "EpsonConnectUpdatePrinterSettings paperSize_index = " + i11);
- z = false;
- } else {
- i11++;
- }
- }
- if (z) {
- i11 = 0;
- }
- } else {
- i11 = i12;
- }
- int i13 = 0;
- while (true) {
- if (i13 >= epsSupportedMedia.mSizeList[i11].mTypeList.length) {
- z2 = true;
- i2 = 0;
- } else if (i5 == epsSupportedMedia.mSizeList[i11].mTypeList[i13].mMediaTypeId) {
- i2 = i13;
- z2 = false;
- } else {
- i13++;
- }
- }
- if (z2) {
- int defaultPaperType = instance.getDefaultPaperType();
- int i14 = 0;
- while (true) {
- if (i14 < epsSupportedMedia.mSizeList[i11].mTypeList.length) {
- if (defaultPaperType == epsSupportedMedia.mSizeList[i11].mTypeList[i14].mMediaTypeId) {
- EPLog.m318w("EpsonService", "EpsonConnectUpdatePrinterSettings paperType_index = " + i14);
- i2 = i14;
- z2 = false;
- } else {
- i14++;
- }
- }
- }
- if (z2) {
- i2 = 0;
- }
- }
- int i15 = epsSupportedMedia.mSizeList[i11].mMediaSizeID;
- int i16 = epsSupportedMedia.mSizeList[i11].mTypeList[i2].mMediaTypeId;
- EpsMediaType epsMediaType = epsSupportedMedia.mSizeList[i11].mTypeList[i2];
- int i17 = 8;
- if ((epsMediaType.mPaperSource & i8) == i8) {
- i3 = i8;
- } else if ((epsMediaType.mPaperSource & 1) == 1) {
- i3 = 1;
- } else if ((epsMediaType.mPaperSource & 2) == 2) {
- i3 = 2;
- } else if ((epsMediaType.mPaperSource & 4) == 4) {
- i3 = 4;
- } else if ((epsMediaType.mPaperSource & 8) == 8) {
- i3 = 8;
- } else if ((epsMediaType.mPaperSource & 16) == 16) {
- i3 = 16;
- } else {
- i3 = 128;
- if ((epsMediaType.mPaperSource & 128) != 128) {
- i3 = 32768;
- if ((epsMediaType.mPaperSource & 32768) != 32768) {
- if ((epsMediaType.mPaperSource & 32) == 32) {
- i3 = 32;
- } else {
- i3 = 64;
- if ((epsMediaType.mPaperSource & 64) != 64) {
- i3 = 2;
- }
- }
- }
- }
- }
- if ((epsMediaType.mLayout & i6) == i6) {
- i17 = i6 == 0 ? 2 : i6;
- } else if ((epsMediaType.mLayout & 1) == 1) {
- i17 = 1;
- } else if ((epsMediaType.mLayout & 2) == 2) {
- i17 = 2;
- } else if ((epsMediaType.mLayout & 4) == 4) {
- i17 = 4;
- } else if ((epsMediaType.mLayout & 8) != 8) {
- i17 = 2;
- }
- if ((epsMediaType.mQuality & i7) == i7) {
- if (i7 == 0) {
- i7 = 2;
- }
- } else if ((epsMediaType.mQuality & 1) == 1) {
- i7 = 1;
- } else if ((epsMediaType.mQuality & 2) == 2) {
- i7 = 2;
- } else {
- i7 = (epsMediaType.mQuality & 4) == 4 ? 4 : 2;
- }
- if (epsMediaType.mDuplex == 0 && i9 != 0) {
- i9 = 0;
- }
- if (((1 << i10) & i) == 0) {
- i10 = (i & 1) != 0 ? 0 : (2 & i) != 0 ? 1 : 0;
- }
- instance.paperSizeValue = i15;
- instance.paperTypeValue = i16;
- instance.layoutValue = i17;
- instance.layoutMultiPageValue = 0;
- instance.qualityValue = i7;
- instance.paperSourceValue = i3;
- instance.duplexValue = i9;
- instance.colorValue = i10;
- instance.printdate = 0;
- instance.saveSettings();
- return 0;
- }
- ExternalFileUtils instance2 = ExternalFileUtils.getInstance(EpsonService.this.getApplicationContext());
- instance2.getSupportedMedia().delete();
- instance2.getSavedSupportedMedia().delete();
- instance.paperSizeValue = instance.getDefaultPaperSize();
- instance.paperTypeValue = instance.getDefaultPaperType();
- instance.layoutValue = 2;
- instance.layoutMultiPageValue = 0;
- instance.qualityValue = 2;
- instance.paperSourceValue = 2;
- instance.duplexValue = 0;
- instance.printdate = 0;
- instance.saveSettings();
- return -1;
- } catch (RemoteException e) {
- e.printStackTrace();
- return -1;
- }
- }
- public int EpsonConnectCreateJob(int i, String str, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14) {
- int i15;
- int i16;
- int i17 = i;
- EPLog.m305d("EpsonService", "EpsonConnectCreateJob() called.");
- this.mEcClientLib.resetCancel();
- EpsonService.this.epsJobattrib.mMediaSizeIdx = i2;
- EpsonService.this.epsJobattrib.mMediaTypeIdx = i3;
- EpsonService.this.epsJobattrib.mPrintLayout = i4;
- EpsonService.this.epsJobattrib.mPrintQuality = i5;
- EpsonService.this.epsJobattrib.mPaperSource = i6;
- if (i7 == 1) {
- EpsonService.this.epsJobattrib.mColorMode = 2;
- } else {
- EpsonService.this.epsJobattrib.mColorMode = 1;
- }
- EpsonService.this.epsJobattrib.mBrightness = i8;
- EpsonService.this.epsJobattrib.mContrast = i9;
- EpsonService.this.epsJobattrib.mSaturation = i10;
- EpsonService.this.epsJobattrib.mPrintDirection = i11;
- EpsonService.this.epsJobattrib.mDuplex = i12;
- int i18 = 0;
- int ensureLogin = ensureLogin(false);
- if (ensureLogin != 0) {
- return ensureLogin;
- }
- if (i17 == 1) {
- String str2 = str;
- i18 = (int) new File(str).length();
- i16 = i13;
- i15 = i14;
- } else {
- String str3 = str;
- i16 = 0;
- i15 = 0;
- }
- try {
- String createJobFileName = EcClientLibUtil.getCreateJobFileName(i, str);
- try {
- ensureLogin = this.mEcClientLib.CreateJob(i, createJobFileName == null ? i17 != 2 ? "iPrint" : "iPrint Photo" : createJobFileName, i18, EpsonService.this.epsJobattrib, i16, i15);
- this.mRemotePrintMaxFileSize = this.mEcClientLib.mEccJobInfo.mMaxFileSize;
- return ensureLogin;
- } catch (NullPointerException e) {
- e.printStackTrace();
- return ensureLogin;
- }
- } catch (Exception e2) {
- e2.printStackTrace();
- return -1;
- }
- }
- public int EpsonConnectChangePrintSetting() {
- EPLog.m305d("EpsonService", "EpsonConnectChangePrintSetting() called.");
- return this.mEcClientLib.ChangePrintSetting(EpsonService.this.epsJobattrib, EcClientLibUtil.quoteForJsonString(EpsonService.this.mailAddress), EcClientLibUtil.quoteForJsonString(EpsonService.this.accessKey), false);
- }
- public int EpsonConnectUploadFile(String str, int i) {
- EPLog.m305d("EpsonService", "EpsonConnectUploadFile() called. - " + str);
- int ensureLogin = ensureLogin(false);
- if (ensureLogin != 0) {
- return ensureLogin;
- }
- return this.mEcClientLib.UploadFile(str, (int) new File(str).length(), i);
- }
- public int EpsonConnectStartPrint(int i, int i2) {
- EPLog.m305d("EpsonService", "EpsonConnectStartPrint() called.");
- return this.mEcClientLib.StartPrint(i, i2);
- }
- public int EpsonConnectEndJob() {
- EPLog.m305d("EpsonService", "EpsonConnectEndJob() called.");
- int EndJob = this.mEcClientLib.EndJob();
- this.mEcClientLib.resetCancel();
- return EndJob;
- }
- public int EpsonConnectCheckSupportedFileType(String str) {
- EPLog.m305d("EpsonService", "EpsonConnectCheckSupportedFileType() called.");
- return 0;
- }
- public int EpsonConnectGetRenderingStatus(int[] iArr) {
- int GetRenderingStatus;
- synchronized (EpsonService.mConnect) {
- iArr[0] = 1;
- iArr[1] = 0;
- GetRenderingStatus = this.mEcClientLib.GetRenderingStatus();
- if (GetRenderingStatus == 0) {
- iArr[0] = this.mEcClientLib.mRenderStatus;
- iArr[1] = this.mEcClientLib.mCompletePage;
- }
- }
- return GetRenderingStatus;
- }
- public int EpsonConnectGetPreview(int i, String str) {
- int DownloadPreview;
- synchronized (EpsonService.mConnect) {
- EPLog.m305d("EpsonService", "EpsonConnectGetPreview() called.");
- DownloadPreview = this.mEcClientLib.DownloadPreview(i, str);
- }
- return DownloadPreview;
- }
- public int EpsonConnectGetSupportedMedia(int i, String str, String str2) {
- EpsSupportedMedia epsSupportedMedia;
- int i2 = i;
- String path = ExternalFileUtils.getInstance(EpsonService.this.getApplicationContext()).getSupportedMedia().getPath();
- WiFiDirectManager.setPriorityToSimpleAP(EpsonService.this, false);
- if (str == null || str.length() <= 0) {
- int ensureLogin = ensureLogin(false);
- if (ensureLogin != 0) {
- return ensureLogin;
- }
- } else {
- this.mEpsonConnectlogin = false;
- int Login = this.mEcClientLib.Login(EcClientLibUtil.quoteForJsonString(str), EcClientLibUtil.quoteForJsonString(str2), EpsonService.this.clientId);
- if (Login != 0) {
- return Login;
- }
- }
- int GetCapability = this.mEcClientLib.GetCapability();
- if (GetCapability != 0) {
- return GetCapability;
- }
- switch (i2) {
- case 1:
- epsSupportedMedia = this.mEcClientLib.mMediaAtRemote;
- break;
- case 2:
- epsSupportedMedia = this.mEcClientLib.mMediaAtPhoto;
- break;
- case 3:
- epsSupportedMedia = this.mEcClientLib.mMediaAtLocal;
- break;
- default:
- EPLog.m307e("EpsonService", "sourceType is invalid.");
- return -1;
- }
- try {
- File file = new File(path);
- DataOutputStream dataOutputStream = new DataOutputStream(new FileOutputStream(file));
- byte[] bArr = new byte[32];
- ByteBuffer wrap = ByteBuffer.wrap(bArr);
- wrap.order(ByteOrder.LITTLE_ENDIAN);
- wrap.clear();
- wrap.putInt(epsSupportedMedia.mJpegSizeLimit);
- wrap.putInt(r10);
- dataOutputStream.write(bArr, 0, wrap.position());
- wrap.clear();
- for (EpsMediaSize epsMediaSize : epsSupportedMedia.mSizeList) {
- wrap.putInt(epsMediaSize.mMediaSizeID);
- wrap.putInt(r13);
- dataOutputStream.write(bArr, 0, wrap.position());
- wrap.clear();
- for (EpsMediaType epsMediaType : epsMediaSize.mTypeList) {
- wrap.putInt(epsMediaType.mMediaTypeId);
- wrap.putInt(epsMediaType.mLayout);
- wrap.putInt(epsMediaType.mQuality);
- wrap.putInt(epsMediaType.mPaperSource);
- wrap.putInt(epsMediaType.mDuplex);
- dataOutputStream.write(bArr, 0, wrap.position());
- wrap.clear();
- }
- }
- wrap.putInt(epsSupportedMedia.mResolution);
- wrap.putInt(1);
- dataOutputStream.write(bArr, 0, wrap.position());
- wrap.clear();
- dataOutputStream.close();
- EPLog.m313i("EpsonService", "finishu output SUPPORTED_MEDIA for EC. filename = " + path + " sourceType = " + i2 + " filesize = " + file.length());
- Utils.copyFile(file, new File(ExternalFileUtils.getInstance(EpsonService.this.getApplicationContext()).getSavedSupportedMedia().getPath()));
- return 0;
- } catch (IOException e) {
- EPLog.m307e("EpsonService", "get_epsonconnect_supported_media(): IOExceptin.");
- e.printStackTrace();
- return -1;
- }
- }
- public int ensureLogin(boolean z) {
- EpsonService.this.updateLoginInfo();
- if (z) {
- this.mEpsonConnectlogin = false;
- }
- if (!this.mEpsonConnectlogin) {
- int Login = this.mEcClientLib.Login(EcClientLibUtil.quoteForJsonString(EpsonService.this.mailAddress), EcClientLibUtil.quoteForJsonString(EpsonService.this.accessKey), EpsonService.this.clientId);
- if (Login != 0) {
- return Login;
- }
- this.mEpsonConnectlogin = true;
- }
- return 0;
- }
- public int EpsonConnectGetRemotePrintMaxFileSize() {
- return this.mRemotePrintMaxFileSize;
- }
- public void EpsonConnectCancel() {
- this.mEcClientLib.cancel();
- }
- public void refreshRemotePrinterLogin() {
- EpsonService.this.updateLoginInfo();
- }
- };
- /* access modifiers changed from: private */
- public int mCreatetSheetIndex = 0;
- volatile EPImageCreator mEPImageCreator;
- /* access modifiers changed from: private */
- public final EscprLib mEscprLib = EscprLib.getInstance();
- Handler mHandler = new Handler(new Handler.Callback() {
- public boolean handleMessage(Message message) {
- int i = message.what;
- if (i != 30) {
- switch (i) {
- case 0:
- EpsonService.this.epsNotifyDataChange((String) message.obj);
- return true;
- case 1:
- EpsonService.this.epsNotifyContinueable(message.arg1);
- return true;
- case 2:
- EpsonService.this.epsNotifyError(message.arg1, message.arg2, ((Boolean) message.obj).booleanValue());
- return true;
- default:
- return true;
- }
- } else {
- EpsonService.this.epsNotifyPage(message.arg1);
- return true;
- }
- }
- });
- /* access modifiers changed from: private */
- public LocalPrintThread mLocalPrintThread;
- /* access modifiers changed from: private */
- public volatile int mSearchCount = 0;
- /* access modifiers changed from: private */
- public String mailAddress = "";
- /* access modifiers changed from: private */
- public Thread printingThread = null;
- /* access modifiers changed from: private */
- public int probeMethod;
- /* access modifiers changed from: private */
- public SearchingThread searchingPrinter = null;
- /* access modifiers changed from: private */
- public int timeout_sec = -1;
- static /* synthetic */ int access$504(EpsonService epsonService) {
- int i = epsonService.mSearchCount + 1;
- epsonService.mSearchCount = i;
- return i;
- }
- static /* synthetic */ int access$506(EpsonService epsonService) {
- int i = epsonService.mSearchCount - 1;
- epsonService.mSearchCount = i;
- return i;
- }
- public void javaDebugCB() {
- System.out.println(this.debugString);
- this.debugString = "";
- }
- public void epsNotifyPage(int i) {
- EPLog.m304d(" Д percent = " + i);
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i2 = 0; i2 < beginBroadcast; i2++) {
- try {
- mCallbacks.getBroadcastItem(i2).onNotifyProgress(1, i);
- } catch (RemoteException e) {
- EPLog.m307e("Epson", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public void epsNotifyDataChange(String str) {
- String str2;
- EpLog.d(" ***************** epsNotifyDataChange() call: " + str);
- String str3 = "";
- String str4 = "";
- String[] split = str.split("\\|\\|");
- synchronized (mLockSearchingStatus) {
- if (!bNotifyPrinter) {
- bNotifyPrinter = true;
- }
- }
- synchronized (mLock) {
- String str5 = "";
- if (split.length >= 5) {
- str = split[0];
- str3 = split[1];
- str4 = split[2];
- if (split[3] != null) {
- str5 = split[3];
- }
- str2 = split[4] != null ? split[4] : "";
- } else if (split.length == 4) {
- str = split[0];
- str3 = split[1];
- str4 = split[2];
- if (split[3] != null) {
- str5 = split[3];
- str2 = "";
- } else {
- str2 = "";
- }
- } else if (split.length == 3) {
- str = split[0];
- str3 = split[1];
- str4 = split[2];
- str2 = "";
- } else {
- str2 = "";
- }
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i = 0; i < beginBroadcast; i++) {
- try {
- mCallbacks.getBroadcastItem(i).onFindPrinterResult(str, str3, str4, str5, str2);
- } catch (RemoteException e) {
- EPLog.m307e("Epson", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- /* access modifiers changed from: private */
- public void updateLoginInfo() {
- clearRemotePrinterInfo();
- this.clientId = SharedPreferencesProvider.getInstace(this).getString(epson.common.Constants.PRINTER_CLIENT_ID, (String) null);
- EpLog.d("▲clientId = " + this.clientId);
- MyPrinter curPrinter = MyPrinter.getCurPrinter(this);
- this.mailAddress = curPrinter.getEmailAddress();
- this.accessKey = curPrinter.getRemotePrinterAccessKey(this);
- }
- private void clearRemotePrinterInfo() {
- StorageSecureStore.invalidateCache();
- new EPPrinterManager(getApplicationContext()).rollbackRemotePrinterInfo();
- }
- /* access modifiers changed from: private */
- public synchronized void createSearchingThread() {
- EPLog.m307e("Epson", "createSearchingThread() call");
- this.searchingPrinter = new SearchingThread();
- }
- class SearchingThread extends Thread {
- private volatile boolean mExecuting_search_printer = false;
- SearchingThread() {
- }
- /* JADX WARNING: Code restructure failed: missing block: B:51:?, code lost:
- sleep(1000);
- epson.print.Util.EPLog.m307e("EpsonService", "sleep some second to waiting printing thread");
- */
- /* JADX WARNING: Code restructure failed: missing block: B:52:0x00fd, code lost:
- r2 = move-exception;
- */
- /* JADX WARNING: Code restructure failed: missing block: B:53:0x00fe, code lost:
- r2.printStackTrace();
- r2 = true;
- */
- /* Code decompiled incorrectly, please refer to instructions dump. */
- public void run() {
- /*
- r7 = this;
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this
- r1 = 0
- boolean unused = r0.bEnd = r1
- r0 = 1
- r2 = 0
- L_0x0008:
- boolean r3 = interrupted()
- if (r3 == 0) goto L_0x0017
- java.lang.String r2 = "EpsonService"
- java.lang.String r3 = "user cancel searching printer"
- epson.print.Util.EPLog.m307e((java.lang.String) r2, (java.lang.String) r3)
- r2 = 1
- goto L_0x0025
- L_0x0017:
- java.lang.Object r3 = epson.print.service.EpsonService.mLockPrintingStatus
- monitor-enter(r3)
- epson.print.service.EpsonService r4 = epson.print.service.EpsonService.this // Catch:{ all -> 0x0104 }
- boolean r4 = r4.bPrinting // Catch:{ all -> 0x0104 }
- if (r4 != 0) goto L_0x00ee
- monitor-exit(r3) // Catch:{ all -> 0x0104 }
- L_0x0025:
- if (r2 == 0) goto L_0x0034
- java.lang.String r0 = "EpsonService"
- java.lang.String r1 = "bCancel = true"
- epson.print.Util.EPLog.m307e((java.lang.String) r0, (java.lang.String) r1)
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this
- epson.print.service.EpsonService.access$506(r0)
- return
- L_0x0034:
- java.lang.Object r2 = epson.print.service.EpsonService.mLockSearchingStatus
- monitor-enter(r2)
- epson.print.service.EpsonService r3 = epson.print.service.EpsonService.this // Catch:{ all -> 0x00eb }
- boolean unused = r3.bSearching = r0 // Catch:{ all -> 0x00eb }
- r7.mExecuting_search_printer = r0 // Catch:{ all -> 0x00eb }
- monitor-exit(r2) // Catch:{ all -> 0x00eb }
- java.lang.String r2 = "EpsonService"
- java.lang.String r3 = "begin search printer"
- epson.print.Util.EPLog.m307e((java.lang.String) r2, (java.lang.String) r3)
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- int r2 = r2.timeout_sec
- r3 = -1
- r4 = 60
- if (r2 <= r3) goto L_0x005a
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- int r4 = r2.timeout_sec
- goto L_0x0070
- L_0x005a:
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- int r2 = r2.probeMethod
- r3 = 2
- if (r2 == r3) goto L_0x006a
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- java.lang.String r2 = r2.f406id
- goto L_0x0070
- L_0x006a:
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- java.lang.String r2 = r2.f407ip
- L_0x0070:
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- com.epson.mobilephone.common.wifidirect.WiFiDirectManager.setPriorityToSimpleAP(r2, r0)
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- com.epson.mobilephone.common.escpr.EscprLib r2 = r2.mEscprLib
- epson.print.service.EpsonService r3 = epson.print.service.EpsonService.this
- android.os.Handler r3 = r3.mHandler
- r2.setHanlder(r3)
- java.lang.StringBuilder r2 = new java.lang.StringBuilder
- r2.<init>()
- java.lang.String r3 = "SearchingThread : search_printer2 ☆☆ timeout = "
- r2.append(r3)
- r2.append(r4)
- java.lang.String r2 = r2.toString()
- com.epson.mobilephone.common.EpLog.d(r2)
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- com.epson.mobilephone.common.escpr.EscprLib r2 = r2.mEscprLib
- epson.print.service.EpsonService r3 = epson.print.service.EpsonService.this
- java.lang.String r3 = r3.f406id
- epson.print.service.EpsonService r5 = epson.print.service.EpsonService.this
- java.lang.String r5 = r5.f407ip
- epson.print.service.EpsonService r6 = epson.print.service.EpsonService.this
- int r6 = r6.probeMethod
- int r2 = r2.search_printer2(r3, r5, r6, r4)
- if (r2 != 0) goto L_0x00cc
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- java.lang.String r2 = r2.f406id
- if (r2 == 0) goto L_0x00cc
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- java.lang.String r2 = r2.f406id
- int r2 = r2.length()
- if (r2 <= 0) goto L_0x00cc
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this
- r2.bSetPrinter = r0
- L_0x00cc:
- java.lang.Object r0 = epson.print.service.EpsonService.mLockSearchingStatus
- monitor-enter(r0)
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this // Catch:{ all -> 0x00e8 }
- boolean unused = r2.bSearching = r1 // Catch:{ all -> 0x00e8 }
- epson.print.service.EpsonService.bNotifyPrinter = r1 // Catch:{ all -> 0x00e8 }
- r7.mExecuting_search_printer = r1 // Catch:{ all -> 0x00e8 }
- monitor-exit(r0) // Catch:{ all -> 0x00e8 }
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this
- epson.print.service.EpsonService.access$506(r0)
- java.lang.String r0 = "Epson"
- java.lang.String r1 = "search printer finish"
- epson.print.Util.EPLog.m307e((java.lang.String) r0, (java.lang.String) r1)
- return
- L_0x00e8:
- r1 = move-exception
- monitor-exit(r0) // Catch:{ all -> 0x00e8 }
- throw r1
- L_0x00eb:
- r0 = move-exception
- monitor-exit(r2) // Catch:{ all -> 0x00eb }
- throw r0
- L_0x00ee:
- monitor-exit(r3) // Catch:{ all -> 0x0104 }
- r3 = 1000(0x3e8, double:4.94E-321)
- sleep(r3) // Catch:{ InterruptedException -> 0x00fd }
- java.lang.String r3 = "EpsonService"
- java.lang.String r4 = "sleep some second to waiting printing thread"
- epson.print.Util.EPLog.m307e((java.lang.String) r3, (java.lang.String) r4) // Catch:{ InterruptedException -> 0x00fd }
- goto L_0x0008
- L_0x00fd:
- r2 = move-exception
- r2.printStackTrace()
- r2 = 1
- goto L_0x0008
- L_0x0104:
- r0 = move-exception
- monitor-exit(r3) // Catch:{ all -> 0x0104 }
- throw r0
- */
- throw new UnsupportedOperationException("Method not decompiled: epson.print.service.EpsonService.SearchingThread.run():void");
- }
- public void interrupt() {
- if (this.mExecuting_search_printer && EpsonService.this.mEscprLib.cancel_search_printer() == -1305) {
- this.mExecuting_search_printer = false;
- boolean unused = EpsonService.this.bEnd = true;
- }
- super.interrupt();
- synchronized (EpsonService.mLockSearchingStatus) {
- boolean unused2 = EpsonService.this.bSearching = false;
- }
- }
- }
- public boolean updateApfProgress(int i) {
- if (bCancelPrinting) {
- return false;
- }
- notifyProgress(2, i);
- return true;
- }
- private void stopSearchingThread() throws RemoteException {
- if (this.searchingPrinter != null) {
- this.mBinder.cancelSearchPrinter();
- }
- }
- /* access modifiers changed from: private */
- public void startLocalNonPdfPrintThread(PrintSetting.Kind kind, EPImageList ePImageList, boolean z) {
- this.mLocalPrintThread = new LocalPrintThread(this, new LegacyRenderingController(this, ePImageList, kind), z);
- this.mLocalPrintThread.start();
- }
- /* access modifiers changed from: private */
- public void startPdfPrintThread(String str, String str2, String str3, boolean z, int i, int i2, boolean z2) {
- this.mLocalPrintThread = new LocalPrintThread(this, new PdfRenderingController(this, str, str2, str3, z, new int[]{i, i2}), z2);
- this.mLocalPrintThread.start();
- }
- /* access modifiers changed from: private */
- public synchronized int createECPrintingThread(final PrintSetting.Kind kind, final EPImageList ePImageList) {
- this.printingThread = new Thread() {
- /* JADX ERROR: IndexOutOfBoundsException in pass: RegionMakerVisitor
- java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
- at java.util.ArrayList.rangeCheck(ArrayList.java:657)
- at java.util.ArrayList.get(ArrayList.java:433)
- at jadx.core.dex.nodes.InsnNode.getArg(InsnNode.java:101)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:611)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.processMonitorEnter(RegionMaker.java:561)
- at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:133)
- at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:86)
- at jadx.core.dex.visitors.regions.RegionMaker.processExcHandler(RegionMaker.java:1043)
- at jadx.core.dex.visitors.regions.RegionMaker.processTryCatchBlocks(RegionMaker.java:975)
- at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:52)
- */
- public void run() {
- /*
- r29 = this;
- r7 = r29
- java.lang.Object r8 = epson.print.service.EpsonService.mPrinting
- monitor-enter(r8)
- java.lang.String r0 = "EpsonService"
- java.lang.String r1 = "createECPrintingThread() called."
- com.epson.mobilephone.common.EpLog.d(r0, r1) // Catch:{ all -> 0x040b }
- epson.print.screen.PrintSetting r0 = new epson.print.screen.PrintSetting // Catch:{ all -> 0x040b }
- epson.print.service.EpsonService r1 = epson.print.service.EpsonService.this // Catch:{ all -> 0x040b }
- epson.print.screen.PrintSetting$Kind r2 = r2 // Catch:{ all -> 0x040b }
- r0.<init>(r1, r2) // Catch:{ all -> 0x040b }
- r0.loadSettings() // Catch:{ all -> 0x040b }
- int r6 = r0.paperSizeValue // Catch:{ all -> 0x040b }
- int r13 = r0.paperTypeValue // Catch:{ all -> 0x040b }
- int r5 = r0.layoutValue // Catch:{ all -> 0x040b }
- int r4 = r0.qualityValue // Catch:{ all -> 0x040b }
- int r1 = r0.paperSourceValue // Catch:{ all -> 0x040b }
- int r3 = r0.colorValue // Catch:{ all -> 0x040b }
- int r2 = r0.copiesValue // Catch:{ all -> 0x040b }
- int r15 = r0.brightnessValue // Catch:{ all -> 0x040b }
- int r14 = r0.contrastValue // Catch:{ all -> 0x040b }
- int r12 = r0.saturationValue // Catch:{ all -> 0x040b }
- int r11 = r0.duplexValue // Catch:{ all -> 0x040b }
- int r10 = r0.feedDirectionValue // Catch:{ all -> 0x040b }
- r25 = 0
- epson.print.service.EpsonService r9 = epson.print.service.EpsonService.this // Catch:{ all -> 0x040b }
- r26 = r3
- r3 = 1
- boolean unused = r9.bPrinting = r3 // Catch:{ all -> 0x040b }
- r9 = 0
- boolean unused = epson.print.service.EpsonService.bCancelPrinting = r9 // Catch:{ all -> 0x040b }
- epson.print.service.EpsonService r3 = epson.print.service.EpsonService.this // Catch:{ all -> 0x040b }
- epson.provider.SharedPreferencesProvider$SharedPreferencesMulti r3 = epson.provider.SharedPreferencesProvider.getInstace(r3) // Catch:{ all -> 0x040b }
- java.lang.String r9 = "SOURCE_TYPE"
- r17 = r10
- r10 = 2
- int r3 = r3.getInt(r9, r10) // Catch:{ all -> 0x040b }
- epson.print.service.EpsonService r9 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- r10 = 0
- com.epson.mobilephone.common.wifidirect.WiFiDirectManager.setPriorityToSimpleAP(r9, r10) // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- epson.print.EPImageList r9 = r3 // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- epson.print.EPImage r9 = r9.get(r10) // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- r10 = 3
- r20 = r1
- r1 = 2
- if (r3 == r1) goto L_0x010b
- if (r3 != r10) goto L_0x0065
- goto L_0x010b
- L_0x0065:
- r1 = 1
- if (r3 != r1) goto L_0x0103
- epson.print.EPImageList r4 = r3 // Catch:{ Exception -> 0x0100, all -> 0x00fd }
- r5 = 0
- r4.get(r5) // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- epson.print.service.EpsonService r4 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- r4.epsNotifyPage(r5) // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- boolean r4 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- if (r4 == r1) goto L_0x00f7
- epson.print.service.EpsonService r1 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- epson.print.ecclient.EpsJobAttrib r1 = r1.epsJobattrib // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- r1.mCopies = r2 // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- epson.print.service.EpsonService r1 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- epson.print.service.IEpsonService$Stub r1 = r1.mBinder // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- int r9 = r1.EpsonConnectChangePrintSetting() // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- if (r9 != 0) goto L_0x00f1
- epson.print.service.EpsonService r1 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- r2 = 50
- r1.epsNotifyPage(r2) // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- boolean r1 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- r2 = 1
- if (r1 == r2) goto L_0x00e2
- int r1 = r0.startValue // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- int r2 = r0.endValue // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- epson.print.service.EpsonService r4 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- java.lang.String r6 = "PREFS_EPSON_CONNECT"
- epson.provider.SharedPreferencesProvider$SharedPreferencesMulti r4 = epson.provider.SharedPreferencesProvider.getInstace(r4, r6) // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- java.lang.String r6 = "ENABLE_SHOW_PREVIEW"
- r10 = 1
- boolean r4 = r4.getBoolean(r6, r10) // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- boolean r0 = r0.printAll // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- if (r4 == 0) goto L_0x00b4
- if (r0 != r10) goto L_0x00b6
- L_0x00b4:
- r1 = 0
- r2 = 0
- L_0x00b6:
- boolean r0 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- if (r0 == r10) goto L_0x00dc
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- epson.print.service.IEpsonService$Stub r0 = r0.mBinder // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- int r9 = r0.EpsonConnectStartPrint(r1, r2) // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- if (r9 != 0) goto L_0x00d6
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- r1 = 100
- r0.epsNotifyPage(r1) // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- r28 = r3
- r1 = r9
- r9 = 1
- r15 = 1
- goto L_0x02be
- L_0x00d6:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- r0.<init>() // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- throw r0 // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- L_0x00dc:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- r0.<init>() // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- throw r0 // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- L_0x00e2:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- r0.<init>() // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- throw r0 // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- L_0x00e8:
- r0 = move-exception
- r1 = r0
- r2 = r3
- r3 = 1
- goto L_0x011b
- L_0x00ed:
- r0 = move-exception
- r2 = r3
- r3 = 1
- goto L_0x0122
- L_0x00f1:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- r0.<init>() // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- throw r0 // Catch:{ Exception -> 0x00ed, all -> 0x00e8 }
- L_0x00f7:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- r0.<init>() // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- throw r0 // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- L_0x00fd:
- r0 = move-exception
- r5 = 0
- goto L_0x0117
- L_0x0100:
- r0 = move-exception
- r5 = 0
- goto L_0x011f
- L_0x0103:
- r5 = 0
- r28 = r3
- r1 = 0
- r9 = 1
- r15 = 1
- goto L_0x02be
- L_0x010b:
- r1 = 100
- r16 = 0
- java.lang.String r0 = r9.loadImageFileName // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- if (r3 != r10) goto L_0x0125
- java.lang.String r0 = r9.webUrl // Catch:{ Exception -> 0x011e, all -> 0x0116 }
- goto L_0x0125
- L_0x0116:
- r0 = move-exception
- L_0x0117:
- r1 = r0
- r2 = r3
- r3 = 1
- r9 = 0
- L_0x011b:
- r15 = 1
- goto L_0x03da
- L_0x011e:
- r0 = move-exception
- L_0x011f:
- r2 = r3
- r3 = 1
- r9 = 0
- L_0x0122:
- r15 = 1
- goto L_0x0373
- L_0x0125:
- epson.print.service.EpsonService r9 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- epson.print.service.IEpsonService$Stub r9 = r9.mBinder // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- r23 = 0
- r24 = 0
- r10 = 0
- r27 = r2
- r21 = r17
- r2 = 0
- r10 = r3
- r22 = r11
- r11 = r0
- r0 = r12
- r12 = r6
- r19 = r14
- r14 = r5
- r18 = r15
- r15 = r4
- r16 = r20
- r17 = r26
- r20 = r0
- int r19 = r9.EpsonConnectCreateJob(r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24) // Catch:{ Exception -> 0x036e, all -> 0x0366 }
- if (r19 != 0) goto L_0x035a
- boolean r0 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x0353, all -> 0x034a }
- r9 = 1
- if (r0 == r9) goto L_0x033e
- epson.print.service.EpsonService r9 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0353, all -> 0x034a }
- epson.print.EPImageList r10 = r3 // Catch:{ Exception -> 0x0353, all -> 0x034a }
- r11 = 0
- r14 = 0
- r16 = 0
- r18 = 0
- r12 = r6
- r13 = r26
- r15 = r5
- r17 = r4
- r9.createPrintImage(r10, r11, r12, r13, r14, r15, r16, r17, r18) // Catch:{ Exception -> 0x0353, all -> 0x034a }
- r9 = 0
- L_0x0168:
- epson.print.EPImageList r0 = r3 // Catch:{ Exception -> 0x0337, all -> 0x032e }
- int r0 = r0.size() // Catch:{ Exception -> 0x0337, all -> 0x032e }
- if (r9 >= r0) goto L_0x0292
- epson.print.EPImageList r0 = r3 // Catch:{ Exception -> 0x028d, all -> 0x0287 }
- epson.print.EPImage r0 = r0.get(r9) // Catch:{ Exception -> 0x028d, all -> 0x0287 }
- epson.print.service.EpsonService r10 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0281, all -> 0x027a }
- r10.epsNotifyPage(r2) // Catch:{ Exception -> 0x0281, all -> 0x027a }
- boolean r10 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x0281, all -> 0x027a }
- r11 = 1
- if (r10 == r11) goto L_0x0264
- epson.print.service.EpsonService r10 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0281, all -> 0x027a }
- int r12 = r9 + 1
- int unused = r10.mCreatetSheetIndex = r12 // Catch:{ Exception -> 0x0281, all -> 0x027a }
- epson.print.service.EpsonService$3$1 r10 = new epson.print.service.EpsonService$3$1 // Catch:{ Exception -> 0x0281, all -> 0x027a }
- r13 = 100
- r1 = r10
- r14 = r27
- r15 = 0
- r2 = r29
- r28 = r3
- r11 = r26
- r15 = 1
- r3 = r6
- r17 = r4
- r4 = r11
- r18 = r5
- r19 = r6
- r6 = r17
- r1.<init>(r3, r4, r5, r6) // Catch:{ Exception -> 0x0274, all -> 0x026d }
- epson.print.EPImageList r1 = r3 // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- int r1 = r1.size() // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- if (r12 >= r1) goto L_0x01b0
- r10.start() // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- L_0x01b0:
- epson.print.service.EpsonService r1 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- r2 = 25
- r1.epsNotifyPage(r2) // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- epson.print.EPImageCreator r1 = new epson.print.EPImageCreator // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- android.content.Context r2 = r2.getApplicationContext() // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- r1.<init>(r2) // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- int r1 = r1.createJpegImage(r0, r13) // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- if (r1 != 0) goto L_0x023c
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0234, all -> 0x022c }
- r3 = 50
- r2.epsNotifyPage(r3) // Catch:{ Exception -> 0x0234, all -> 0x022c }
- boolean r2 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x0234, all -> 0x022c }
- if (r2 == r15) goto L_0x0226
- epson.print.service.EpsonService r2 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0234, all -> 0x022c }
- epson.print.service.IEpsonService$Stub r2 = r2.mBinder // Catch:{ Exception -> 0x0234, all -> 0x022c }
- java.lang.String r0 = r0.decodeImageFileName // Catch:{ Exception -> 0x0234, all -> 0x022c }
- int r1 = r2.EpsonConnectUploadFile(r0, r12) // Catch:{ Exception -> 0x0234, all -> 0x022c }
- if (r1 != 0) goto L_0x0220
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0234, all -> 0x022c }
- r2 = 75
- r0.epsNotifyPage(r2) // Catch:{ Exception -> 0x0234, all -> 0x022c }
- boolean r0 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x0234, all -> 0x022c }
- if (r0 == r15) goto L_0x021a
- r10.join() // Catch:{ Exception -> 0x0234, all -> 0x022c }
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0234, all -> 0x022c }
- r0.epsNotifyPage(r13) // Catch:{ Exception -> 0x0234, all -> 0x022c }
- boolean r0 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x0234, all -> 0x022c }
- if (r0 == r15) goto L_0x0214
- r25 = r10
- r26 = r11
- r9 = r12
- r27 = r14
- r4 = r17
- r5 = r18
- r6 = r19
- r3 = r28
- r2 = 0
- r19 = r1
- r1 = 100
- goto L_0x0168
- L_0x0214:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- r0.<init>() // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- throw r0 // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- L_0x021a:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- r0.<init>() // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- throw r0 // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- L_0x0220:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0234, all -> 0x022c }
- r0.<init>() // Catch:{ Exception -> 0x0234, all -> 0x022c }
- throw r0 // Catch:{ Exception -> 0x0234, all -> 0x022c }
- L_0x0226:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- r0.<init>() // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- throw r0 // Catch:{ Exception -> 0x025f, all -> 0x0259 }
- L_0x022c:
- r0 = move-exception
- r3 = r9
- r25 = r10
- r2 = r28
- goto L_0x0310
- L_0x0234:
- r0 = move-exception
- r3 = r9
- r25 = r10
- r2 = r28
- goto L_0x0317
- L_0x023c:
- r1 = -1200(0xfffffffffffffb50, float:NaN)
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x024f, all -> 0x0244 }
- r0.<init>() // Catch:{ Exception -> 0x024f, all -> 0x0244 }
- throw r0 // Catch:{ Exception -> 0x024f, all -> 0x0244 }
- L_0x0244:
- r0 = move-exception
- r1 = r0
- r3 = r9
- r25 = r10
- r2 = r28
- r9 = -1200(0xfffffffffffffb50, float:NaN)
- goto L_0x03da
- L_0x024f:
- r0 = move-exception
- r3 = r9
- r25 = r10
- r2 = r28
- r9 = -1200(0xfffffffffffffb50, float:NaN)
- goto L_0x0373
- L_0x0259:
- r0 = move-exception
- r1 = r0
- r3 = r9
- r25 = r10
- goto L_0x0270
- L_0x025f:
- r0 = move-exception
- r3 = r9
- r25 = r10
- goto L_0x0276
- L_0x0264:
- r28 = r3
- r15 = 1
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0274, all -> 0x026d }
- r0.<init>() // Catch:{ Exception -> 0x0274, all -> 0x026d }
- throw r0 // Catch:{ Exception -> 0x0274, all -> 0x026d }
- L_0x026d:
- r0 = move-exception
- r1 = r0
- r3 = r9
- L_0x0270:
- r2 = r28
- goto L_0x036b
- L_0x0274:
- r0 = move-exception
- r3 = r9
- L_0x0276:
- r2 = r28
- goto L_0x0372
- L_0x027a:
- r0 = move-exception
- r15 = 1
- r1 = r0
- r2 = r3
- L_0x027e:
- r3 = r9
- goto L_0x036b
- L_0x0281:
- r0 = move-exception
- r15 = 1
- r2 = r3
- L_0x0284:
- r3 = r9
- goto L_0x0372
- L_0x0287:
- r0 = move-exception
- r15 = 1
- r1 = r0
- r2 = r3
- goto L_0x0332
- L_0x028d:
- r0 = move-exception
- r15 = 1
- r2 = r3
- goto L_0x033a
- L_0x0292:
- r28 = r3
- r14 = r27
- r15 = 1
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x032a, all -> 0x0326 }
- epson.print.ecclient.EpsJobAttrib r0 = r0.epsJobattrib // Catch:{ Exception -> 0x032a, all -> 0x0326 }
- r0.mCopies = r14 // Catch:{ Exception -> 0x032a, all -> 0x0326 }
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x032a, all -> 0x0326 }
- epson.print.service.IEpsonService$Stub r0 = r0.mBinder // Catch:{ Exception -> 0x032a, all -> 0x0326 }
- int r1 = r0.EpsonConnectChangePrintSetting() // Catch:{ Exception -> 0x032a, all -> 0x0326 }
- if (r1 != 0) goto L_0x031a
- boolean r0 = epson.print.service.EpsonService.bCancelPrinting // Catch:{ Exception -> 0x0313, all -> 0x030c }
- if (r0 == r15) goto L_0x02fd
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x0313, all -> 0x030c }
- epson.print.service.IEpsonService$Stub r0 = r0.mBinder // Catch:{ Exception -> 0x0313, all -> 0x030c }
- r2 = 0
- int r1 = r0.EpsonConnectStartPrint(r2, r2) // Catch:{ Exception -> 0x0313, all -> 0x030c }
- if (r1 != 0) goto L_0x02f5
- L_0x02be:
- if (r25 == 0) goto L_0x02c6
- r25.join() // Catch:{ Exception -> 0x02d4 }
- r2 = r28
- goto L_0x02c8
- L_0x02c6:
- r2 = r28
- L_0x02c8:
- if (r2 == r15) goto L_0x02d6
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x02d4 }
- epson.print.service.IEpsonService$Stub r0 = r0.mBinder // Catch:{ Exception -> 0x02d4 }
- r0.EpsonConnectEndJob() // Catch:{ Exception -> 0x02d4 }
- goto L_0x02d6
- L_0x02d4:
- r0 = move-exception
- goto L_0x02e7
- L_0x02d6:
- if (r2 != r15) goto L_0x02de
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x02d4 }
- com.epson.iprint.prtlogger.Analytics.savePrintInfo(r0, r15) // Catch:{ Exception -> 0x02d4 }
- goto L_0x02e3
- L_0x02de:
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x02d4 }
- com.epson.iprint.prtlogger.Analytics.savePrintInfo(r0, r9) // Catch:{ Exception -> 0x02d4 }
- L_0x02e3:
- epson.print.service.EpsonService.onNotifyEndJob(r1) // Catch:{ Exception -> 0x02d4 }
- goto L_0x02ea
- L_0x02e7:
- r0.printStackTrace() // Catch:{ all -> 0x040b }
- L_0x02ea:
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ all -> 0x040b }
- r1 = 0
- boolean unused = r0.bPrinting = r1 // Catch:{ all -> 0x040b }
- L_0x02f0:
- boolean unused = epson.print.service.EpsonService.bCancelPrinting = r1 // Catch:{ all -> 0x040b }
- goto L_0x03d3
- L_0x02f5:
- r2 = r28
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0324, all -> 0x0322 }
- r0.<init>() // Catch:{ Exception -> 0x0324, all -> 0x0322 }
- throw r0 // Catch:{ Exception -> 0x0324, all -> 0x0322 }
- L_0x02fd:
- r2 = r28
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0309, all -> 0x0305 }
- r0.<init>() // Catch:{ Exception -> 0x0309, all -> 0x0305 }
- throw r0 // Catch:{ Exception -> 0x0309, all -> 0x0305 }
- L_0x0305:
- r0 = move-exception
- r1 = r0
- goto L_0x027e
- L_0x0309:
- r0 = move-exception
- goto L_0x0284
- L_0x030c:
- r0 = move-exception
- r2 = r28
- L_0x030f:
- r3 = r9
- L_0x0310:
- r9 = r1
- goto L_0x03d9
- L_0x0313:
- r0 = move-exception
- r2 = r28
- L_0x0316:
- r3 = r9
- L_0x0317:
- r9 = r1
- goto L_0x0373
- L_0x031a:
- r2 = r28
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0324, all -> 0x0322 }
- r0.<init>() // Catch:{ Exception -> 0x0324, all -> 0x0322 }
- throw r0 // Catch:{ Exception -> 0x0324, all -> 0x0322 }
- L_0x0322:
- r0 = move-exception
- goto L_0x030f
- L_0x0324:
- r0 = move-exception
- goto L_0x0316
- L_0x0326:
- r0 = move-exception
- r2 = r28
- goto L_0x0331
- L_0x032a:
- r0 = move-exception
- r2 = r28
- goto L_0x033a
- L_0x032e:
- r0 = move-exception
- r2 = r3
- r15 = 1
- L_0x0331:
- r1 = r0
- L_0x0332:
- r3 = r9
- r9 = r19
- goto L_0x03da
- L_0x0337:
- r0 = move-exception
- r2 = r3
- r15 = 1
- L_0x033a:
- r3 = r9
- r9 = r19
- goto L_0x0373
- L_0x033e:
- r2 = r3
- r15 = 1
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0348, all -> 0x0346 }
- r0.<init>() // Catch:{ Exception -> 0x0348, all -> 0x0346 }
- throw r0 // Catch:{ Exception -> 0x0348, all -> 0x0346 }
- L_0x0346:
- r0 = move-exception
- goto L_0x0369
- L_0x0348:
- r0 = move-exception
- goto L_0x0371
- L_0x034a:
- r0 = move-exception
- r2 = r3
- r15 = 1
- L_0x034d:
- r1 = r0
- r9 = r19
- r3 = 1
- goto L_0x03da
- L_0x0353:
- r0 = move-exception
- r2 = r3
- r15 = 1
- L_0x0356:
- r9 = r19
- r3 = 1
- goto L_0x0373
- L_0x035a:
- r2 = r3
- r15 = 1
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x0364, all -> 0x0362 }
- r0.<init>() // Catch:{ Exception -> 0x0364, all -> 0x0362 }
- throw r0 // Catch:{ Exception -> 0x0364, all -> 0x0362 }
- L_0x0362:
- r0 = move-exception
- goto L_0x034d
- L_0x0364:
- r0 = move-exception
- goto L_0x0356
- L_0x0366:
- r0 = move-exception
- r2 = r3
- r15 = 1
- L_0x0369:
- r1 = r0
- r3 = 1
- L_0x036b:
- r9 = 0
- goto L_0x03da
- L_0x036e:
- r0 = move-exception
- r2 = r3
- r15 = 1
- L_0x0371:
- r3 = 1
- L_0x0372:
- r9 = 0
- L_0x0373:
- r0.printStackTrace() // Catch:{ all -> 0x03d8 }
- java.lang.Object r1 = epson.print.service.EpsonService.mLock // Catch:{ all -> 0x03d8 }
- monitor-enter(r1) // Catch:{ all -> 0x03d8 }
- android.os.RemoteCallbackList<epson.print.service.IEpsonServiceCallback> r0 = epson.print.service.EpsonService.mCallbacks // Catch:{ all -> 0x03d5 }
- int r4 = r0.beginBroadcast() // Catch:{ all -> 0x03d5 }
- r5 = 0
- L_0x0382:
- if (r5 >= r4) goto L_0x039e
- android.os.RemoteCallbackList<epson.print.service.IEpsonServiceCallback> r0 = epson.print.service.EpsonService.mCallbacks // Catch:{ RemoteException -> 0x0391 }
- android.os.IInterface r0 = r0.getBroadcastItem(r5) // Catch:{ RemoteException -> 0x0391 }
- epson.print.service.IEpsonServiceCallback r0 = (epson.print.service.IEpsonServiceCallback) r0 // Catch:{ RemoteException -> 0x0391 }
- r6 = 0
- r0.onNotifyError(r6, r9, r6) // Catch:{ RemoteException -> 0x0391 }
- goto L_0x039b
- L_0x0391:
- r0 = move-exception
- java.lang.String r6 = "EpsonService"
- java.lang.String r0 = r0.toString() // Catch:{ all -> 0x03d5 }
- epson.print.Util.EPLog.m307e((java.lang.String) r6, (java.lang.String) r0) // Catch:{ all -> 0x03d5 }
- L_0x039b:
- int r5 = r5 + 1
- goto L_0x0382
- L_0x039e:
- android.os.RemoteCallbackList<epson.print.service.IEpsonServiceCallback> r0 = epson.print.service.EpsonService.mCallbacks // Catch:{ all -> 0x03d5 }
- r0.finishBroadcast() // Catch:{ all -> 0x03d5 }
- monitor-exit(r1) // Catch:{ all -> 0x03d5 }
- if (r25 == 0) goto L_0x03a9
- r25.join() // Catch:{ Exception -> 0x03b5 }
- L_0x03a9:
- if (r2 == r15) goto L_0x03b7
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x03b5 }
- epson.print.service.IEpsonService$Stub r0 = r0.mBinder // Catch:{ Exception -> 0x03b5 }
- r0.EpsonConnectEndJob() // Catch:{ Exception -> 0x03b5 }
- goto L_0x03b7
- L_0x03b5:
- r0 = move-exception
- goto L_0x03c8
- L_0x03b7:
- if (r2 != r15) goto L_0x03bf
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x03b5 }
- com.epson.iprint.prtlogger.Analytics.savePrintInfo(r0, r15) // Catch:{ Exception -> 0x03b5 }
- goto L_0x03c4
- L_0x03bf:
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x03b5 }
- com.epson.iprint.prtlogger.Analytics.savePrintInfo(r0, r3) // Catch:{ Exception -> 0x03b5 }
- L_0x03c4:
- epson.print.service.EpsonService.onNotifyEndJob(r9) // Catch:{ Exception -> 0x03b5 }
- goto L_0x03cb
- L_0x03c8:
- r0.printStackTrace() // Catch:{ all -> 0x040b }
- L_0x03cb:
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ all -> 0x040b }
- r1 = 0
- boolean unused = r0.bPrinting = r1 // Catch:{ all -> 0x040b }
- goto L_0x02f0
- L_0x03d3:
- monitor-exit(r8) // Catch:{ all -> 0x040b }
- return
- L_0x03d5:
- r0 = move-exception
- monitor-exit(r1) // Catch:{ all -> 0x03d5 }
- throw r0 // Catch:{ all -> 0x03d8 }
- L_0x03d8:
- r0 = move-exception
- L_0x03d9:
- r1 = r0
- L_0x03da:
- if (r25 == 0) goto L_0x03df
- r25.join() // Catch:{ Exception -> 0x03eb }
- L_0x03df:
- if (r2 == r15) goto L_0x03ed
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x03eb }
- epson.print.service.IEpsonService$Stub r0 = r0.mBinder // Catch:{ Exception -> 0x03eb }
- r0.EpsonConnectEndJob() // Catch:{ Exception -> 0x03eb }
- goto L_0x03ed
- L_0x03eb:
- r0 = move-exception
- goto L_0x03fe
- L_0x03ed:
- if (r2 != r15) goto L_0x03f5
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x03eb }
- com.epson.iprint.prtlogger.Analytics.savePrintInfo(r0, r15) // Catch:{ Exception -> 0x03eb }
- goto L_0x03fa
- L_0x03f5:
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ Exception -> 0x03eb }
- com.epson.iprint.prtlogger.Analytics.savePrintInfo(r0, r3) // Catch:{ Exception -> 0x03eb }
- L_0x03fa:
- epson.print.service.EpsonService.onNotifyEndJob(r9) // Catch:{ Exception -> 0x03eb }
- goto L_0x0401
- L_0x03fe:
- r0.printStackTrace() // Catch:{ all -> 0x040b }
- L_0x0401:
- epson.print.service.EpsonService r0 = epson.print.service.EpsonService.this // Catch:{ all -> 0x040b }
- r2 = 0
- boolean unused = r0.bPrinting = r2 // Catch:{ all -> 0x040b }
- boolean unused = epson.print.service.EpsonService.bCancelPrinting = r2 // Catch:{ all -> 0x040b }
- throw r1 // Catch:{ all -> 0x040b }
- L_0x040b:
- r0 = move-exception
- monitor-exit(r8) // Catch:{ all -> 0x040b }
- throw r0
- */
- throw new UnsupportedOperationException("Method not decompiled: epson.print.service.EpsonService.C23713.run():void");
- }
- };
- return 0;
- }
- /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r14v1, resolved type: epson.print.EPImageCreator} */
- /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r14v2, resolved type: java.lang.String} */
- /* JADX WARNING: type inference failed for: r14v0 */
- /* JADX WARNING: type inference failed for: r14v4 */
- /* JADX WARNING: type inference failed for: r14v5 */
- /* JADX WARNING: type inference failed for: r14v7 */
- /* JADX WARNING: type inference failed for: r14v8 */
- /* JADX ERROR: IndexOutOfBoundsException in pass: RegionMakerVisitor
- java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
- at java.util.ArrayList.rangeCheck(ArrayList.java:657)
- at java.util.ArrayList.get(ArrayList.java:433)
- at jadx.core.dex.nodes.InsnNode.getArg(InsnNode.java:101)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:611)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.traverseMonitorExits(RegionMaker.java:619)
- at jadx.core.dex.visitors.regions.RegionMaker.processMonitorEnter(RegionMaker.java:561)
- at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:133)
- at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:86)
- at jadx.core.dex.visitors.regions.RegionMaker.processExcHandler(RegionMaker.java:1043)
- at jadx.core.dex.visitors.regions.RegionMaker.processTryCatchBlocks(RegionMaker.java:975)
- at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:52)
- */
- /* JADX WARNING: Can't fix incorrect switch cases order */
- /* JADX WARNING: Multi-variable type inference failed */
- public java.lang.String createPrintImage(epson.print.EPImageList r18, int r19, int r20, int r21, int r22, int r23, int r24, int r25, int r26) {
- /*
- r17 = this;
- r1 = r17
- r0 = r20
- r2 = r22
- r9 = r23
- com.epson.mobilephone.common.EpLog.m68d()
- epson.print.EPImage r15 = r18.get(r19)
- epson.print.EPImageCreator r3 = new epson.print.EPImageCreator
- android.content.Context r4 = r17.getApplicationContext()
- r3.<init>(r4)
- java.lang.Object r4 = mCancelLock
- monitor-enter(r4)
- r1.mEPImageCreator = r3 // Catch:{ all -> 0x023d }
- monitor-exit(r4) // Catch:{ all -> 0x023d }
- java.lang.System.gc()
- r14 = 0
- boolean r4 = bCancelPrinting // Catch:{ Exception -> 0x022f }
- r5 = 1
- if (r4 == r5) goto L_0x0229
- com.epson.mobilephone.common.escpr.EscprLib r4 = r1.mEscprLib // Catch:{ Exception -> 0x022f }
- int[] r4 = r4.get_printable_area() // Catch:{ Exception -> 0x022f }
- epson.print.MyPrinter.getCurPrinter(r17) // Catch:{ Exception -> 0x022f }
- boolean r13 = epson.print.MyPrinter.isRemotePrinter(r17) // Catch:{ Exception -> 0x022f }
- java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ Exception -> 0x022f }
- r6.<init>() // Catch:{ Exception -> 0x022f }
- java.lang.String r7 = " ☆☆ isRemotePrinter "
- r6.append(r7) // Catch:{ Exception -> 0x022f }
- r6.append(r13) // Catch:{ Exception -> 0x022f }
- java.lang.String r6 = r6.toString() // Catch:{ Exception -> 0x022f }
- com.epson.mobilephone.common.EpLog.m77i(r6) // Catch:{ Exception -> 0x022f }
- r6 = 2
- r7 = 0
- if (r13 != r5) goto L_0x00e2
- android.content.Context r4 = r17.getApplicationContext() // Catch:{ Exception -> 0x022f }
- epson.common.Info_paper r4 = epson.common.Info_paper.getInfoPaper(r4, r0) // Catch:{ Exception -> 0x022f }
- int[] r8 = new int[r6] // Catch:{ Exception -> 0x022f }
- if (r9 != r6) goto L_0x0065
- int r10 = r4.getPaper_width_boder() // Catch:{ Exception -> 0x022f }
- r8[r7] = r10 // Catch:{ Exception -> 0x022f }
- int r4 = r4.getPaper_height_boder() // Catch:{ Exception -> 0x022f }
- r8[r5] = r4 // Catch:{ Exception -> 0x022f }
- goto L_0x0073
- L_0x0065:
- if (r9 != r5) goto L_0x0073
- int r10 = r4.getPaper_width_boderless() // Catch:{ Exception -> 0x022f }
- r8[r7] = r10 // Catch:{ Exception -> 0x022f }
- int r4 = r4.getPaper_height_boderless() // Catch:{ Exception -> 0x022f }
- r8[r5] = r4 // Catch:{ Exception -> 0x022f }
- L_0x0073:
- int r4 = r15.srcWidth // Catch:{ Exception -> 0x022f }
- r10 = r8[r7] // Catch:{ Exception -> 0x022f }
- if (r4 <= r10) goto L_0x0080
- int r4 = r15.srcHeight // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- if (r4 <= r10) goto L_0x0080
- goto L_0x00e3
- L_0x0080:
- int r4 = r15.srcWidth // Catch:{ Exception -> 0x022f }
- r10 = r8[r7] // Catch:{ Exception -> 0x022f }
- if (r4 <= r10) goto L_0x009a
- r4 = r8[r7] // Catch:{ Exception -> 0x022f }
- float r4 = (float) r4 // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r4 = r4 / r10
- int r10 = r15.srcHeight // Catch:{ Exception -> 0x022f }
- r8[r5] = r10 // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r10 = r10 * r4
- int r4 = (int) r10 // Catch:{ Exception -> 0x022f }
- r8[r7] = r4 // Catch:{ Exception -> 0x022f }
- goto L_0x00e3
- L_0x009a:
- int r4 = r15.srcHeight // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- if (r4 <= r10) goto L_0x00b4
- r4 = r8[r5] // Catch:{ Exception -> 0x022f }
- float r4 = (float) r4 // Catch:{ Exception -> 0x022f }
- r10 = r8[r7] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r4 = r4 / r10
- int r10 = r15.srcWidth // Catch:{ Exception -> 0x022f }
- r8[r7] = r10 // Catch:{ Exception -> 0x022f }
- r10 = r8[r7] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r10 = r10 * r4
- int r4 = (int) r10 // Catch:{ Exception -> 0x022f }
- r8[r5] = r4 // Catch:{ Exception -> 0x022f }
- goto L_0x00e3
- L_0x00b4:
- int r4 = r15.srcWidth // Catch:{ Exception -> 0x022f }
- int r10 = r15.srcHeight // Catch:{ Exception -> 0x022f }
- if (r4 >= r10) goto L_0x00ce
- r4 = r8[r5] // Catch:{ Exception -> 0x022f }
- float r4 = (float) r4 // Catch:{ Exception -> 0x022f }
- r10 = r8[r7] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r4 = r4 / r10
- int r10 = r15.srcWidth // Catch:{ Exception -> 0x022f }
- r8[r7] = r10 // Catch:{ Exception -> 0x022f }
- r10 = r8[r7] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r10 = r10 * r4
- int r4 = (int) r10 // Catch:{ Exception -> 0x022f }
- r8[r5] = r4 // Catch:{ Exception -> 0x022f }
- goto L_0x00e3
- L_0x00ce:
- r4 = r8[r7] // Catch:{ Exception -> 0x022f }
- float r4 = (float) r4 // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r4 = r4 / r10
- int r10 = r15.srcHeight // Catch:{ Exception -> 0x022f }
- r8[r5] = r10 // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- float r10 = (float) r10 // Catch:{ Exception -> 0x022f }
- float r10 = r10 * r4
- int r4 = (int) r10 // Catch:{ Exception -> 0x022f }
- r8[r7] = r4 // Catch:{ Exception -> 0x022f }
- goto L_0x00e3
- L_0x00e2:
- r8 = r4
- L_0x00e3:
- r15.rotate = r7 // Catch:{ Exception -> 0x022f }
- epson.print.service.IEpsonService$Stub r4 = r1.mBinder // Catch:{ Exception -> 0x022f }
- int r4 = r4.getLang() // Catch:{ Exception -> 0x022f }
- switch(r4) {
- case 1: goto L_0x0142;
- case 2: goto L_0x0135;
- case 3: goto L_0x0135;
- case 4: goto L_0x00f0;
- case 5: goto L_0x0135;
- case 6: goto L_0x0135;
- case 7: goto L_0x00f0;
- default: goto L_0x00ee;
- } // Catch:{ Exception -> 0x022f }
- L_0x00ee:
- goto L_0x017f
- L_0x00f0:
- com.epson.mobilephone.common.escpr.EscprLib r4 = r1.mEscprLib // Catch:{ Exception -> 0x022f }
- boolean r4 = r4.pageS_needRotate2(r0) // Catch:{ Exception -> 0x022f }
- if (r4 == 0) goto L_0x011c
- r4 = r8[r7] // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- r8[r7] = r10 // Catch:{ Exception -> 0x022f }
- r8[r5] = r4 // Catch:{ Exception -> 0x022f }
- if (r24 != 0) goto L_0x010c
- boolean r4 = r15.isPaperLandScape // Catch:{ Exception -> 0x022f }
- if (r4 != 0) goto L_0x010c
- int r4 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r4 = r4 + 90
- r15.rotate = r4 // Catch:{ Exception -> 0x022f }
- L_0x010c:
- if (r2 != r6) goto L_0x0118
- int r2 = r19 % 2
- if (r2 != r5) goto L_0x0118
- int r2 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r2 = r2 + 180
- r15.rotate = r2 // Catch:{ Exception -> 0x022f }
- L_0x0118:
- r16 = 1
- goto L_0x0181
- L_0x011c:
- if (r24 != 0) goto L_0x0128
- boolean r4 = r15.isPaperLandScape // Catch:{ Exception -> 0x022f }
- if (r4 != r5) goto L_0x0128
- int r4 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r4 = r4 + 90
- r15.rotate = r4 // Catch:{ Exception -> 0x022f }
- L_0x0128:
- if (r2 != r5) goto L_0x017f
- int r2 = r19 % 2
- if (r2 != r5) goto L_0x017f
- int r2 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r2 = r2 + 180
- r15.rotate = r2 // Catch:{ Exception -> 0x022f }
- goto L_0x017f
- L_0x0135:
- if (r24 != 0) goto L_0x017f
- boolean r2 = r15.isPaperLandScape // Catch:{ Exception -> 0x022f }
- if (r2 != r5) goto L_0x017f
- int r2 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r2 = r2 + 90
- r15.rotate = r2 // Catch:{ Exception -> 0x022f }
- goto L_0x017f
- L_0x0142:
- r4 = r8[r7] // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- if (r4 > r10) goto L_0x014a
- r4 = 1
- goto L_0x014b
- L_0x014a:
- r4 = 0
- L_0x014b:
- if (r24 != 0) goto L_0x0166
- if (r4 != r5) goto L_0x015a
- boolean r10 = r15.isPaperLandScape // Catch:{ Exception -> 0x022f }
- if (r10 != r5) goto L_0x015a
- int r10 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r10 = r10 + 90
- r15.rotate = r10 // Catch:{ Exception -> 0x022f }
- goto L_0x0166
- L_0x015a:
- if (r4 != 0) goto L_0x0166
- boolean r10 = r15.isPaperLandScape // Catch:{ Exception -> 0x022f }
- if (r10 != 0) goto L_0x0166
- int r10 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r10 = r10 + 90
- r15.rotate = r10 // Catch:{ Exception -> 0x022f }
- L_0x0166:
- int r10 = r19 % 2
- if (r10 != r5) goto L_0x017f
- if (r4 != r5) goto L_0x0175
- if (r2 != r5) goto L_0x0175
- int r2 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r2 = r2 + 180
- r15.rotate = r2 // Catch:{ Exception -> 0x022f }
- goto L_0x017f
- L_0x0175:
- if (r4 != 0) goto L_0x017f
- if (r2 != r6) goto L_0x017f
- int r2 = r15.rotate // Catch:{ Exception -> 0x022f }
- int r2 = r2 + 180
- r15.rotate = r2 // Catch:{ Exception -> 0x022f }
- L_0x017f:
- r16 = 0
- L_0x0181:
- int r2 = r17.getLang() // Catch:{ Exception -> 0x022f }
- r4 = r25
- int r6 = r1.getStartPageResolution(r13, r4, r2) // Catch:{ Exception -> 0x022f }
- int r2 = r18.getRenderingMode() // Catch:{ Exception -> 0x022f }
- if (r2 != r5) goto L_0x01e1
- if (r24 != 0) goto L_0x01bb
- android.content.Context r4 = r17.getApplicationContext() // Catch:{ Exception -> 0x022f }
- r7 = r8[r7] // Catch:{ Exception -> 0x022f }
- r8 = r8[r5] // Catch:{ Exception -> 0x022f }
- r2 = r3
- r3 = r4
- r4 = r15
- r5 = r6
- r6 = r7
- r7 = r8
- r8 = r20
- r9 = r23
- r10 = r24
- r11 = r21
- r12 = r26
- r0 = r14
- r14 = r16
- r2.createPrintImage(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14) // Catch:{ Exception -> 0x01b8 }
- java.lang.String r2 = r15.decodeImageFileName // Catch:{ Exception -> 0x01b8 }
- r15.printImageFileName = r2 // Catch:{ Exception -> 0x01b8 }
- r14 = r0
- goto L_0x0231
- L_0x01b8:
- r14 = r0
- goto L_0x022f
- L_0x01bb:
- android.content.Context r4 = r17.getApplicationContext() // Catch:{ Exception -> 0x022f }
- r9 = r8[r7] // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- int r13 = r15.rotate // Catch:{ Exception -> 0x022f }
- r2 = r3
- r3 = r4
- r4 = r24
- r5 = r6
- r6 = r18
- r7 = r19
- r8 = r9
- r9 = r10
- r10 = r20
- r11 = r21
- r12 = r26
- r0 = r14
- r14 = r16
- java.lang.String r2 = r2.createMultiPrintImage(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14) // Catch:{ Exception -> 0x01b8 }
- r15.printImageFileName = r2 // Catch:{ Exception -> 0x01b8 }
- r14 = r0
- goto L_0x0231
- L_0x01e1:
- if (r24 == 0) goto L_0x020a
- java.lang.String r2 = "割り付け画像を生成"
- com.epson.mobilephone.common.EpLog.d(r2) // Catch:{ Exception -> 0x022f }
- android.content.Context r4 = r17.getApplicationContext() // Catch:{ Exception -> 0x022f }
- r9 = r8[r7] // Catch:{ Exception -> 0x022f }
- r10 = r8[r5] // Catch:{ Exception -> 0x022f }
- int r13 = r15.rotate // Catch:{ Exception -> 0x022f }
- r2 = r3
- r3 = r4
- r4 = r24
- r5 = r6
- r6 = r18
- r7 = r19
- r8 = r9
- r9 = r10
- r10 = r20
- r11 = r21
- r12 = r26
- java.lang.String r0 = r2.createMultiPrintImage_org(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13) // Catch:{ Exception -> 0x022f }
- r15.printImageFileName = r0 // Catch:{ Exception -> 0x022f }
- goto L_0x0231
- L_0x020a:
- android.content.Context r4 = r17.getApplicationContext() // Catch:{ Exception -> 0x022f }
- r7 = r8[r7] // Catch:{ Exception -> 0x022f }
- r8 = r8[r5] // Catch:{ Exception -> 0x022f }
- r2 = r3
- r3 = r4
- r4 = r15
- r5 = r6
- r6 = r7
- r7 = r8
- r8 = r20
- r9 = r23
- r10 = r21
- r11 = r26
- r12 = r13
- r2.createPrintImage_origi(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12) // Catch:{ Exception -> 0x022f }
- java.lang.String r0 = r15.decodeImageFileName // Catch:{ Exception -> 0x022f }
- r15.printImageFileName = r0 // Catch:{ Exception -> 0x022f }
- goto L_0x0231
- L_0x0229:
- java.lang.Exception r0 = new java.lang.Exception // Catch:{ Exception -> 0x022f }
- r0.<init>() // Catch:{ Exception -> 0x022f }
- throw r0 // Catch:{ Exception -> 0x022f }
- L_0x022f:
- r15.printImageFileName = r14
- L_0x0231:
- java.lang.Object r2 = mCancelLock
- monitor-enter(r2)
- r1.mEPImageCreator = r14 // Catch:{ all -> 0x023a }
- monitor-exit(r2) // Catch:{ all -> 0x023a }
- java.lang.String r0 = r15.printImageFileName
- return r0
- L_0x023a:
- r0 = move-exception
- monitor-exit(r2) // Catch:{ all -> 0x023a }
- throw r0
- L_0x023d:
- r0 = move-exception
- monitor-exit(r4) // Catch:{ all -> 0x023d }
- throw r0
- */
- throw new UnsupportedOperationException("Method not decompiled: epson.print.service.EpsonService.createPrintImage(epson.print.EPImageList, int, int, int, int, int, int, int, int):java.lang.String");
- }
- private int getStartPageResolution(boolean z, int i, int i2) {
- if (z) {
- return EPImageCreator.getPrintAreaResolution(i2, i);
- }
- return this.mEscprLib.get_start_job_resolution2();
- }
- private int epsonConnectCreateJob(int i, String str, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14) throws RemoteException {
- return this.mBinder.EpsonConnectCreateJob(i, str, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);
- }
- private int epsonConnectEndJob() throws RemoteException {
- return this.mBinder.EpsonConnectEndJob();
- }
- private int epsonConnectUploadFile(String str, int i) throws RemoteException {
- return this.mBinder.EpsonConnectUploadFile(str, i);
- }
- private int epsonConnectChangePrintSetting() throws RemoteException {
- return this.mBinder.EpsonConnectChangePrintSetting();
- }
- private int epsonConnectStartPrint(int i, int i2) throws RemoteException {
- return this.mBinder.EpsonConnectStartPrint(i, i2);
- }
- private void setEpsonConnectCopies(int i) {
- this.epsJobattrib.mCopies = i;
- }
- public void waitIfSimpleAp() {
- int[] printerStatus;
- if (WiFiDirectManager.isSimpleAP(getApplicationContext())) {
- try {
- int[] iArr = new int[3];
- Thread.sleep(5000);
- int i = 0;
- do {
- printerStatus = getPrinterStatus();
- Thread.sleep(1000);
- i++;
- if (i >= 1800) {
- return;
- }
- } while (printerStatus[0] != 0);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- public int startJob(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, boolean z) {
- StringBuilder sb = new StringBuilder();
- sb.append("service:: paperSize = ");
- sb.append(i);
- sb.append(" paperType = ");
- int i12 = i2;
- sb.append(i12);
- sb.append(" layout = ");
- int i13 = i3;
- sb.append(i13);
- EPLog.m304d(sb.toString());
- return this.mEscprLib.start_job2(i, i12, i13, i4, i5, i6, i7, i8, i9, i10, i11, z);
- }
- public int getStartJobResolution() {
- return this.mEscprLib.get_start_job_resolution2();
- }
- public int startPage() {
- return this.mEscprLib.start_page();
- }
- public int endJob() {
- return this.mEscprLib.end_job();
- }
- public int printPage() {
- return this.mEscprLib.print_page();
- }
- public int getLang() {
- return this.mEscprLib.get_lang();
- }
- public int endPage(boolean z) {
- return this.mEscprLib.end_page(z);
- }
- public int initImage(String str) {
- return this.mEscprLib.init_image(str);
- }
- public int releaseImage() {
- return this.mEscprLib.release_image();
- }
- public int[] getPrintableArea() {
- return this.mEscprLib.get_printable_area();
- }
- @NonNull
- public int[] getLocalPrinterLayout1AreaSize(int i) {
- int[] iArr = this.mEscprLib.get_printable_area();
- if (i == 0) {
- return iArr;
- }
- return Info_paper.getMultiLayoutArea(i, iArr[0], iArr[1], this.mEscprLib.get_start_job_resolution2());
- }
- public boolean pageSneedRotate(int i) {
- return this.mEscprLib.pageS_needRotate2(i);
- }
- public int[] getPrinterStatus() {
- return this.mEscprLib.get_printer_status();
- }
- public Object getPrintLockObject() {
- return mPrinting;
- }
- public void setCancelPrinting(boolean z) {
- bCancelPrinting = z;
- }
- public boolean getCancelPrinting() {
- return bCancelPrinting;
- }
- public void setPrinting(boolean z) {
- this.bPrinting = z;
- }
- public void notifyEndJob(int i) {
- onNotifyEndJob(i);
- }
- public Context getLocalApplicationContext() {
- return getApplicationContext();
- }
- public void onCreate() {
- EpLog.i();
- super.onCreate();
- }
- public IBinder onBind(Intent intent) {
- EpLog.i();
- try {
- if (!isInitDriver) {
- this.mEscprLib.init_driver(getApplicationContext(), ExternalFileUtils.getInstance(getApplicationContext()).getSupportedMediaDir());
- isInitDriver = true;
- }
- updateLoginInfo();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return this.mBinder;
- }
- public void onRebind(Intent intent) {
- EpLog.i();
- this.mEscprLib.release_driver();
- isInitDriver = false;
- this.mEscprLib.init_driver(getApplicationContext(), ExternalFileUtils.getInstance(getApplicationContext()).getSupportedMediaDir());
- isInitDriver = true;
- this.clientId = SharedPreferencesProvider.getInstace(this).getString(epson.common.Constants.PRINTER_CLIENT_ID, (String) null);
- EpLog.d("▲clientId = " + this.clientId);
- MyPrinter curPrinter = MyPrinter.getCurPrinter(this);
- this.mailAddress = curPrinter.getEmailAddress();
- this.accessKey = curPrinter.getRemotePrinterAccessKey(this);
- super.onRebind(intent);
- }
- public boolean onUnbind(Intent intent) {
- EpLog.i();
- this.mEscprLib.setHanlder((Handler) null);
- this.mEscprLib.release_driver();
- isInitDriver = false;
- return super.onUnbind(intent);
- }
- public void onDestroy() {
- EpLog.i();
- super.onDestroy();
- }
- public static void onNotifyProgress(int i) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i2 = 0; i2 < beginBroadcast; i2++) {
- try {
- mCallbacks.getBroadcastItem(i2).onNotifyProgress(1, i);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public static void notifyProgress(int i, int i2) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i3 = 0; i3 < beginBroadcast; i3++) {
- try {
- mCallbacks.getBroadcastItem(i3).onNotifyProgress(i, i2);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public static void onNotifyContinueable(int i) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i2 = 0; i2 < beginBroadcast; i2++) {
- try {
- mCallbacks.getBroadcastItem(i2).onNotifyContinueable(i);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public void epsNotifyContinueable(int i) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i2 = 0; i2 < beginBroadcast; i2++) {
- try {
- mCallbacks.getBroadcastItem(i2).onNotifyContinueable(i);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public static void onNotifyEndJob(int i) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i2 = 0; i2 < beginBroadcast; i2++) {
- try {
- mCallbacks.getBroadcastItem(i2).onNotifyEndJob(i);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public static void onNotifyError(int i, int i2, boolean z) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i3 = 0; i3 < beginBroadcast; i3++) {
- try {
- mCallbacks.getBroadcastItem(i3).onNotifyError(i, i2, z);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- public void epsNotifyError(int i, int i2, boolean z) {
- synchronized (mLock) {
- int beginBroadcast = mCallbacks.beginBroadcast();
- for (int i3 = 0; i3 < beginBroadcast; i3++) {
- try {
- mCallbacks.getBroadcastItem(i3).onNotifyError(i, i2, z);
- } catch (RemoteException e) {
- EPLog.m307e("NotificationService", e.toString());
- }
- }
- mCallbacks.finishBroadcast();
- }
- }
- }
|