SettingScr.java 148 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955
  1. package epson.print.screen;
  2. import android.content.ComponentName;
  3. import android.content.Context;
  4. import android.content.DialogInterface;
  5. import android.content.Intent;
  6. import android.content.ServiceConnection;
  7. import android.content.SharedPreferences;
  8. import android.content.res.Configuration;
  9. import android.os.AsyncTask;
  10. import android.os.Bundle;
  11. import android.os.Handler;
  12. import android.os.IBinder;
  13. import android.os.RemoteException;
  14. import android.os.SystemClock;
  15. import android.view.Menu;
  16. import android.view.MenuItem;
  17. import android.view.MotionEvent;
  18. import android.view.View;
  19. import android.widget.Button;
  20. import android.widget.ImageView;
  21. import android.widget.LinearLayout;
  22. import android.widget.TextView;
  23. import com.epson.mobilephone.common.escpr.EscprError;
  24. import com.epson.mobilephone.common.escpr.MediaInfo;
  25. import com.epson.mobilephone.common.wifidirect.WiFiDirectManager;
  26. import epson.common.Constants;
  27. import epson.common.ExternalFileUtils;
  28. import epson.common.Utils;
  29. import epson.print.ActivityIACommon;
  30. import epson.print.R;
  31. import epson.print.EPPrinterManager;
  32. import epson.print.MyPrinter;
  33. import epson.print.Util.EPLog;
  34. import epson.print.inkrpln.InkRplnRepository;
  35. import epson.print.screen.PrintSetting;
  36. import epson.print.service.EpsonService;
  37. import epson.print.service.IEpsonService;
  38. import epson.print.service.IEpsonServiceCallback;
  39. import epson.print.widgets.CustomTitleAlertDialogBuilder;
  40. import epson.print.widgets.LayoutEx;
  41. import epson.print.widgets.LongTapRepeatAdapter;
  42. import java.io.File;
  43. public class SettingScr extends ActivityIACommon implements View.OnClickListener {
  44. private static final String EXTRA_PRINTER = "myprinter";
  45. private static final String EXTRA_SIMPLEAP = "simpleap";
  46. private static final int REQUEST_CODE_INFO = 1;
  47. private static final int REQUEST_CODE_INK_REPLENISH_PROGRESS = 4;
  48. private static final int REQUEST_CODE_PAGE_RANGE = 2;
  49. private static final int REQUEST_CODE_PRINTER = 0;
  50. public static final String TAG = "PrintSetting";
  51. private final int COLOR_VALUE_MAX = 50;
  52. private final int COLOR_VALUE_MIN = -50;
  53. private final int COPIES_MAX = 30;
  54. private final int COPIES_MIN = 1;
  55. private final int EPS_ERR_COMM_ERROR = -1100;
  56. private final int EPS_ERR_NONE = 0;
  57. private final int EPS_ERR_OPR_FAIL = -1000;
  58. private final int EPS_ERR_PRINTER_NOT_SET = EscprError.EPS_ERR_PRINTER_NOT_SET;
  59. private final int GET_ADVANCED = 64;
  60. private final int GET_COLOR = 6;
  61. private final int GET_DUPLEX = 32;
  62. private final int GET_LAYOUT = 3;
  63. private final int GET_PAPER_SIZE = 1;
  64. private final int GET_PAPER_SOURCE = 5;
  65. private final int GET_PAPER_TYPE = 2;
  66. private final int GET_QUALITY = 4;
  67. private final int GET_SUPPORTED_MEDIA = 0;
  68. private final int PROBE_PRINTER = 17;
  69. private final int SEARCH_BY_ID = 7;
  70. private final int SEARCH_ERROR = 16;
  71. private final int SETTING_DONE = 3;
  72. private final int SHOW_ERROR_DIALOG = 18;
  73. private TextView apfStateText;
  74. private String autoConnectSsid = null;
  75. private TextView brightness;
  76. private Button brightnessMinus;
  77. private Button brightnessPlus;
  78. private int brightnessValue;
  79. private int color;
  80. private TextView colorInfo;
  81. private int[] color_info = null;
  82. private TextView contrast;
  83. private Button contrastMinus;
  84. private Button contrastPlus;
  85. private int contrastValue;
  86. private TextView copies;
  87. private Button copiesMinus;
  88. private Button copiesPlus;
  89. private int copiesValue;
  90. private boolean disablePrintArea = false;
  91. private int duplex;
  92. private TextView duplexInfo;
  93. private int[] duplex_info = null;
  94. private boolean enableShowPreview = false;
  95. private int endValue;
  96. private int feedDirection;
  97. private TextView feedDirectionInfo;
  98. private int[] info = null;
  99. private boolean isDocumentSetting = true;
  100. boolean isInfoAvai = false;
  101. Boolean isNotLoading = true;
  102. private boolean isRetryAfterConnectSimpleAp = false;
  103. private boolean isTryConnectSimpleAp = false;
  104. private int lang = 1;
  105. private int layout;
  106. private TextView layoutInfo;
  107. private int[] layout_info = null;
  108. private IEpsonServiceCallback mCallback = new IEpsonServiceCallback.Stub() {
  109. public void onGetInkState() throws RemoteException {
  110. }
  111. public void onGetStatusState() throws RemoteException {
  112. }
  113. public void onNotifyEndJob(int i) throws RemoteException {
  114. }
  115. public void onNotifyProgress(int i, int i2) throws RemoteException {
  116. }
  117. public void onFindPrinterResult(String str, String str2, String str3, String str4, String str5) throws RemoteException {
  118. String unused = SettingScr.this.printerIp = str2;
  119. }
  120. public void onNotifyContinueable(int i) throws RemoteException {
  121. if (!SettingScr.this.mFinishRequested) {
  122. EPLog.i("IEpsonServiceCallback", "onNotifyContinueable code = " + i);
  123. if (i == 0) {
  124. SettingScr settingScr = SettingScr.this;
  125. settingScr.isInfoAvai = true;
  126. int unused = settingScr.lang = settingScr.getPrinterLang();
  127. SettingScr settingScr2 = SettingScr.this;
  128. settingScr2.undoFlag = false;
  129. settingScr2.mHandler.sendEmptyMessage(0);
  130. }
  131. }
  132. }
  133. public void onNotifyError(int i, int i2, boolean z) throws RemoteException {
  134. if (!SettingScr.this.mFinishRequested) {
  135. EPLog.i("IEpsonServiceCallback", "onNotifyError errorCode = " + i2);
  136. SettingScr settingScr = SettingScr.this;
  137. settingScr.isInfoAvai = true;
  138. int unused = settingScr.lang = settingScr.getPrinterLang();
  139. SettingScr settingScr2 = SettingScr.this;
  140. settingScr2.undoFlag = false;
  141. settingScr2.mHandler.sendEmptyMessage(0);
  142. }
  143. }
  144. };
  145. private Context mContext = null;
  146. private ServiceConnection mEpsonConnection = new ServiceConnection() {
  147. public void onServiceDisconnected(ComponentName componentName) {
  148. EPLog.v("SettingScr", "onServiceDisconnected");
  149. try {
  150. SettingScr.this.mEpsonService.unregisterCallback(SettingScr.this.mCallback);
  151. } catch (RemoteException e) {
  152. e.printStackTrace();
  153. }
  154. IEpsonService unused = SettingScr.this.mEpsonService = null;
  155. }
  156. public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
  157. IEpsonService unused = SettingScr.this.mEpsonService = IEpsonService.Stub.asInterface(iBinder);
  158. EPLog.v("SettingScr", "onServiceConnected");
  159. if (SettingScr.this.mEpsonService != null) {
  160. try {
  161. SettingScr.this.mEpsonService.registerCallback(SettingScr.this.mCallback);
  162. } catch (RemoteException e) {
  163. e.printStackTrace();
  164. }
  165. }
  166. }
  167. };
  168. private IEpsonService mEpsonService = null;
  169. private volatile boolean mFinishRequested;
  170. Handler mHandler = new Handler(new Handler.Callback() {
  171. /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r1v4, resolved type: boolean} */
  172. /* JADX WARNING: type inference failed for: r1v1 */
  173. /* JADX WARNING: type inference failed for: r1v5 */
  174. /* JADX WARNING: type inference failed for: r1v14, types: [int] */
  175. /* JADX WARNING: type inference failed for: r1v28 */
  176. /* JADX WARNING: Multi-variable type inference failed */
  177. /* JADX WARNING: Removed duplicated region for block: B:199:0x0636 */
  178. /* JADX WARNING: Removed duplicated region for block: B:202:0x0653 */
  179. /* JADX WARNING: Removed duplicated region for block: B:206:0x0667 */
  180. /* JADX WARNING: Removed duplicated region for block: B:212:0x0689 */
  181. /* JADX WARNING: Removed duplicated region for block: B:216:0x06a1 A[LOOP:9: B:214:0x069b->B:216:0x06a1, LOOP_END] */
  182. /* Code decompiled incorrectly, please refer to instructions dump. */
  183. public boolean handleMessage(android.os.Message r15) {
  184. /*
  185. r14 = this;
  186. java.lang.String r0 = "SettingScr"
  187. java.lang.String r1 = "handleMessage call setScreenState = false"
  188. epson.print.Util.EPLog.i(r0, r1)
  189. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  190. r1 = 0
  191. java.lang.Boolean r2 = java.lang.Boolean.valueOf(r1)
  192. r0.setScreenState(r2)
  193. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  194. boolean r0 = r0.mFinishRequested
  195. r2 = 1
  196. if (r0 == 0) goto L_0x001b
  197. return r2
  198. L_0x001b:
  199. epson.print.screen.PrintSetting r0 = new epson.print.screen.PrintSetting
  200. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  201. boolean r4 = r3.isDocumentSetting
  202. if (r4 == 0) goto L_0x0028
  203. epson.print.screen.PrintSetting$Kind r4 = epson.print.screen.PrintSetting.Kind.document
  204. goto L_0x002a
  205. L_0x0028:
  206. epson.print.screen.PrintSetting$Kind r4 = epson.print.screen.PrintSetting.Kind.photo
  207. L_0x002a:
  208. r0.<init>(r3, r4)
  209. int r3 = r15.what
  210. r4 = 64
  211. r5 = 32
  212. r6 = 3
  213. r7 = 0
  214. r8 = 100
  215. r10 = 2
  216. if (r3 == r5) goto L_0x0cba
  217. if (r3 == r4) goto L_0x0b62
  218. r4 = 6
  219. r11 = 5
  220. r12 = 4
  221. r13 = 8
  222. switch(r3) {
  223. case 0: goto L_0x0b45;
  224. case 1: goto L_0x0996;
  225. case 2: goto L_0x06e5;
  226. case 3: goto L_0x04c7;
  227. case 4: goto L_0x03b6;
  228. case 5: goto L_0x0243;
  229. case 6: goto L_0x013c;
  230. default: goto L_0x0044;
  231. }
  232. L_0x0044:
  233. switch(r3) {
  234. case 17: goto L_0x00e7;
  235. case 18: goto L_0x0079;
  236. default: goto L_0x0047;
  237. }
  238. L_0x0047:
  239. java.lang.String r15 = "SettingScr"
  240. java.lang.String r0 = "default"
  241. epson.print.Util.EPLog.i(r15, r0)
  242. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  243. android.widget.TextView r15 = r15.printerName
  244. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  245. r1 = 2131625174(0x7f0e04d6, float:1.8877549E38)
  246. java.lang.String r0 = r0.getString(r1)
  247. r15.setText(r0)
  248. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  249. r0 = 2131231128(0x7f080198, float:1.8078328E38)
  250. android.view.View r15 = r15.findViewById(r0)
  251. android.widget.ImageView r15 = (android.widget.ImageView) r15
  252. r15.setVisibility(r13)
  253. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  254. java.lang.Boolean r0 = java.lang.Boolean.valueOf(r2)
  255. r15.setScreenState(r0)
  256. goto L_0x0e25
  257. L_0x0079:
  258. int r0 = r15.arg1
  259. r3 = -1100(0xfffffffffffffbb4, float:NaN)
  260. if (r0 == r3) goto L_0x00c9
  261. r3 = -1000(0xfffffffffffffc18, float:NaN)
  262. if (r0 == r3) goto L_0x00c9
  263. int r15 = r15.arg1
  264. java.lang.Integer[] r15 = com.epson.mobilephone.common.escpr.MediaInfo.ErrorTable.getStringId(r15)
  265. if (r15 != 0) goto L_0x00a5
  266. java.lang.Integer[] r15 = new java.lang.Integer[r6]
  267. r0 = 2131624506(0x7f0e023a, float:1.8876194E38)
  268. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  269. r15[r1] = r0
  270. r0 = 2131624507(0x7f0e023b, float:1.8876196E38)
  271. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  272. r15[r2] = r0
  273. java.lang.Integer r0 = java.lang.Integer.valueOf(r2)
  274. r15[r10] = r0
  275. L_0x00a5:
  276. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  277. r3 = r15[r2]
  278. int r3 = r3.intValue()
  279. java.lang.CharSequence r3 = r0.getText(r3)
  280. java.lang.String r3 = r3.toString()
  281. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this
  282. r15 = r15[r1]
  283. int r15 = r15.intValue()
  284. java.lang.CharSequence r15 = r4.getText(r15)
  285. java.lang.String r15 = r15.toString()
  286. r0.showErrorDialog(r3, r15)
  287. goto L_0x00e0
  288. L_0x00c9:
  289. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  290. r0 = 2131624778(0x7f0e034a, float:1.8876745E38)
  291. java.lang.String r15 = r15.getString(r0)
  292. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  293. r1 = 2131624777(0x7f0e0349, float:1.8876743E38)
  294. java.lang.String r0 = r0.getString(r1)
  295. epson.print.screen.SettingScr r1 = epson.print.screen.SettingScr.this
  296. r1.showErrorDialog(r15, r0)
  297. L_0x00e0:
  298. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  299. r15.resetSettings()
  300. goto L_0x0e25
  301. L_0x00e7:
  302. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  303. epson.print.service.IEpsonService r15 = r15.mEpsonService
  304. r0 = 17
  305. if (r15 == 0) goto L_0x0133
  306. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  307. int r15 = r15.printerLocation // Catch:{ RemoteException -> 0x012d }
  308. if (r15 == r10) goto L_0x0124
  309. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  310. epson.print.service.IEpsonService r15 = r15.mEpsonService // Catch:{ RemoteException -> 0x012d }
  311. epson.print.screen.SettingScr r1 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  312. java.lang.String r1 = r1.printerId // Catch:{ RemoteException -> 0x012d }
  313. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  314. java.lang.String r3 = r3.printerIp // Catch:{ RemoteException -> 0x012d }
  315. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  316. int r4 = r4.printerLocation // Catch:{ RemoteException -> 0x012d }
  317. if (r4 != r6) goto L_0x0114
  318. goto L_0x0115
  319. L_0x0114:
  320. r10 = 1
  321. L_0x0115:
  322. int r15 = r15.searchPrinters(r1, r3, r10) // Catch:{ RemoteException -> 0x012d }
  323. if (r15 == 0) goto L_0x0e25
  324. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  325. android.os.Handler r15 = r15.mHandler // Catch:{ RemoteException -> 0x012d }
  326. r15.sendEmptyMessageDelayed(r0, r8) // Catch:{ RemoteException -> 0x012d }
  327. goto L_0x0e25
  328. L_0x0124:
  329. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x012d }
  330. android.os.Handler r15 = r15.mHandler // Catch:{ RemoteException -> 0x012d }
  331. r15.sendEmptyMessage(r1) // Catch:{ RemoteException -> 0x012d }
  332. goto L_0x0e25
  333. L_0x012d:
  334. r15 = move-exception
  335. r15.printStackTrace()
  336. goto L_0x0e25
  337. L_0x0133:
  338. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  339. android.os.Handler r15 = r15.mHandler
  340. r15.sendEmptyMessageDelayed(r0, r8)
  341. goto L_0x0e25
  342. L_0x013c:
  343. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  344. epson.print.service.IEpsonService r15 = r15.mEpsonService
  345. if (r15 != 0) goto L_0x014d
  346. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  347. android.os.Handler r15 = r15.mHandler
  348. r15.sendEmptyMessageDelayed(r4, r8)
  349. goto L_0x0e25
  350. L_0x014d:
  351. java.lang.String r15 = "SettingScr"
  352. java.lang.String r0 = "GET_COLOR"
  353. epson.print.Util.EPLog.i(r15, r0)
  354. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  355. int[] unused = r15.color_info = r7
  356. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x018b }
  357. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x018b }
  358. epson.print.service.IEpsonService r0 = r0.mEpsonService // Catch:{ RemoteException -> 0x018b }
  359. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x018b }
  360. int r3 = r3.printerLocation // Catch:{ RemoteException -> 0x018b }
  361. if (r3 != r10) goto L_0x016b
  362. r3 = 1
  363. goto L_0x016c
  364. L_0x016b:
  365. r3 = 0
  366. L_0x016c:
  367. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x018b }
  368. boolean r4 = r4.isDocumentSetting // Catch:{ RemoteException -> 0x018b }
  369. if (r4 == 0) goto L_0x0176
  370. r4 = 1
  371. goto L_0x0177
  372. L_0x0176:
  373. r4 = 2
  374. L_0x0177:
  375. epson.print.screen.SettingScr r6 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x018b }
  376. int r6 = r6.sizeIndex // Catch:{ RemoteException -> 0x018b }
  377. epson.print.screen.SettingScr r7 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x018b }
  378. int r7 = r7.typeIndex // Catch:{ RemoteException -> 0x018b }
  379. int[] r0 = r0.getColor(r3, r4, r6, r7) // Catch:{ RemoteException -> 0x018b }
  380. int[] unused = r15.color_info = r0 // Catch:{ RemoteException -> 0x018b }
  381. goto L_0x0193
  382. L_0x018b:
  383. r15 = move-exception
  384. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  385. r0.undoFlag = r2
  386. r15.printStackTrace()
  387. L_0x0193:
  388. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  389. int[] r15 = r15.color_info
  390. if (r15 != 0) goto L_0x019f
  391. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  392. r15.undoFlag = r2
  393. L_0x019f:
  394. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  395. int[] r15 = r15.color_info
  396. if (r15 == 0) goto L_0x01b0
  397. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  398. int[] r15 = r15.color_info
  399. int r15 = r15.length
  400. if (r15 > 0) goto L_0x01c7
  401. L_0x01b0:
  402. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  403. int[] r0 = new int[r10]
  404. int[] unused = r15.color_info = r0
  405. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  406. int[] r15 = r15.color_info
  407. r15[r1] = r1
  408. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  409. int[] r15 = r15.color_info
  410. r15[r2] = r2
  411. L_0x01c7:
  412. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  413. int[] r15 = r15.color_info
  414. if (r15 == 0) goto L_0x0e25
  415. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  416. int[] r15 = r15.color_info
  417. int r15 = r15.length
  418. if (r15 <= 0) goto L_0x0e25
  419. r15 = 0
  420. L_0x01d9:
  421. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  422. int[] r0 = r0.color_info
  423. int r0 = r0.length
  424. if (r15 >= r0) goto L_0x01f6
  425. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  426. int r0 = r0.color
  427. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  428. int[] r3 = r3.color_info
  429. r3 = r3[r15]
  430. if (r0 != r3) goto L_0x01f3
  431. goto L_0x01f6
  432. L_0x01f3:
  433. int r15 = r15 + 1
  434. goto L_0x01d9
  435. L_0x01f6:
  436. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  437. int[] r0 = r0.color_info
  438. int r0 = r0.length
  439. if (r15 < r0) goto L_0x020a
  440. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  441. int[] r0 = r15.color_info
  442. r0 = r0[r1]
  443. int unused = r15.color = r0
  444. L_0x020a:
  445. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  446. com.epson.mobilephone.common.escpr.MediaInfo$Color r0 = new com.epson.mobilephone.common.escpr.MediaInfo$Color
  447. r0.<init>()
  448. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  449. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  450. android.widget.TextView r15 = r15.colorInfo
  451. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  452. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r1 = r0.mLookupTable
  453. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  454. int r3 = r3.color
  455. int r1 = r1.getStringId(r3)
  456. java.lang.String r0 = r0.getString(r1)
  457. r15.setText(r0)
  458. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  459. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  460. r15.destructor()
  461. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  462. android.os.Handler r15 = r15.mHandler
  463. r15.sendEmptyMessage(r5)
  464. goto L_0x0e25
  465. L_0x0243:
  466. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  467. epson.print.service.IEpsonService r15 = r15.mEpsonService
  468. if (r15 != 0) goto L_0x0254
  469. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  470. android.os.Handler r15 = r15.mHandler
  471. r15.sendEmptyMessageDelayed(r11, r8)
  472. goto L_0x0e25
  473. L_0x0254:
  474. java.lang.String r15 = "SettingScr"
  475. java.lang.String r0 = "GET_PAPER_SOURCE"
  476. epson.print.Util.EPLog.i(r15, r0)
  477. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  478. int[] unused = r15.paper_source_info = r7
  479. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  480. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  481. epson.print.service.IEpsonService r0 = r0.mEpsonService // Catch:{ RemoteException -> 0x02e2 }
  482. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  483. int r3 = r3.sizeIndex // Catch:{ RemoteException -> 0x02e2 }
  484. epson.print.screen.SettingScr r5 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  485. int r5 = r5.typeIndex // Catch:{ RemoteException -> 0x02e2 }
  486. epson.print.screen.SettingScr r6 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  487. int r6 = r6.printerLocation // Catch:{ RemoteException -> 0x02e2 }
  488. int[] r0 = r0.getPaperSource(r3, r5, r6) // Catch:{ RemoteException -> 0x02e2 }
  489. int[] unused = r15.paper_source_info = r0 // Catch:{ RemoteException -> 0x02e2 }
  490. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  491. int[] r15 = r15.paper_source_info // Catch:{ RemoteException -> 0x02e2 }
  492. if (r15 == 0) goto L_0x02ea
  493. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  494. boolean r15 = r15.isDocumentSetting // Catch:{ RemoteException -> 0x02e2 }
  495. if (r15 == 0) goto L_0x02ea
  496. java.util.ArrayList r15 = new java.util.ArrayList // Catch:{ RemoteException -> 0x02e2 }
  497. r15.<init>() // Catch:{ RemoteException -> 0x02e2 }
  498. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  499. int[] r0 = r0.paper_source_info // Catch:{ RemoteException -> 0x02e2 }
  500. int r3 = r0.length // Catch:{ RemoteException -> 0x02e2 }
  501. r5 = 0
  502. L_0x029e:
  503. if (r5 >= r3) goto L_0x02af
  504. r6 = r0[r5] // Catch:{ RemoteException -> 0x02e2 }
  505. if (r6 != r13) goto L_0x02a5
  506. goto L_0x02ac
  507. L_0x02a5:
  508. java.lang.Integer r6 = java.lang.Integer.valueOf(r6) // Catch:{ RemoteException -> 0x02e2 }
  509. r15.add(r6) // Catch:{ RemoteException -> 0x02e2 }
  510. L_0x02ac:
  511. int r5 = r5 + 1
  512. goto L_0x029e
  513. L_0x02af:
  514. int r0 = r15.size() // Catch:{ RemoteException -> 0x02e2 }
  515. if (r0 <= 0) goto L_0x02dc
  516. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  517. int r3 = r15.size() // Catch:{ RemoteException -> 0x02e2 }
  518. int[] r3 = new int[r3] // Catch:{ RemoteException -> 0x02e2 }
  519. int[] unused = r0.paper_source_info = r3 // Catch:{ RemoteException -> 0x02e2 }
  520. r0 = 0
  521. L_0x02c1:
  522. int r3 = r15.size() // Catch:{ RemoteException -> 0x02e2 }
  523. if (r0 >= r3) goto L_0x02ea
  524. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  525. int[] r3 = r3.paper_source_info // Catch:{ RemoteException -> 0x02e2 }
  526. java.lang.Object r5 = r15.get(r0) // Catch:{ RemoteException -> 0x02e2 }
  527. java.lang.Integer r5 = (java.lang.Integer) r5 // Catch:{ RemoteException -> 0x02e2 }
  528. int r5 = r5.intValue() // Catch:{ RemoteException -> 0x02e2 }
  529. r3[r0] = r5 // Catch:{ RemoteException -> 0x02e2 }
  530. int r0 = r0 + 1
  531. goto L_0x02c1
  532. L_0x02dc:
  533. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x02e2 }
  534. int[] unused = r15.paper_source_info = r7 // Catch:{ RemoteException -> 0x02e2 }
  535. goto L_0x02ea
  536. L_0x02e2:
  537. r15 = move-exception
  538. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  539. r0.undoFlag = r2
  540. r15.printStackTrace()
  541. L_0x02ea:
  542. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  543. int[] r15 = r15.paper_source_info
  544. if (r15 != 0) goto L_0x0305
  545. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  546. r15.undoFlag = r2
  547. int[] r0 = new int[r2]
  548. int[] unused = r15.paper_source_info = r0
  549. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  550. int[] r15 = r15.paper_source_info
  551. r0 = 128(0x80, float:1.794E-43)
  552. r15[r1] = r0
  553. L_0x0305:
  554. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  555. int[] r15 = r15.paper_source_info
  556. if (r15 == 0) goto L_0x0e25
  557. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  558. int[] r15 = r15.paper_source_info
  559. int r15 = r15.length
  560. if (r15 <= 0) goto L_0x0e25
  561. r15 = 0
  562. L_0x0317:
  563. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  564. int[] r0 = r0.paper_source_info
  565. int r0 = r0.length
  566. if (r15 >= r0) goto L_0x0334
  567. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  568. int r0 = r0.paperSource
  569. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  570. int[] r3 = r3.paper_source_info
  571. r3 = r3[r15]
  572. if (r0 != r3) goto L_0x0331
  573. goto L_0x0334
  574. L_0x0331:
  575. int r15 = r15 + 1
  576. goto L_0x0317
  577. L_0x0334:
  578. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  579. int[] r0 = r0.paper_source_info
  580. int r0 = r0.length
  581. if (r15 < r0) goto L_0x0348
  582. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  583. int[] r0 = r15.paper_source_info
  584. r0 = r0[r1]
  585. int unused = r15.paperSource = r0
  586. L_0x0348:
  587. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  588. int unused = r15.paperSource
  589. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  590. int[] r15 = r15.paper_source_info
  591. if (r15 == 0) goto L_0x036f
  592. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  593. int[] r15 = r15.paper_source_info
  594. int r15 = r15.length
  595. if (r15 > r2) goto L_0x036f
  596. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  597. r0 = 2131231313(0x7f080251, float:1.8078703E38)
  598. android.view.View r15 = r15.findViewById(r0)
  599. android.widget.ImageView r15 = (android.widget.ImageView) r15
  600. r15.setVisibility(r13)
  601. r15 = 128(0x80, float:1.794E-43)
  602. goto L_0x0383
  603. L_0x036f:
  604. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  605. r0 = 2131231313(0x7f080251, float:1.8078703E38)
  606. android.view.View r15 = r15.findViewById(r0)
  607. android.widget.ImageView r15 = (android.widget.ImageView) r15
  608. r15.setVisibility(r1)
  609. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  610. int r15 = r15.paperSource
  611. L_0x0383:
  612. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  613. com.epson.mobilephone.common.escpr.MediaInfo$PaperSource r1 = new com.epson.mobilephone.common.escpr.MediaInfo$PaperSource
  614. r1.<init>()
  615. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r0.mLookupTable = r1
  616. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  617. android.widget.TextView r0 = r0.paperSourceInfo
  618. epson.print.screen.SettingScr r1 = epson.print.screen.SettingScr.this
  619. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r3 = r1.mLookupTable
  620. int r15 = r3.getStringId(r15)
  621. java.lang.String r15 = r1.getString(r15)
  622. r0.setText(r15)
  623. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  624. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  625. r15.destructor()
  626. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  627. android.os.Handler r15 = r15.mHandler
  628. r15.sendEmptyMessage(r4)
  629. goto L_0x0e25
  630. L_0x03b6:
  631. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  632. epson.print.service.IEpsonService r15 = r15.mEpsonService
  633. if (r15 != 0) goto L_0x03c7
  634. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  635. android.os.Handler r15 = r15.mHandler
  636. r15.sendEmptyMessageDelayed(r12, r8)
  637. goto L_0x0e25
  638. L_0x03c7:
  639. java.lang.String r15 = "SettingScr"
  640. java.lang.String r0 = "GET_QUALITY"
  641. epson.print.Util.EPLog.i(r15, r0)
  642. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  643. int[] unused = r15.info = r7
  644. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x03ef }
  645. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x03ef }
  646. epson.print.service.IEpsonService r0 = r0.mEpsonService // Catch:{ RemoteException -> 0x03ef }
  647. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x03ef }
  648. int r3 = r3.sizeIndex // Catch:{ RemoteException -> 0x03ef }
  649. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x03ef }
  650. int r4 = r4.typeIndex // Catch:{ RemoteException -> 0x03ef }
  651. int[] r0 = r0.getQuality(r3, r4) // Catch:{ RemoteException -> 0x03ef }
  652. int[] unused = r15.info = r0 // Catch:{ RemoteException -> 0x03ef }
  653. goto L_0x03f7
  654. L_0x03ef:
  655. r15 = move-exception
  656. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  657. r0.undoFlag = r2
  658. r15.printStackTrace()
  659. L_0x03f7:
  660. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  661. int[] r15 = r15.info
  662. if (r15 != 0) goto L_0x0410
  663. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  664. r15.undoFlag = r2
  665. int[] r0 = new int[r2]
  666. int[] unused = r15.info = r0
  667. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  668. int[] r15 = r15.info
  669. r15[r1] = r10
  670. L_0x0410:
  671. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  672. int[] r15 = r15.info
  673. if (r15 == 0) goto L_0x0e25
  674. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  675. int[] r15 = r15.info
  676. int r15 = r15.length
  677. if (r15 <= 0) goto L_0x0e25
  678. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  679. int[] r15 = r15.info
  680. int r15 = r15.length
  681. if (r15 > r2) goto L_0x0439
  682. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  683. r0 = 2131231394(0x7f0802a2, float:1.8078868E38)
  684. android.view.View r15 = r15.findViewById(r0)
  685. android.widget.ImageView r15 = (android.widget.ImageView) r15
  686. r15.setVisibility(r13)
  687. goto L_0x0447
  688. L_0x0439:
  689. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  690. r0 = 2131231394(0x7f0802a2, float:1.8078868E38)
  691. android.view.View r15 = r15.findViewById(r0)
  692. android.widget.ImageView r15 = (android.widget.ImageView) r15
  693. r15.setVisibility(r1)
  694. L_0x0447:
  695. r15 = 0
  696. L_0x0448:
  697. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  698. int[] r0 = r0.info
  699. int r0 = r0.length
  700. if (r15 >= r0) goto L_0x0465
  701. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  702. int r0 = r0.quality
  703. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  704. int[] r3 = r3.info
  705. r3 = r3[r15]
  706. if (r0 != r3) goto L_0x0462
  707. goto L_0x0465
  708. L_0x0462:
  709. int r15 = r15 + 1
  710. goto L_0x0448
  711. L_0x0465:
  712. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  713. int[] r0 = r0.info
  714. int r0 = r0.length
  715. if (r15 < r0) goto L_0x0479
  716. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  717. int[] r0 = r15.info
  718. r0 = r0[r1]
  719. int unused = r15.quality = r0
  720. L_0x0479:
  721. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  722. int[] r0 = r15.info
  723. int r0 = r0.length
  724. int[] r0 = new int[r0]
  725. int[] unused = r15.quality_info = r0
  726. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  727. int[] r0 = r15.info
  728. int[] unused = r15.quality_info = r0
  729. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  730. com.epson.mobilephone.common.escpr.MediaInfo$Quality r0 = new com.epson.mobilephone.common.escpr.MediaInfo$Quality
  731. r0.<init>()
  732. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  733. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  734. android.widget.TextView r15 = r15.qualityInfo
  735. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  736. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r1 = r0.mLookupTable
  737. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  738. int r3 = r3.quality
  739. int r1 = r1.getStringId(r3)
  740. java.lang.String r0 = r0.getString(r1)
  741. r15.setText(r0)
  742. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  743. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  744. r15.destructor()
  745. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  746. android.os.Handler r15 = r15.mHandler
  747. r15.sendEmptyMessage(r11)
  748. goto L_0x0e25
  749. L_0x04c7:
  750. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  751. epson.print.service.IEpsonService r15 = r15.mEpsonService
  752. if (r15 != 0) goto L_0x04d8
  753. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  754. android.os.Handler r15 = r15.mHandler
  755. r15.sendEmptyMessageDelayed(r6, r8)
  756. goto L_0x0e25
  757. L_0x04d8:
  758. java.lang.String r15 = "SettingScr"
  759. java.lang.String r0 = "GET_LAYOUT"
  760. epson.print.Util.EPLog.i(r15, r0)
  761. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  762. int[] unused = r15.info = r7
  763. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0500 }
  764. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0500 }
  765. epson.print.service.IEpsonService r0 = r0.mEpsonService // Catch:{ RemoteException -> 0x0500 }
  766. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0500 }
  767. int r3 = r3.sizeIndex // Catch:{ RemoteException -> 0x0500 }
  768. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0500 }
  769. int r4 = r4.typeIndex // Catch:{ RemoteException -> 0x0500 }
  770. int[] r0 = r0.getLayout(r3, r4) // Catch:{ RemoteException -> 0x0500 }
  771. int[] unused = r15.info = r0 // Catch:{ RemoteException -> 0x0500 }
  772. goto L_0x0508
  773. L_0x0500:
  774. r15 = move-exception
  775. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  776. r0.undoFlag = r2
  777. r15.printStackTrace()
  778. L_0x0508:
  779. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  780. boolean r15 = r15.isDocumentSetting
  781. if (r15 != r2) goto L_0x0520
  782. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  783. int[] r0 = new int[r2]
  784. int[] unused = r15.info = r0
  785. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  786. int[] r15 = r15.info
  787. r15[r1] = r10
  788. goto L_0x053c
  789. L_0x0520:
  790. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  791. int[] r15 = r15.info
  792. if (r15 != 0) goto L_0x053c
  793. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  794. r15.undoFlag = r2
  795. int[] r15 = r15.info
  796. if (r15 != 0) goto L_0x053c
  797. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  798. int[] r0 = new int[r10]
  799. r0 = {2, 1} // fill-array
  800. int[] unused = r15.info = r0
  801. L_0x053c:
  802. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  803. int[] r15 = r15.info
  804. int r15 = java.util.Arrays.binarySearch(r15, r10)
  805. if (r15 < 0) goto L_0x05ba
  806. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  807. int r15 = r15.printerLocation
  808. if (r15 == r10) goto L_0x05ba
  809. java.util.ArrayList r15 = new java.util.ArrayList
  810. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  811. int[] r0 = r0.info
  812. int r0 = r0.length
  813. r15.<init>(r0)
  814. r0 = 0
  815. L_0x055d:
  816. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  817. int[] r3 = r3.info
  818. int r3 = r3.length
  819. if (r0 >= r3) goto L_0x0578
  820. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  821. int[] r3 = r3.info
  822. r3 = r3[r0]
  823. java.lang.Integer r3 = java.lang.Integer.valueOf(r3)
  824. r15.add(r3)
  825. int r0 = r0 + 1
  826. goto L_0x055d
  827. L_0x0578:
  828. r0 = 65536(0x10000, float:9.18355E-41)
  829. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  830. r15.add(r0)
  831. r0 = 131072(0x20000, float:1.83671E-40)
  832. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  833. r15.add(r0)
  834. r0 = 262144(0x40000, float:3.67342E-40)
  835. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  836. r15.add(r0)
  837. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  838. int r3 = r15.size()
  839. int[] r3 = new int[r3]
  840. int[] unused = r0.info = r3
  841. r0 = 0
  842. L_0x059f:
  843. int r3 = r15.size()
  844. if (r0 >= r3) goto L_0x05ba
  845. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  846. int[] r3 = r3.info
  847. java.lang.Object r4 = r15.get(r0)
  848. java.lang.Integer r4 = (java.lang.Integer) r4
  849. int r4 = r4.intValue()
  850. r3[r0] = r4
  851. int r0 = r0 + 1
  852. goto L_0x059f
  853. L_0x05ba:
  854. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  855. int[] r15 = r15.info
  856. if (r15 == 0) goto L_0x0e25
  857. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  858. int[] r15 = r15.info
  859. int r15 = r15.length
  860. if (r15 <= 0) goto L_0x0e25
  861. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  862. int[] r15 = r15.info
  863. int r15 = r15.length
  864. if (r15 > r2) goto L_0x05e3
  865. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  866. r0 = 2131231162(0x7f0801ba, float:1.8078397E38)
  867. android.view.View r15 = r15.findViewById(r0)
  868. android.widget.ImageView r15 = (android.widget.ImageView) r15
  869. r15.setVisibility(r13)
  870. goto L_0x05f1
  871. L_0x05e3:
  872. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  873. r0 = 2131231162(0x7f0801ba, float:1.8078397E38)
  874. android.view.View r15 = r15.findViewById(r0)
  875. android.widget.ImageView r15 = (android.widget.ImageView) r15
  876. r15.setVisibility(r1)
  877. L_0x05f1:
  878. r15 = 0
  879. L_0x05f2:
  880. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  881. int[] r0 = r0.info
  882. int r0 = r0.length
  883. if (r15 >= r0) goto L_0x062d
  884. java.lang.String r0 = "layout info"
  885. java.lang.StringBuilder r3 = new java.lang.StringBuilder
  886. r3.<init>()
  887. java.lang.String r4 = "layout info "
  888. r3.append(r4)
  889. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this
  890. int[] r4 = r4.info
  891. r4 = r4[r15]
  892. r3.append(r4)
  893. java.lang.String r3 = r3.toString()
  894. epson.print.Util.EPLog.v(r0, r3)
  895. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  896. int r0 = r0.layout
  897. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  898. int[] r3 = r3.info
  899. r3 = r3[r15]
  900. if (r0 != r3) goto L_0x062a
  901. goto L_0x062d
  902. L_0x062a:
  903. int r15 = r15 + 1
  904. goto L_0x05f2
  905. L_0x062d:
  906. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  907. int[] r0 = r0.info
  908. int r0 = r0.length
  909. if (r15 < r0) goto L_0x0641
  910. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  911. int[] r0 = r15.info
  912. r0 = r0[r1]
  913. int unused = r15.layout = r0
  914. L_0x0641:
  915. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  916. epson.print.widgets.LayoutEx r0 = new epson.print.widgets.LayoutEx
  917. r0.<init>()
  918. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  919. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  920. int r15 = r15.layout
  921. if (r15 != r13) goto L_0x0658
  922. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  923. int unused = r15.layout = r10
  924. L_0x0658:
  925. java.util.ArrayList r15 = new java.util.ArrayList
  926. r15.<init>()
  927. r0 = 0
  928. L_0x065e:
  929. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  930. int[] r3 = r3.info
  931. int r3 = r3.length
  932. if (r0 >= r3) goto L_0x0683
  933. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  934. int[] r3 = r3.info
  935. r3 = r3[r0]
  936. if (r3 == r13) goto L_0x0680
  937. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  938. int[] r3 = r3.info
  939. r3 = r3[r0]
  940. java.lang.Integer r3 = java.lang.Integer.valueOf(r3)
  941. r15.add(r3)
  942. L_0x0680:
  943. int r0 = r0 + 1
  944. goto L_0x065e
  945. L_0x0683:
  946. int r0 = r15.size()
  947. if (r0 != 0) goto L_0x0690
  948. java.lang.Integer r0 = java.lang.Integer.valueOf(r10)
  949. r15.add(r0)
  950. L_0x0690:
  951. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  952. int r3 = r15.size()
  953. int[] r3 = new int[r3]
  954. int[] unused = r0.layout_info = r3
  955. L_0x069b:
  956. int r0 = r15.size()
  957. if (r1 >= r0) goto L_0x06b6
  958. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  959. int[] r0 = r0.layout_info
  960. java.lang.Object r3 = r15.get(r1)
  961. java.lang.Integer r3 = (java.lang.Integer) r3
  962. int r3 = r3.intValue()
  963. r0[r1] = r3
  964. int r1 = r1 + 1
  965. goto L_0x069b
  966. L_0x06b6:
  967. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  968. android.widget.TextView r15 = r15.layoutInfo
  969. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  970. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r1 = r0.mLookupTable
  971. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  972. int r3 = r3.layout
  973. int r1 = r1.getStringId(r3)
  974. java.lang.String r0 = r0.getString(r1)
  975. r15.setText(r0)
  976. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  977. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  978. r15.destructor()
  979. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  980. android.os.Handler r15 = r15.mHandler
  981. r15.sendEmptyMessage(r12)
  982. goto L_0x0e25
  983. L_0x06e5:
  984. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  985. epson.print.service.IEpsonService r15 = r15.mEpsonService
  986. if (r15 != 0) goto L_0x06f6
  987. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  988. android.os.Handler r15 = r15.mHandler
  989. r15.sendEmptyMessageDelayed(r10, r8)
  990. goto L_0x0e25
  991. L_0x06f6:
  992. java.lang.String r15 = "SettingScr"
  993. java.lang.String r3 = "GET_PAPER_TYPE"
  994. epson.print.Util.EPLog.i(r15, r3)
  995. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  996. int[] unused = r15.info = r7
  997. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  998. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  999. epson.print.service.IEpsonService r3 = r3.mEpsonService // Catch:{ RemoteException -> 0x077e }
  1000. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1001. int r4 = r4.sizeIndex // Catch:{ RemoteException -> 0x077e }
  1002. int[] r3 = r3.getPaperType(r4) // Catch:{ RemoteException -> 0x077e }
  1003. int[] unused = r15.info = r3 // Catch:{ RemoteException -> 0x077e }
  1004. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1005. int[] r15 = r15.info // Catch:{ RemoteException -> 0x077e }
  1006. if (r15 == 0) goto L_0x0786
  1007. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1008. boolean r15 = r15.isDocumentSetting // Catch:{ RemoteException -> 0x077e }
  1009. if (r15 == 0) goto L_0x0786
  1010. java.util.ArrayList r15 = new java.util.ArrayList // Catch:{ RemoteException -> 0x077e }
  1011. r15.<init>() // Catch:{ RemoteException -> 0x077e }
  1012. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1013. int[] r3 = r3.info // Catch:{ RemoteException -> 0x077e }
  1014. int r4 = r3.length // Catch:{ RemoteException -> 0x077e }
  1015. r5 = 0
  1016. L_0x0734:
  1017. if (r5 >= r4) goto L_0x074b
  1018. r8 = r3[r5] // Catch:{ RemoteException -> 0x077e }
  1019. r9 = 91
  1020. if (r8 < r9) goto L_0x0741
  1021. r9 = 93
  1022. if (r8 > r9) goto L_0x0741
  1023. goto L_0x0748
  1024. L_0x0741:
  1025. java.lang.Integer r8 = java.lang.Integer.valueOf(r8) // Catch:{ RemoteException -> 0x077e }
  1026. r15.add(r8) // Catch:{ RemoteException -> 0x077e }
  1027. L_0x0748:
  1028. int r5 = r5 + 1
  1029. goto L_0x0734
  1030. L_0x074b:
  1031. int r3 = r15.size() // Catch:{ RemoteException -> 0x077e }
  1032. if (r3 <= 0) goto L_0x0778
  1033. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1034. int r4 = r15.size() // Catch:{ RemoteException -> 0x077e }
  1035. int[] r4 = new int[r4] // Catch:{ RemoteException -> 0x077e }
  1036. int[] unused = r3.info = r4 // Catch:{ RemoteException -> 0x077e }
  1037. r3 = 0
  1038. L_0x075d:
  1039. int r4 = r15.size() // Catch:{ RemoteException -> 0x077e }
  1040. if (r3 >= r4) goto L_0x0786
  1041. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1042. int[] r4 = r4.info // Catch:{ RemoteException -> 0x077e }
  1043. java.lang.Object r5 = r15.get(r3) // Catch:{ RemoteException -> 0x077e }
  1044. java.lang.Integer r5 = (java.lang.Integer) r5 // Catch:{ RemoteException -> 0x077e }
  1045. int r5 = r5.intValue() // Catch:{ RemoteException -> 0x077e }
  1046. r4[r3] = r5 // Catch:{ RemoteException -> 0x077e }
  1047. int r3 = r3 + 1
  1048. goto L_0x075d
  1049. L_0x0778:
  1050. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x077e }
  1051. int[] unused = r15.info = r7 // Catch:{ RemoteException -> 0x077e }
  1052. goto L_0x0786
  1053. L_0x077e:
  1054. r15 = move-exception
  1055. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1056. r3.undoFlag = r2
  1057. r15.printStackTrace()
  1058. L_0x0786:
  1059. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1060. int[] r15 = r15.info
  1061. if (r15 != 0) goto L_0x07af
  1062. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1063. r15.undoFlag = r2
  1064. int[] r15 = r15.info
  1065. if (r15 != 0) goto L_0x07af
  1066. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1067. int[] r3 = new int[r10]
  1068. com.epson.mobilephone.common.PrintingLib.define.Constants$MediaName r4 = com.epson.mobilephone.common.PrintingLib.define.Constants.MediaName.EPS_MTID_PLAIN
  1069. int r4 = r4.getCode()
  1070. r3[r1] = r4
  1071. com.epson.mobilephone.common.PrintingLib.define.Constants$MediaName r4 = com.epson.mobilephone.common.PrintingLib.define.Constants.MediaName.EPS_MTID_PGPHOTO
  1072. int r4 = r4.getCode()
  1073. r3[r2] = r4
  1074. int[] unused = r15.info = r3
  1075. L_0x07af:
  1076. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1077. int[] r15 = r15.info
  1078. if (r15 == 0) goto L_0x0e25
  1079. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1080. int[] r15 = r15.info
  1081. int r15 = r15.length
  1082. if (r15 <= 0) goto L_0x0e25
  1083. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1084. int[] r15 = r15.info
  1085. int r15 = r15.length
  1086. if (r15 > r2) goto L_0x07d8
  1087. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1088. r3 = 2131231316(0x7f080254, float:1.807871E38)
  1089. android.view.View r15 = r15.findViewById(r3)
  1090. android.widget.ImageView r15 = (android.widget.ImageView) r15
  1091. r15.setVisibility(r13)
  1092. goto L_0x07e6
  1093. L_0x07d8:
  1094. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1095. r3 = 2131231316(0x7f080254, float:1.807871E38)
  1096. android.view.View r15 = r15.findViewById(r3)
  1097. android.widget.ImageView r15 = (android.widget.ImageView) r15
  1098. r15.setVisibility(r1)
  1099. L_0x07e6:
  1100. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1101. int unused = r15.typeIndex = r1
  1102. L_0x07eb:
  1103. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1104. int r15 = r15.typeIndex
  1105. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1106. int[] r3 = r3.info
  1107. int r3 = r3.length
  1108. if (r15 >= r3) goto L_0x0817
  1109. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1110. int r15 = r15.paperType
  1111. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1112. int[] r3 = r3.info
  1113. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this
  1114. int r4 = r4.typeIndex
  1115. r3 = r3[r4]
  1116. if (r15 != r3) goto L_0x0811
  1117. goto L_0x0817
  1118. L_0x0811:
  1119. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1120. epson.print.screen.SettingScr.access$1708(r15)
  1121. goto L_0x07eb
  1122. L_0x0817:
  1123. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1124. int r15 = r15.typeIndex
  1125. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1126. int[] r3 = r3.info
  1127. int r3 = r3.length
  1128. if (r15 < r3) goto L_0x085a
  1129. int r15 = r0.getDefaultPaperType()
  1130. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1131. int unused = r0.typeIndex = r1
  1132. L_0x082f:
  1133. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1134. int r0 = r0.typeIndex
  1135. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1136. int[] r3 = r3.info
  1137. int r3 = r3.length
  1138. if (r0 >= r3) goto L_0x085a
  1139. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1140. int[] r0 = r0.info
  1141. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1142. int r3 = r3.typeIndex
  1143. r0 = r0[r3]
  1144. if (r15 != r0) goto L_0x0854
  1145. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1146. int unused = r0.paperType = r15
  1147. goto L_0x085a
  1148. L_0x0854:
  1149. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1150. epson.print.screen.SettingScr.access$1708(r0)
  1151. goto L_0x082f
  1152. L_0x085a:
  1153. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1154. int r15 = r15.typeIndex
  1155. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1156. int[] r0 = r0.info
  1157. int r0 = r0.length
  1158. if (r15 < r0) goto L_0x0923
  1159. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1160. boolean r15 = r15.isDocumentSetting
  1161. if (r15 != 0) goto L_0x08a8
  1162. com.epson.mobilephone.common.PrintingLib.define.Constants$MediaName r15 = com.epson.mobilephone.common.PrintingLib.define.Constants.MediaName.EPS_MTID_MATTE
  1163. int r15 = r15.getCode()
  1164. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1165. int unused = r0.typeIndex = r1
  1166. L_0x087c:
  1167. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1168. int r0 = r0.typeIndex
  1169. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1170. int[] r3 = r3.info
  1171. int r3 = r3.length
  1172. if (r0 >= r3) goto L_0x0923
  1173. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1174. int[] r0 = r0.info
  1175. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1176. int r3 = r3.typeIndex
  1177. r0 = r0[r3]
  1178. if (r15 != r0) goto L_0x08a2
  1179. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1180. int unused = r0.paperType = r15
  1181. goto L_0x0923
  1182. L_0x08a2:
  1183. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1184. epson.print.screen.SettingScr.access$1708(r0)
  1185. goto L_0x087c
  1186. L_0x08a8:
  1187. com.epson.mobilephone.common.PrintingLib.define.Constants$MediaName r15 = com.epson.mobilephone.common.PrintingLib.define.Constants.MediaName.EPS_MTID_PLAIN1
  1188. int r15 = r15.getCode()
  1189. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1190. int unused = r0.typeIndex = r1
  1191. L_0x08b3:
  1192. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1193. int r0 = r0.typeIndex
  1194. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1195. int[] r3 = r3.info
  1196. int r3 = r3.length
  1197. if (r0 >= r3) goto L_0x08de
  1198. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1199. int[] r0 = r0.info
  1200. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1201. int r3 = r3.typeIndex
  1202. r0 = r0[r3]
  1203. if (r15 != r0) goto L_0x08d8
  1204. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1205. int unused = r0.paperType = r15
  1206. goto L_0x08de
  1207. L_0x08d8:
  1208. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1209. epson.print.screen.SettingScr.access$1708(r0)
  1210. goto L_0x08b3
  1211. L_0x08de:
  1212. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1213. int r15 = r15.typeIndex
  1214. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1215. int[] r0 = r0.info
  1216. int r0 = r0.length
  1217. if (r15 < r0) goto L_0x0923
  1218. com.epson.mobilephone.common.PrintingLib.define.Constants$MediaName r15 = com.epson.mobilephone.common.PrintingLib.define.Constants.MediaName.EPS_MTID_AUTO_PLAIN
  1219. int r15 = r15.getCode()
  1220. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1221. int unused = r0.typeIndex = r1
  1222. L_0x08f8:
  1223. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1224. int r0 = r0.typeIndex
  1225. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1226. int[] r3 = r3.info
  1227. int r3 = r3.length
  1228. if (r0 >= r3) goto L_0x0923
  1229. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1230. int[] r0 = r0.info
  1231. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1232. int r3 = r3.typeIndex
  1233. r0 = r0[r3]
  1234. if (r15 != r0) goto L_0x091d
  1235. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1236. int unused = r0.paperType = r15
  1237. goto L_0x0923
  1238. L_0x091d:
  1239. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1240. epson.print.screen.SettingScr.access$1708(r0)
  1241. goto L_0x08f8
  1242. L_0x0923:
  1243. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1244. int r15 = r15.typeIndex
  1245. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1246. int[] r0 = r0.info
  1247. int r0 = r0.length
  1248. if (r15 < r0) goto L_0x0948
  1249. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1250. int unused = r15.typeIndex = r1
  1251. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1252. int[] r0 = r15.info
  1253. epson.print.screen.SettingScr r1 = epson.print.screen.SettingScr.this
  1254. int r1 = r1.typeIndex
  1255. r0 = r0[r1]
  1256. int unused = r15.paperType = r0
  1257. L_0x0948:
  1258. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1259. int[] r0 = r15.info
  1260. int r0 = r0.length
  1261. int[] r0 = new int[r0]
  1262. int[] unused = r15.paper_type_info = r0
  1263. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1264. int[] r0 = r15.info
  1265. int[] unused = r15.paper_type_info = r0
  1266. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1267. com.epson.mobilephone.common.escpr.MediaInfo$PaperType r0 = new com.epson.mobilephone.common.escpr.MediaInfo$PaperType
  1268. r0.<init>()
  1269. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  1270. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1271. android.widget.TextView r15 = r15.paperTypeInfo
  1272. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1273. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r1 = r0.mLookupTable
  1274. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1275. int r3 = r3.paperType
  1276. int r1 = r1.getStringId(r3)
  1277. java.lang.String r0 = r0.getString(r1)
  1278. r15.setText(r0)
  1279. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1280. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  1281. r15.destructor()
  1282. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1283. android.os.Handler r15 = r15.mHandler
  1284. r15.sendEmptyMessage(r6)
  1285. goto L_0x0e25
  1286. L_0x0996:
  1287. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1288. epson.print.service.IEpsonService r15 = r15.mEpsonService
  1289. if (r15 != 0) goto L_0x09a7
  1290. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1291. android.os.Handler r15 = r15.mHandler
  1292. r15.sendEmptyMessageDelayed(r2, r8)
  1293. goto L_0x0e25
  1294. L_0x09a7:
  1295. java.lang.String r15 = "SettingScr"
  1296. java.lang.String r3 = "GET_PAPER_SIZE"
  1297. epson.print.Util.EPLog.i(r15, r3)
  1298. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1299. int[] unused = r15.info = r7
  1300. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x09c3 }
  1301. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x09c3 }
  1302. epson.print.service.IEpsonService r3 = r3.mEpsonService // Catch:{ RemoteException -> 0x09c3 }
  1303. int[] r3 = r3.getPaperSize() // Catch:{ RemoteException -> 0x09c3 }
  1304. int[] unused = r15.info = r3 // Catch:{ RemoteException -> 0x09c3 }
  1305. goto L_0x09cb
  1306. L_0x09c3:
  1307. r15 = move-exception
  1308. r15.printStackTrace()
  1309. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1310. r15.undoFlag = r2
  1311. L_0x09cb:
  1312. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1313. int[] r15 = r15.info
  1314. if (r15 != 0) goto L_0x0a27
  1315. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1316. r15.undoFlag = r2
  1317. r3 = 9
  1318. int[] r3 = new int[r3]
  1319. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_A4
  1320. int r5 = r5.getCode()
  1321. r3[r1] = r5
  1322. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_A3
  1323. int r5 = r5.getCode()
  1324. r3[r2] = r5
  1325. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_B4
  1326. int r5 = r5.getCode()
  1327. r3[r10] = r5
  1328. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_B5
  1329. int r5 = r5.getCode()
  1330. r3[r6] = r5
  1331. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_LETTER
  1332. int r5 = r5.getCode()
  1333. r3[r12] = r5
  1334. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_LEGAL
  1335. int r5 = r5.getCode()
  1336. r3[r11] = r5
  1337. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_POSTCARD
  1338. int r5 = r5.getCode()
  1339. r3[r4] = r5
  1340. r4 = 7
  1341. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r5 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_4X6
  1342. int r5 = r5.getCode()
  1343. r3[r4] = r5
  1344. com.epson.mobilephone.common.PrintingLib.define.Constants$PaperName r4 = com.epson.mobilephone.common.PrintingLib.define.Constants.PaperName.EPS_MSID_L
  1345. int r4 = r4.getCode()
  1346. r3[r13] = r4
  1347. int[] unused = r15.info = r3
  1348. L_0x0a27:
  1349. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1350. int[] r15 = r15.info
  1351. if (r15 == 0) goto L_0x0e25
  1352. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1353. int[] r15 = r15.info
  1354. int r15 = r15.length
  1355. if (r15 <= 0) goto L_0x0e25
  1356. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1357. int[] r15 = r15.info
  1358. int r15 = r15.length
  1359. if (r15 > r2) goto L_0x0a50
  1360. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1361. r3 = 2131231309(0x7f08024d, float:1.8078695E38)
  1362. android.view.View r15 = r15.findViewById(r3)
  1363. android.widget.ImageView r15 = (android.widget.ImageView) r15
  1364. r15.setVisibility(r13)
  1365. goto L_0x0a5e
  1366. L_0x0a50:
  1367. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1368. r3 = 2131231309(0x7f08024d, float:1.8078695E38)
  1369. android.view.View r15 = r15.findViewById(r3)
  1370. android.widget.ImageView r15 = (android.widget.ImageView) r15
  1371. r15.setVisibility(r1)
  1372. L_0x0a5e:
  1373. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1374. int unused = r15.sizeIndex = r1
  1375. L_0x0a63:
  1376. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1377. int r15 = r15.sizeIndex
  1378. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1379. int[] r3 = r3.info
  1380. int r3 = r3.length
  1381. if (r15 >= r3) goto L_0x0a8f
  1382. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1383. int r15 = r15.paperSize
  1384. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1385. int[] r3 = r3.info
  1386. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this
  1387. int r4 = r4.sizeIndex
  1388. r3 = r3[r4]
  1389. if (r15 != r3) goto L_0x0a89
  1390. goto L_0x0a8f
  1391. L_0x0a89:
  1392. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1393. epson.print.screen.SettingScr.access$1208(r15)
  1394. goto L_0x0a63
  1395. L_0x0a8f:
  1396. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1397. int r15 = r15.sizeIndex
  1398. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1399. int[] r3 = r3.info
  1400. int r3 = r3.length
  1401. if (r15 < r3) goto L_0x0ad2
  1402. int r15 = r0.getDefaultPaperSize()
  1403. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1404. int unused = r0.sizeIndex = r1
  1405. L_0x0aa7:
  1406. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1407. int r0 = r0.sizeIndex
  1408. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1409. int[] r3 = r3.info
  1410. int r3 = r3.length
  1411. if (r0 >= r3) goto L_0x0ad2
  1412. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1413. int[] r0 = r0.info
  1414. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1415. int r3 = r3.sizeIndex
  1416. r0 = r0[r3]
  1417. if (r15 != r0) goto L_0x0acc
  1418. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1419. int unused = r0.paperSize = r15
  1420. goto L_0x0ad2
  1421. L_0x0acc:
  1422. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1423. epson.print.screen.SettingScr.access$1208(r0)
  1424. goto L_0x0aa7
  1425. L_0x0ad2:
  1426. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1427. int r15 = r15.sizeIndex
  1428. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1429. int[] r0 = r0.info
  1430. int r0 = r0.length
  1431. if (r15 < r0) goto L_0x0af7
  1432. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1433. int unused = r15.sizeIndex = r1
  1434. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1435. int[] r0 = r15.info
  1436. epson.print.screen.SettingScr r1 = epson.print.screen.SettingScr.this
  1437. int r1 = r1.sizeIndex
  1438. r0 = r0[r1]
  1439. int unused = r15.paperSize = r0
  1440. L_0x0af7:
  1441. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1442. int[] r0 = r15.info
  1443. int r0 = r0.length
  1444. int[] r0 = new int[r0]
  1445. int[] unused = r15.paper_size_info = r0
  1446. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1447. int[] r0 = r15.info
  1448. int[] unused = r15.paper_size_info = r0
  1449. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1450. com.epson.mobilephone.common.escpr.MediaInfo$PaperSize r0 = new com.epson.mobilephone.common.escpr.MediaInfo$PaperSize
  1451. r0.<init>()
  1452. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  1453. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1454. android.widget.TextView r15 = r15.paperSizeInfo
  1455. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1456. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r1 = r0.mLookupTable
  1457. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1458. int r3 = r3.paperSize
  1459. int r1 = r1.getStringId(r3)
  1460. java.lang.String r0 = r0.getString(r1)
  1461. r15.setText(r0)
  1462. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1463. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  1464. r15.destructor()
  1465. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1466. android.os.Handler r15 = r15.mHandler
  1467. r15.sendEmptyMessage(r10)
  1468. goto L_0x0e25
  1469. L_0x0b45:
  1470. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1471. epson.print.service.IEpsonService r15 = r15.mEpsonService
  1472. if (r15 == 0) goto L_0x0b59
  1473. epson.print.screen.SettingScr$3$1 r15 = new epson.print.screen.SettingScr$3$1
  1474. r15.<init>()
  1475. java.lang.Void[] r0 = new java.lang.Void[r1]
  1476. r15.execute(r0)
  1477. goto L_0x0e25
  1478. L_0x0b59:
  1479. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1480. android.os.Handler r15 = r15.mHandler
  1481. r15.sendEmptyMessageDelayed(r1, r8)
  1482. goto L_0x0e25
  1483. L_0x0b62:
  1484. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1485. r0 = 2131231301(0x7f080245, float:1.807868E38)
  1486. android.view.View r15 = r15.findViewById(r0)
  1487. android.widget.TextView r15 = (android.widget.TextView) r15
  1488. java.lang.StringBuilder r0 = new java.lang.StringBuilder
  1489. r0.<init>()
  1490. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1491. int r3 = r3.startValue
  1492. r0.append(r3)
  1493. java.lang.String r3 = ".."
  1494. r0.append(r3)
  1495. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1496. int r3 = r3.endValue
  1497. r0.append(r3)
  1498. java.lang.String r0 = r0.toString()
  1499. r15.setText(r0)
  1500. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1501. com.epson.mobilephone.common.escpr.MediaInfo$FeedDirection r0 = new com.epson.mobilephone.common.escpr.MediaInfo$FeedDirection
  1502. r0.<init>()
  1503. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  1504. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1505. android.widget.TextView r15 = r15.feedDirectionInfo
  1506. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1507. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r3 = r0.mLookupTable
  1508. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this
  1509. int r4 = r4.feedDirection
  1510. int r3 = r3.getStringId(r4)
  1511. java.lang.String r0 = r0.getString(r3)
  1512. r15.setText(r0)
  1513. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1514. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  1515. r15.destructor()
  1516. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1517. com.epson.mobilephone.common.escpr.MediaInfo$PrintDate r0 = new com.epson.mobilephone.common.escpr.MediaInfo$PrintDate
  1518. r0.<init>()
  1519. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  1520. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1521. android.widget.TextView r15 = r15.printDateInfo
  1522. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1523. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r3 = r0.mLookupTable
  1524. epson.print.screen.SettingScr r4 = epson.print.screen.SettingScr.this
  1525. int r4 = r4.printdate
  1526. int r3 = r3.getStringId(r4)
  1527. java.lang.String r0 = r0.getString(r3)
  1528. r15.setText(r0)
  1529. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1530. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  1531. r15.destructor()
  1532. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1533. android.widget.TextView r15 = r15.brightness
  1534. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1535. int r0 = r0.brightnessValue
  1536. java.lang.String r0 = java.lang.String.valueOf(r0)
  1537. r15.setText(r0)
  1538. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1539. android.widget.Button r15 = r15.brightnessMinus
  1540. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1541. int r0 = r0.brightnessValue
  1542. r3 = -50
  1543. if (r0 == r3) goto L_0x0c15
  1544. r0 = 1
  1545. goto L_0x0c16
  1546. L_0x0c15:
  1547. r0 = 0
  1548. L_0x0c16:
  1549. r15.setEnabled(r0)
  1550. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1551. android.widget.Button r15 = r15.brightnessPlus
  1552. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1553. int r0 = r0.brightnessValue
  1554. r4 = 50
  1555. if (r0 == r4) goto L_0x0c2b
  1556. r0 = 1
  1557. goto L_0x0c2c
  1558. L_0x0c2b:
  1559. r0 = 0
  1560. L_0x0c2c:
  1561. r15.setEnabled(r0)
  1562. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1563. android.widget.TextView r15 = r15.contrast
  1564. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1565. int r0 = r0.contrastValue
  1566. java.lang.String r0 = java.lang.String.valueOf(r0)
  1567. r15.setText(r0)
  1568. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1569. android.widget.Button r15 = r15.contrastMinus
  1570. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1571. int r0 = r0.contrastValue
  1572. if (r0 == r3) goto L_0x0c52
  1573. r0 = 1
  1574. goto L_0x0c53
  1575. L_0x0c52:
  1576. r0 = 0
  1577. L_0x0c53:
  1578. r15.setEnabled(r0)
  1579. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1580. android.widget.Button r15 = r15.contrastPlus
  1581. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1582. int r0 = r0.contrastValue
  1583. if (r0 == r4) goto L_0x0c66
  1584. r0 = 1
  1585. goto L_0x0c67
  1586. L_0x0c66:
  1587. r0 = 0
  1588. L_0x0c67:
  1589. r15.setEnabled(r0)
  1590. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1591. android.widget.TextView r15 = r15.saturation
  1592. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1593. int r0 = r0.saturationValue
  1594. java.lang.String r0 = java.lang.String.valueOf(r0)
  1595. r15.setText(r0)
  1596. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1597. android.widget.Button r15 = r15.saturationMinus
  1598. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1599. int r0 = r0.saturationValue
  1600. if (r0 == r3) goto L_0x0c8d
  1601. r0 = 1
  1602. goto L_0x0c8e
  1603. L_0x0c8d:
  1604. r0 = 0
  1605. L_0x0c8e:
  1606. r15.setEnabled(r0)
  1607. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1608. android.widget.Button r15 = r15.saturationPlus
  1609. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1610. int r0 = r0.saturationValue
  1611. if (r0 == r4) goto L_0x0ca0
  1612. r1 = 1
  1613. L_0x0ca0:
  1614. r15.setEnabled(r1)
  1615. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1616. r15.updateSettingView()
  1617. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1618. java.lang.Boolean r0 = java.lang.Boolean.valueOf(r2)
  1619. r15.setScreenState(r0)
  1620. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1621. boolean r0 = r15.undoFlag
  1622. boolean unused = r15.updateSupportedMediaFile(r0)
  1623. goto L_0x0e25
  1624. L_0x0cba:
  1625. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1626. epson.print.service.IEpsonService r15 = r15.mEpsonService
  1627. if (r15 != 0) goto L_0x0ccb
  1628. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1629. android.os.Handler r15 = r15.mHandler
  1630. r15.sendEmptyMessageDelayed(r5, r8)
  1631. goto L_0x0e25
  1632. L_0x0ccb:
  1633. java.lang.String r15 = "SettingScr"
  1634. java.lang.String r0 = "GET_DUPLEX"
  1635. epson.print.Util.EPLog.i(r15, r0)
  1636. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1637. int[] unused = r15.duplex_info = r7
  1638. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0cee }
  1639. epson.print.service.IEpsonService r15 = r15.mEpsonService // Catch:{ RemoteException -> 0x0cee }
  1640. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0cee }
  1641. int r0 = r0.sizeIndex // Catch:{ RemoteException -> 0x0cee }
  1642. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this // Catch:{ RemoteException -> 0x0cee }
  1643. int r3 = r3.typeIndex // Catch:{ RemoteException -> 0x0cee }
  1644. int r15 = r15.getDuplex(r0, r3) // Catch:{ RemoteException -> 0x0cee }
  1645. goto L_0x0cf7
  1646. L_0x0cee:
  1647. r15 = move-exception
  1648. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1649. r0.undoFlag = r2
  1650. r15.printStackTrace()
  1651. r15 = 0
  1652. L_0x0cf7:
  1653. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1654. java.lang.String r0 = r0.printerId
  1655. if (r0 != 0) goto L_0x0d2e
  1656. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1657. int r0 = r0.paperType
  1658. com.epson.mobilephone.common.PrintingLib.define.Constants$MediaName r3 = com.epson.mobilephone.common.PrintingLib.define.Constants.MediaName.EPS_MTID_PLAIN
  1659. int r3 = r3.getCode()
  1660. if (r0 != r3) goto L_0x0d2e
  1661. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1662. int[] r0 = new int[r6]
  1663. int[] unused = r15.duplex_info = r0
  1664. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1665. int[] r15 = r15.duplex_info
  1666. r15[r1] = r1
  1667. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1668. int[] r15 = r15.duplex_info
  1669. r15[r2] = r2
  1670. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1671. int[] r15 = r15.duplex_info
  1672. r15[r10] = r10
  1673. goto L_0x0da4
  1674. L_0x0d2e:
  1675. if (r15 == 0) goto L_0x0d95
  1676. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1677. int r0 = r0.paperSource
  1678. r3 = 16
  1679. if (r0 == r3) goto L_0x0d95
  1680. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1681. int r0 = r0.layout
  1682. if (r0 != r2) goto L_0x0d75
  1683. r15 = r15 & r10
  1684. if (r15 == 0) goto L_0x0d65
  1685. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1686. int[] r0 = new int[r6]
  1687. int[] unused = r15.duplex_info = r0
  1688. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1689. int[] r15 = r15.duplex_info
  1690. r15[r1] = r1
  1691. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1692. int[] r15 = r15.duplex_info
  1693. r15[r2] = r2
  1694. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1695. int[] r15 = r15.duplex_info
  1696. r15[r10] = r10
  1697. goto L_0x0da4
  1698. L_0x0d65:
  1699. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1700. int[] r0 = new int[r2]
  1701. int[] unused = r15.duplex_info = r0
  1702. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1703. int[] r15 = r15.duplex_info
  1704. r15[r1] = r1
  1705. goto L_0x0da4
  1706. L_0x0d75:
  1707. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1708. int[] r0 = new int[r6]
  1709. int[] unused = r15.duplex_info = r0
  1710. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1711. int[] r15 = r15.duplex_info
  1712. r15[r1] = r1
  1713. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1714. int[] r15 = r15.duplex_info
  1715. r15[r2] = r2
  1716. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1717. int[] r15 = r15.duplex_info
  1718. r15[r10] = r10
  1719. goto L_0x0da4
  1720. L_0x0d95:
  1721. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1722. int[] r0 = new int[r2]
  1723. int[] unused = r15.duplex_info = r0
  1724. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1725. int[] r15 = r15.duplex_info
  1726. r15[r1] = r1
  1727. L_0x0da4:
  1728. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1729. int[] r15 = r15.duplex_info
  1730. if (r15 == 0) goto L_0x0e17
  1731. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1732. int[] r15 = r15.duplex_info
  1733. int r15 = r15.length
  1734. if (r15 <= 0) goto L_0x0e17
  1735. r15 = 0
  1736. L_0x0db6:
  1737. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1738. int[] r0 = r0.duplex_info
  1739. int r0 = r0.length
  1740. if (r15 >= r0) goto L_0x0dd3
  1741. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1742. int r0 = r0.duplex
  1743. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1744. int[] r3 = r3.duplex_info
  1745. r3 = r3[r15]
  1746. if (r0 != r3) goto L_0x0dd0
  1747. goto L_0x0dd3
  1748. L_0x0dd0:
  1749. int r15 = r15 + 1
  1750. goto L_0x0db6
  1751. L_0x0dd3:
  1752. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1753. int[] r0 = r0.duplex_info
  1754. int r0 = r0.length
  1755. if (r15 < r0) goto L_0x0de7
  1756. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1757. int[] r0 = r15.duplex_info
  1758. r0 = r0[r1]
  1759. int unused = r15.duplex = r0
  1760. L_0x0de7:
  1761. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1762. com.epson.mobilephone.common.escpr.MediaInfo$Duplex r0 = new com.epson.mobilephone.common.escpr.MediaInfo$Duplex
  1763. r0.<init>()
  1764. com.epson.mobilephone.common.escpr.MediaInfo.AbstractInfo unused = r15.mLookupTable = r0
  1765. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1766. android.widget.TextView r15 = r15.duplexInfo
  1767. epson.print.screen.SettingScr r0 = epson.print.screen.SettingScr.this
  1768. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r1 = r0.mLookupTable
  1769. epson.print.screen.SettingScr r3 = epson.print.screen.SettingScr.this
  1770. int r3 = r3.duplex
  1771. int r1 = r1.getStringId(r3)
  1772. java.lang.String r0 = r0.getString(r1)
  1773. r15.setText(r0)
  1774. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1775. com.epson.mobilephone.common.escpr.MediaInfo$AbstractInfo r15 = r15.mLookupTable
  1776. r15.destructor()
  1777. L_0x0e17:
  1778. java.lang.String r15 = "SettingScr"
  1779. java.lang.String r0 = "get Color setScreenState = true"
  1780. epson.print.Util.EPLog.i(r15, r0)
  1781. epson.print.screen.SettingScr r15 = epson.print.screen.SettingScr.this
  1782. android.os.Handler r15 = r15.mHandler
  1783. r15.sendEmptyMessage(r4)
  1784. L_0x0e25:
  1785. return r2
  1786. */
  1787. throw new UnsupportedOperationException("Method not decompiled: epson.print.screen.SettingScr.C23643.handleMessage(android.os.Message):boolean");
  1788. }
  1789. });
  1790. private MediaInfo.AbstractInfo mLookupTable;
  1791. private MediaInfo.AbstractInfo mPaperSizeType;
  1792. private boolean mPrinterSelectDone;
  1793. private int mSharpnessValue;
  1794. private TextView mSharpnessValueText;
  1795. private boolean mWaiteInkReplenProgress;
  1796. private int paperSize;
  1797. private TextView paperSizeInfo;
  1798. private int paperSource;
  1799. private TextView paperSourceInfo;
  1800. private int paperType;
  1801. private TextView paperTypeInfo;
  1802. private int[] paper_size_info = null;
  1803. private int[] paper_source_info = null;
  1804. private int[] paper_type_info = null;
  1805. private int photoApfValueForLocalPrinter;
  1806. private boolean printAll;
  1807. private TextView printDateInfo;
  1808. private int printdate;
  1809. private MyPrinter printer = null;
  1810. private String printerDeviceId;
  1811. private String printerEmailAddress;
  1812. private String printerId;
  1813. private String printerIp;
  1814. private int printerLocation;
  1815. private TextView printerName;
  1816. private String printerSerialNo;
  1817. private View progressGetOption;
  1818. private int quality;
  1819. private TextView qualityInfo;
  1820. private int[] quality_info = null;
  1821. private TextView saturation;
  1822. private Button saturationMinus;
  1823. private Button saturationPlus;
  1824. private int saturationValue;
  1825. private int sheets = 1;
  1826. private int sizeIndex = 0;
  1827. private int startValue;
  1828. private int typeIndex = 0;
  1829. boolean undoFlag = true;
  1830. static /* synthetic */ int access$1208(SettingScr settingScr) {
  1831. int i = settingScr.sizeIndex;
  1832. settingScr.sizeIndex = i + 1;
  1833. return i;
  1834. }
  1835. static /* synthetic */ int access$1708(SettingScr settingScr) {
  1836. int i = settingScr.typeIndex;
  1837. settingScr.typeIndex = i + 1;
  1838. return i;
  1839. }
  1840. protected void onCreate(Bundle bundle) {
  1841. super.onCreate(bundle);
  1842. setContentView((int) R.layout.setting_layout);
  1843. setActionBar((int) R.string.str_btn_printer_settings, true);
  1844. bindEpsonService();
  1845. this.mContext = this;
  1846. this.isDocumentSetting = getIntent().getBooleanExtra(PrintProgress.PARAM_DOCUMENT_MODE, false);
  1847. if (this.isDocumentSetting) {
  1848. this.sheets = getIntent().getIntExtra("SHEETS", 1);
  1849. this.disablePrintArea = getIntent().getBooleanExtra("PRINTAREA", false);
  1850. }
  1851. this.printerName = (TextView) findViewById(R.id.printer_name);
  1852. this.paperSizeInfo = (TextView) findViewById(R.id.paper_size_info);
  1853. this.paperTypeInfo = (TextView) findViewById(R.id.paper_type_info);
  1854. this.layoutInfo = (TextView) findViewById(R.id.layout_info);
  1855. this.qualityInfo = (TextView) findViewById(R.id.quality_info);
  1856. this.paperSourceInfo = (TextView) findViewById(R.id.paper_source_info);
  1857. this.copies = (TextView) findViewById(R.id.copies);
  1858. this.copiesMinus = (Button) findViewById(R.id.copies_minus_button);
  1859. this.copiesPlus = (Button) findViewById(R.id.copies_plus_button);
  1860. LongTapRepeatAdapter.bless(this.copiesMinus);
  1861. LongTapRepeatAdapter.bless(this.copiesPlus);
  1862. this.colorInfo = (TextView) findViewById(R.id.color_info);
  1863. this.duplexInfo = (TextView) findViewById(R.id.duplex_info);
  1864. this.feedDirectionInfo = (TextView) findViewById(R.id.feed_direction_info);
  1865. this.printDateInfo = (TextView) findViewById(R.id.printdate_info);
  1866. this.apfStateText = (TextView) findViewById(R.id.apf_setting_text);
  1867. this.mSharpnessValueText = (TextView) findViewById(R.id.sharpness_setting_text);
  1868. this.brightness = (TextView) findViewById(R.id.brightness);
  1869. this.brightnessMinus = (Button) findViewById(R.id.brightness_minus_button);
  1870. this.brightnessPlus = (Button) findViewById(R.id.brightness_plus_button);
  1871. this.contrast = (TextView) findViewById(R.id.contrast);
  1872. this.contrastMinus = (Button) findViewById(R.id.contrast_minus_button);
  1873. this.contrastPlus = (Button) findViewById(R.id.contrast_plus_button);
  1874. this.saturation = (TextView) findViewById(R.id.saturation);
  1875. this.saturationMinus = (Button) findViewById(R.id.saturation_minus_button);
  1876. this.saturationPlus = (Button) findViewById(R.id.saturation_plus_button);
  1877. this.progressGetOption = findViewById(R.id.progressGetOption);
  1878. this.enableShowPreview = getSharedPreferences(Constants.PREFS_EPSON_CONNECT, 0).getBoolean(Constants.ENABLE_SHOW_PREVIEW, true);
  1879. loadConfig();
  1880. setClickListener();
  1881. updatePrinterIcon();
  1882. if (this.printerId != null) {
  1883. this.undoFlag = false;
  1884. if (loadSupportedMediaFile()) {
  1885. this.mHandler.sendEmptyMessage(1);
  1886. } else {
  1887. this.mHandler.sendEmptyMessage(17);
  1888. }
  1889. } else {
  1890. this.mHandler.sendEmptyMessage(1);
  1891. }
  1892. }
  1893. private void updatePrinterIcon() {
  1894. if (this.printerName.getText().equals(getString(R.string.str_lbl_title_scan))) {
  1895. ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(8);
  1896. return;
  1897. }
  1898. ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(0);
  1899. switch (this.printerLocation) {
  1900. case 1:
  1901. ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setImageResource(R.drawable.print_local);
  1902. return;
  1903. case 2:
  1904. ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setImageResource(R.drawable.print_remote);
  1905. return;
  1906. case 3:
  1907. ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setImageResource(R.drawable.print_ip);
  1908. return;
  1909. default:
  1910. return;
  1911. }
  1912. }
  1913. private void setClickListener() {
  1914. this.copiesMinus.setOnClickListener(this);
  1915. this.copiesPlus.setOnClickListener(this);
  1916. this.brightnessMinus.setOnClickListener(this);
  1917. this.brightnessPlus.setOnClickListener(this);
  1918. this.contrastMinus.setOnClickListener(this);
  1919. this.contrastPlus.setOnClickListener(this);
  1920. this.saturationMinus.setOnClickListener(this);
  1921. this.saturationPlus.setOnClickListener(this);
  1922. if (this.isDocumentSetting) {
  1923. findViewById(R.id.page_range_setting).setOnClickListener(this);
  1924. }
  1925. findViewById(R.id.printer).setOnClickListener(this);
  1926. findViewById(R.id.paper_size).setOnClickListener(this);
  1927. findViewById(R.id.paper_type).setOnClickListener(this);
  1928. findViewById(R.id.layout).setOnClickListener(this);
  1929. findViewById(R.id.quality).setOnClickListener(this);
  1930. findViewById(R.id.paper_source).setOnClickListener(this);
  1931. findViewById(R.id.color).setOnClickListener(this);
  1932. findViewById(R.id.duplex).setOnClickListener(this);
  1933. findViewById(R.id.feed_direction).setOnClickListener(this);
  1934. findViewById(R.id.printdate).setOnClickListener(this);
  1935. findViewById(R.id.apf_setting_layout).setOnClickListener(this);
  1936. findViewById(R.id.sharpness_setting_layout).setOnClickListener(this);
  1937. }
  1938. private void loadConfig() {
  1939. MyPrinter curPrinter = MyPrinter.getCurPrinter(this);
  1940. if (curPrinter == null || curPrinter.getName() == null) {
  1941. this.printerName.setText(getString(R.string.str_lbl_title_scan));
  1942. } else {
  1943. this.printerName.setText(curPrinter.getUserDefName(this));
  1944. }
  1945. this.printerDeviceId = curPrinter.getName();
  1946. this.printerId = curPrinter.getPrinterId();
  1947. this.printerIp = curPrinter.getIp();
  1948. this.printerSerialNo = curPrinter.getSerialNo();
  1949. this.printerEmailAddress = curPrinter.getEmailAddress();
  1950. this.printerLocation = curPrinter.getLocation();
  1951. boolean z = true;
  1952. if (this.printerLocation == 0) {
  1953. this.printerLocation = 1;
  1954. }
  1955. this.autoConnectSsid = WiFiDirectManager.getConnectInfo(this, WiFiDirectManager.DEVICE_TYPE_PRINTER);
  1956. PrintSetting printSetting = new PrintSetting(this, this.isDocumentSetting ? PrintSetting.Kind.document : PrintSetting.Kind.photo);
  1957. printSetting.loadSettings();
  1958. this.mLookupTable = new MediaInfo.PaperSize();
  1959. this.paperSize = printSetting.paperSizeValue;
  1960. this.paperSizeInfo.setText(getString(this.mLookupTable.getStringId(this.paperSize)));
  1961. this.mLookupTable.destructor();
  1962. this.mLookupTable = new MediaInfo.PaperType();
  1963. this.paperType = printSetting.paperTypeValue;
  1964. this.paperTypeInfo.setText(getString(this.mLookupTable.getStringId(this.paperType)));
  1965. this.mLookupTable.destructor();
  1966. this.mPaperSizeType = printSetting.loadPaperSizeTypePear();
  1967. this.mPaperSizeType.putID(this.paperSize, this.paperType);
  1968. this.mLookupTable = new LayoutEx();
  1969. int i = printSetting.layoutMultiPageValue;
  1970. if (i != 0) {
  1971. this.layout = i;
  1972. } else {
  1973. this.layout = printSetting.layoutValue;
  1974. }
  1975. this.layoutInfo.setText(getString(this.mLookupTable.getStringId(this.layout)));
  1976. this.mLookupTable.destructor();
  1977. this.mLookupTable = new MediaInfo.Quality();
  1978. this.quality = printSetting.qualityValue;
  1979. this.qualityInfo.setText(getString(this.mLookupTable.getStringId(this.quality)));
  1980. this.mLookupTable.destructor();
  1981. this.mLookupTable = new MediaInfo.PaperSource();
  1982. this.paperSource = printSetting.paperSourceValue;
  1983. this.paperSourceInfo.setText(getString(this.mLookupTable.getStringId(this.paperSource)));
  1984. this.mLookupTable.destructor();
  1985. this.mLookupTable = new MediaInfo.Color();
  1986. this.color = printSetting.colorValue;
  1987. this.colorInfo.setText(getString(this.mLookupTable.getStringId(this.color)));
  1988. this.mLookupTable.destructor();
  1989. this.copiesValue = printSetting.copiesValue;
  1990. this.copies.setText(String.valueOf(this.copiesValue));
  1991. this.copiesMinus.setEnabled(this.copiesValue != 1);
  1992. Button button = this.copiesPlus;
  1993. if (this.copiesValue == 30) {
  1994. z = false;
  1995. }
  1996. button.setEnabled(z);
  1997. this.brightnessValue = printSetting.brightnessValue;
  1998. this.contrastValue = printSetting.contrastValue;
  1999. this.saturationValue = printSetting.saturationValue;
  2000. this.mLookupTable = new MediaInfo.Duplex();
  2001. this.duplex = printSetting.duplexValue;
  2002. this.duplexInfo.setText(getString(this.mLookupTable.getStringId(this.duplex)));
  2003. this.mLookupTable.destructor();
  2004. this.mLookupTable = new MediaInfo.FeedDirection();
  2005. this.feedDirection = printSetting.feedDirectionValue;
  2006. this.feedDirectionInfo.setText(getString(this.mLookupTable.getStringId(this.feedDirection)));
  2007. this.mLookupTable.destructor();
  2008. this.lang = curPrinter.getLang();
  2009. if (this.isDocumentSetting) {
  2010. this.printAll = printSetting.printAll;
  2011. this.startValue = printSetting.startValue;
  2012. this.endValue = printSetting.endValue;
  2013. ((TextView) findViewById(R.id.page_range_value)).setText(this.startValue + ".." + this.endValue);
  2014. return;
  2015. }
  2016. this.mLookupTable = new MediaInfo.PrintDate();
  2017. this.printdate = printSetting.printdate;
  2018. this.printDateInfo.setText(getString(this.mLookupTable.getStringId(this.printdate)));
  2019. this.mLookupTable.destructor();
  2020. this.photoApfValueForLocalPrinter = printSetting.photoApfValueForLocalPrinter;
  2021. displayApfState(this.photoApfValueForLocalPrinter);
  2022. this.mSharpnessValue = printSetting.sharpnessForPhoto;
  2023. displaySharpnessState(this.mSharpnessValue);
  2024. }
  2025. private void displayApfState(int i) {
  2026. MediaInfo.ApfState apfState = new MediaInfo.ApfState();
  2027. this.apfStateText.setText(apfState.getStringId(i));
  2028. apfState.destructor();
  2029. }
  2030. private void displaySharpnessState(int i) {
  2031. MediaInfo.SharpnessState sharpnessState = new MediaInfo.SharpnessState();
  2032. this.mSharpnessValueText.setText(sharpnessState.getStringId(i));
  2033. sharpnessState.destructor();
  2034. }
  2035. private boolean loadSupportedMediaFile() {
  2036. ExternalFileUtils instance = ExternalFileUtils.getInstance(this);
  2037. File savedSupportedMedia = instance.getSavedSupportedMedia();
  2038. File supportedMedia = instance.getSupportedMedia();
  2039. File preSupportedMedia = instance.getPreSupportedMedia();
  2040. EPLog.i("PrintSetting", "call loadSupportedMedia");
  2041. try {
  2042. if (!savedSupportedMedia.exists()) {
  2043. EPLog.w("loadSupportedMedia", savedSupportedMedia.getName() + " not exist");
  2044. return false;
  2045. }
  2046. Utils.copyFile(savedSupportedMedia, supportedMedia);
  2047. Utils.copyFile(savedSupportedMedia, preSupportedMedia);
  2048. File savedAreaInfo = instance.getSavedAreaInfo();
  2049. File areaInfo = instance.getAreaInfo();
  2050. File preAreaInfo = instance.getPreAreaInfo();
  2051. try {
  2052. if (!savedAreaInfo.exists()) {
  2053. return true;
  2054. }
  2055. Utils.copyFile(savedAreaInfo, areaInfo);
  2056. Utils.copyFile(savedAreaInfo, preAreaInfo);
  2057. return true;
  2058. } catch (Exception e) {
  2059. EPLog.w("loadSupportedMedia", "failure " + e.getMessage());
  2060. return false;
  2061. }
  2062. } catch (Exception e2) {
  2063. EPLog.w("loadSupportedMedia", "failure " + e2.getMessage());
  2064. return false;
  2065. }
  2066. }
  2067. private boolean updateSupportedMediaFile(boolean z) {
  2068. ExternalFileUtils instance = ExternalFileUtils.getInstance(this);
  2069. EPLog.i("PrintSetting", "call updateSupportedMedia");
  2070. File supportedMedia = instance.getSupportedMedia();
  2071. File preSupportedMedia = instance.getPreSupportedMedia();
  2072. if (z) {
  2073. File file = preSupportedMedia;
  2074. preSupportedMedia = supportedMedia;
  2075. supportedMedia = file;
  2076. }
  2077. try {
  2078. Utils.copyFile(supportedMedia, preSupportedMedia);
  2079. File areaInfo = instance.getAreaInfo();
  2080. File preAreaInfo = instance.getPreAreaInfo();
  2081. if (!z) {
  2082. File file2 = areaInfo;
  2083. areaInfo = preAreaInfo;
  2084. preAreaInfo = file2;
  2085. }
  2086. try {
  2087. if (!preAreaInfo.exists()) {
  2088. return true;
  2089. }
  2090. Utils.copyFile(preAreaInfo, areaInfo);
  2091. return true;
  2092. } catch (Exception e) {
  2093. if (preAreaInfo != null && preAreaInfo.exists()) {
  2094. preAreaInfo.delete();
  2095. }
  2096. if (areaInfo != null && areaInfo.exists()) {
  2097. areaInfo.delete();
  2098. }
  2099. EPLog.w("updateSupportedMediaFile", "failure " + e.getMessage());
  2100. return false;
  2101. }
  2102. } catch (Exception e2) {
  2103. if (supportedMedia != null && supportedMedia.exists()) {
  2104. supportedMedia.delete();
  2105. }
  2106. if (preSupportedMedia != null && preSupportedMedia.exists()) {
  2107. preSupportedMedia.delete();
  2108. }
  2109. EPLog.w("updateSupportedMediaFile", "failure " + e2.getMessage());
  2110. return false;
  2111. }
  2112. }
  2113. private boolean saveSupportedMediaFile() {
  2114. ExternalFileUtils instance = ExternalFileUtils.getInstance(this);
  2115. EPLog.i("PrintSetting", "call saveSupportedMedia");
  2116. File supportedMedia = instance.getSupportedMedia();
  2117. File savedSupportedMedia = instance.getSavedSupportedMedia();
  2118. try {
  2119. if (!supportedMedia.exists()) {
  2120. EPLog.w("updateSupportedMediaFile", supportedMedia.getName() + " not exist");
  2121. return false;
  2122. }
  2123. Utils.copyFile(supportedMedia, savedSupportedMedia);
  2124. File areaInfo = instance.getAreaInfo();
  2125. File savedAreaInfo = instance.getSavedAreaInfo();
  2126. int i = this.printerLocation;
  2127. if (i == 1 || i == 3) {
  2128. try {
  2129. if (!areaInfo.exists()) {
  2130. EPLog.w("updateSupportedMediaFile", areaInfo.getName() + " not exist");
  2131. return false;
  2132. }
  2133. Utils.copyFile(areaInfo, savedAreaInfo);
  2134. } catch (Exception e) {
  2135. EPLog.w("saveSupportedMediaFile", "failure " + e.getMessage());
  2136. return false;
  2137. }
  2138. } else {
  2139. EPLog.i("PrintSetting", "delete AreaInfo");
  2140. instance.removeAreaInfo();
  2141. }
  2142. return true;
  2143. } catch (Exception e2) {
  2144. EPLog.w("saveSupportedMediaFile", "failure " + e2.getMessage());
  2145. return false;
  2146. }
  2147. }
  2148. private void saveChanged() {
  2149. SharedPreferences.Editor edit = getSharedPreferences("PrintSetting", 0).edit();
  2150. edit.putInt(Constants.PREFS_INFO_PRINT_SAVE, 1);
  2151. edit.commit();
  2152. MyPrinter myPrinter = new MyPrinter(this.printerDeviceId, this.printerIp, this.printerId, this.printerSerialNo, this.printerEmailAddress, this.printerLocation);
  2153. myPrinter.setLang(this.lang);
  2154. myPrinter.setCurPrinter(this);
  2155. PrintSetting printSetting = new PrintSetting(this, this.isDocumentSetting ? PrintSetting.Kind.document : PrintSetting.Kind.photo);
  2156. printSetting.paperSizeValue = this.paperSize;
  2157. printSetting.paperTypeValue = this.paperType;
  2158. int i = this.layout;
  2159. if ((-65536 & i) != 0) {
  2160. printSetting.layoutValue = 2;
  2161. printSetting.layoutMultiPageValue = i;
  2162. } else {
  2163. printSetting.layoutValue = i;
  2164. printSetting.layoutMultiPageValue = 0;
  2165. }
  2166. printSetting.qualityValue = this.quality;
  2167. printSetting.paperSourceValue = this.paperSource;
  2168. printSetting.colorValue = this.color;
  2169. printSetting.duplexValue = this.duplex;
  2170. printSetting.feedDirectionValue = this.feedDirection;
  2171. printSetting.copiesValue = this.copiesValue;
  2172. printSetting.brightnessValue = this.brightnessValue;
  2173. printSetting.contrastValue = this.contrastValue;
  2174. printSetting.saturationValue = this.saturationValue;
  2175. if (this.isDocumentSetting) {
  2176. printSetting.printAll = this.printAll;
  2177. printSetting.startValue = this.startValue;
  2178. printSetting.endValue = this.endValue;
  2179. } else {
  2180. printSetting.printdate = this.printdate;
  2181. printSetting.photoApfValueForLocalPrinter = this.photoApfValueForLocalPrinter;
  2182. printSetting.sharpnessForPhoto = this.mSharpnessValue;
  2183. }
  2184. printSetting.saveSettings();
  2185. printSetting.savePaperSizeTypePear((MediaInfo.PaperSizeType) this.mPaperSizeType);
  2186. saveSupportedMediaFile();
  2187. String str = this.autoConnectSsid;
  2188. if (str == null || str.length() <= 0) {
  2189. WiFiDirectManager.resetConnectInfo(this, WiFiDirectManager.DEVICE_TYPE_PRINTER);
  2190. } else {
  2191. WiFiDirectManager.setConnectInfo(this, this.autoConnectSsid, WiFiDirectManager.DEVICE_TYPE_PRINTER, myPrinter.getName());
  2192. }
  2193. EPPrinterManager ePPrinterManager = new EPPrinterManager(this.mContext);
  2194. ePPrinterManager.commitIPPrinterInfo();
  2195. ePPrinterManager.commitRemotePrinterInfo();
  2196. refreshRemoteServiceRemotePrinter();
  2197. if (this.mPrinterSelectDone) {
  2198. new InkRplnRepository(false).savePermanently(this);
  2199. }
  2200. }
  2201. private void refreshRemoteServiceRemotePrinter() {
  2202. IEpsonService iEpsonService = this.mEpsonService;
  2203. if (iEpsonService != null) {
  2204. try {
  2205. iEpsonService.refreshRemotePrinterLogin();
  2206. } catch (RemoteException unused) {
  2207. }
  2208. }
  2209. }
  2210. protected void onDestroy() {
  2211. super.onDestroy();
  2212. unbindEpsonService();
  2213. EPLog.i("SettingScr", "onDestroy");
  2214. this.mPaperSizeType.destructor();
  2215. }
  2216. private void bindEpsonService() {
  2217. EPLog.v("SettingScr", "bindEpsonService");
  2218. if (this.mEpsonService == null) {
  2219. bindService(new Intent(this, EpsonService.class), this.mEpsonConnection, 1);
  2220. }
  2221. }
  2222. private void unbindEpsonService() {
  2223. EPLog.v("SettingScr", "unbindEpsonService");
  2224. IEpsonService iEpsonService = this.mEpsonService;
  2225. if (iEpsonService != null) {
  2226. try {
  2227. iEpsonService.unregisterCallback(this.mCallback);
  2228. unbindService(this.mEpsonConnection);
  2229. this.mEpsonService = null;
  2230. } catch (RemoteException e) {
  2231. e.printStackTrace();
  2232. }
  2233. }
  2234. }
  2235. public void onClick(View view) {
  2236. if (this.progressGetOption.getVisibility() == 8) {
  2237. IEpsonService iEpsonService = this.mEpsonService;
  2238. if (iEpsonService != null) {
  2239. try {
  2240. iEpsonService.cancelSearchPrinter();
  2241. } catch (RemoteException e) {
  2242. e.printStackTrace();
  2243. }
  2244. }
  2245. switch (view.getId()) {
  2246. case R.id.apf_setting_layout /*2131230819*/:
  2247. launchDetailScreen(this.photoApfValueForLocalPrinter, R.id.apf_setting_layout);
  2248. return;
  2249. case R.id.brightness_minus_button /*2131230848*/:
  2250. this.brightnessValue--;
  2251. if (this.brightnessValue <= -50) {
  2252. this.brightnessValue = -50;
  2253. this.brightnessMinus.setEnabled(false);
  2254. } else {
  2255. this.brightnessMinus.setEnabled(true);
  2256. }
  2257. this.brightnessPlus.setEnabled(true);
  2258. this.brightness.setText(String.valueOf(this.brightnessValue));
  2259. return;
  2260. case R.id.brightness_plus_button /*2131230850*/:
  2261. this.brightnessValue++;
  2262. if (this.brightnessValue >= 50) {
  2263. this.brightnessValue = 50;
  2264. this.brightnessPlus.setEnabled(false);
  2265. } else {
  2266. this.brightnessPlus.setEnabled(true);
  2267. }
  2268. this.brightnessMinus.setEnabled(true);
  2269. this.brightness.setText(String.valueOf(this.brightnessValue));
  2270. return;
  2271. case R.id.color /*2131230930*/:
  2272. launchDetailScreen(this.color, R.id.color);
  2273. return;
  2274. case R.id.contrast_minus_button /*2131230942*/:
  2275. this.contrastValue--;
  2276. if (this.contrastValue <= -50) {
  2277. this.contrastValue = -50;
  2278. this.contrastMinus.setEnabled(false);
  2279. } else {
  2280. this.contrastMinus.setEnabled(true);
  2281. }
  2282. this.contrastPlus.setEnabled(true);
  2283. this.contrast.setText(String.valueOf(this.contrastValue));
  2284. return;
  2285. case R.id.contrast_plus_button /*2131230943*/:
  2286. this.contrastValue++;
  2287. if (this.contrastValue >= 50) {
  2288. this.contrastValue = 50;
  2289. this.contrastPlus.setEnabled(false);
  2290. } else {
  2291. this.contrastPlus.setEnabled(true);
  2292. }
  2293. this.contrastMinus.setEnabled(true);
  2294. this.contrast.setText(String.valueOf(this.contrastValue));
  2295. return;
  2296. case R.id.copies_minus_button /*2131230945*/:
  2297. this.copiesValue--;
  2298. if (this.copiesValue <= 1) {
  2299. this.copiesValue = 1;
  2300. this.copiesMinus.setEnabled(false);
  2301. } else {
  2302. this.copiesMinus.setEnabled(true);
  2303. }
  2304. this.copiesPlus.setEnabled(true);
  2305. this.copies.setText(String.valueOf(this.copiesValue));
  2306. return;
  2307. case R.id.copies_plus_button /*2131230946*/:
  2308. this.copiesValue++;
  2309. if (this.copiesValue >= 30) {
  2310. this.copiesValue = 30;
  2311. this.copiesPlus.setEnabled(false);
  2312. } else {
  2313. this.copiesPlus.setEnabled(true);
  2314. }
  2315. this.copiesMinus.setEnabled(true);
  2316. this.copies.setText(String.valueOf(this.copiesValue));
  2317. return;
  2318. case R.id.duplex /*2131231005*/:
  2319. launchDetailScreen(this.duplex, R.id.duplex);
  2320. return;
  2321. case R.id.feed_direction /*2131231037*/:
  2322. launchDetailScreen(this.feedDirection, R.id.feed_direction);
  2323. return;
  2324. case R.id.layout /*2131231158*/:
  2325. launchDetailScreen(this.layout, R.id.layout);
  2326. return;
  2327. case R.id.page_range_setting /*2131231300*/:
  2328. Intent intent = new Intent(this, PageRangeSetting.class);
  2329. intent.putExtra("SHEETS", this.sheets);
  2330. intent.putExtra("printAll", this.printAll);
  2331. intent.putExtra("startValue", this.startValue);
  2332. intent.putExtra("endValue", this.endValue);
  2333. startActivityForResult(intent, 2);
  2334. return;
  2335. case R.id.paper_size /*2131231306*/:
  2336. launchDetailScreen(this.paperSize, R.id.paper_size);
  2337. return;
  2338. case R.id.paper_source /*2131231311*/:
  2339. int i = this.paperSource;
  2340. int[] iArr = this.paper_source_info;
  2341. if (iArr != null && iArr.length <= 1) {
  2342. i = 128;
  2343. }
  2344. launchDetailScreen(i, R.id.paper_source);
  2345. return;
  2346. case R.id.paper_type /*2131231314*/:
  2347. launchDetailScreen(this.paperType, R.id.paper_type);
  2348. return;
  2349. case R.id.printdate /*2131231355*/:
  2350. launchDetailScreen(this.printdate, R.id.printdate);
  2351. return;
  2352. case R.id.printer /*2131231358*/:
  2353. unbindEpsonService();
  2354. new AsyncTask<Void, Void, Void>() {
  2355. protected void onPreExecute() {
  2356. SettingScr.this.findViewById(R.id.printer).setClickable(false);
  2357. }
  2358. protected Void doInBackground(Void... voidArr) {
  2359. SettingScr settingScr = SettingScr.this;
  2360. WiFiDirectManager.disconnect(settingScr, WiFiDirectManager.DEVICE_TYPE_PRINTER, settingScr.printerIp);
  2361. SettingScr settingScr2 = SettingScr.this;
  2362. WiFiDirectManager.disconnectSimpleAP(settingScr2, settingScr2.autoConnectSsid, SettingScr.this.printerIp);
  2363. return null;
  2364. }
  2365. protected void onPostExecute(Void voidR) {
  2366. Intent intent = new Intent(SettingScr.this, SearchPrinterScr.class);
  2367. Bundle bundle = new Bundle();
  2368. bundle.putString(Constants.PRINTER_ID, SettingScr.this.printerId);
  2369. bundle.putString(Constants.PRINTER_IP, SettingScr.this.printerIp);
  2370. bundle.putString(Constants.PRINTER_EMAIL_ADDRESS, SettingScr.this.printerEmailAddress);
  2371. bundle.putInt(Constants.PRINTER_LOCATION, SettingScr.this.printerLocation);
  2372. bundle.putString(SettingScr.EXTRA_SIMPLEAP, SettingScr.this.autoConnectSsid);
  2373. intent.putExtras(bundle);
  2374. SettingScr.this.startActivityForResult(intent, 0);
  2375. SettingScr.this.findViewById(R.id.printer).setClickable(true);
  2376. }
  2377. }.execute(new Void[0]);
  2378. return;
  2379. case R.id.quality /*2131231392*/:
  2380. launchDetailScreen(this.quality, R.id.quality);
  2381. return;
  2382. case R.id.saturation_minus_button /*2131231425*/:
  2383. this.saturationValue--;
  2384. if (this.saturationValue <= -50) {
  2385. this.saturationValue = -50;
  2386. this.saturationMinus.setEnabled(false);
  2387. } else {
  2388. this.saturationMinus.setEnabled(true);
  2389. }
  2390. this.saturationPlus.setEnabled(true);
  2391. this.saturation.setText(String.valueOf(this.saturationValue));
  2392. return;
  2393. case R.id.saturation_plus_button /*2131231426*/:
  2394. this.saturationValue++;
  2395. if (this.saturationValue >= 50) {
  2396. this.saturationValue = 50;
  2397. this.saturationPlus.setEnabled(false);
  2398. } else {
  2399. this.saturationPlus.setEnabled(true);
  2400. }
  2401. this.saturationMinus.setEnabled(true);
  2402. this.saturation.setText(String.valueOf(this.saturationValue));
  2403. return;
  2404. case R.id.sharpness_setting_layout /*2131231482*/:
  2405. launchDetailScreen(this.mSharpnessValue, R.id.sharpness_setting_layout);
  2406. return;
  2407. default:
  2408. return;
  2409. }
  2410. }
  2411. }
  2412. private void launchDetailScreen(int i, int i2) {
  2413. Intent intent = new Intent(this, PrinterInfoDetail.class);
  2414. Bundle bundle = new Bundle();
  2415. bundle.putInt("ID", i2);
  2416. bundle.putInt("sizeIndex", this.sizeIndex);
  2417. bundle.putInt("typeIndex", this.typeIndex);
  2418. bundle.putInt("curValue", i);
  2419. bundle.putBoolean("isDocumentSetting", this.isDocumentSetting);
  2420. switch (i2) {
  2421. case R.id.color /*2131230930*/:
  2422. bundle.putIntArray(Constants.COLOR_INFO, this.color_info);
  2423. break;
  2424. case R.id.duplex /*2131231005*/:
  2425. bundle.putIntArray(Constants.DUPLEX_INFO, this.duplex_info);
  2426. break;
  2427. case R.id.layout /*2131231158*/:
  2428. bundle.putIntArray(Constants.LAYOUT_INFO, this.layout_info);
  2429. break;
  2430. case R.id.paper_size /*2131231306*/:
  2431. bundle.putIntArray(Constants.PAPER_SIZE_INFO, this.paper_size_info);
  2432. break;
  2433. case R.id.paper_source /*2131231311*/:
  2434. int[] iArr = this.paper_source_info;
  2435. bundle.putIntArray(Constants.PAPER_SOURCE_INFO, (iArr == null || iArr.length > 1) ? this.paper_source_info : new int[]{128});
  2436. break;
  2437. case R.id.paper_type /*2131231314*/:
  2438. bundle.putIntArray(Constants.PAPER_TYPE_INFO, this.paper_type_info);
  2439. break;
  2440. case R.id.quality /*2131231392*/:
  2441. bundle.putIntArray(Constants.PRINT_QUALITY_INFO, this.quality_info);
  2442. break;
  2443. }
  2444. intent.putExtras(bundle);
  2445. startActivityForResult(intent, 1);
  2446. }
  2447. protected void onActivityResult(int i, int i2, Intent intent) {
  2448. super.onActivityResult(i, i2, intent);
  2449. String callingPackage = getCallingPackage();
  2450. EPLog.i(callingPackage, "requestCode = " + i + " resultCode = " + i2);
  2451. if (i != 0) {
  2452. if (i != 4) {
  2453. if (i != 2) {
  2454. int i3 = 1;
  2455. if (i == 1 && i2 == -1) {
  2456. int i4 = intent.getExtras().getInt("curValue");
  2457. switch (intent.getExtras().getInt("ID")) {
  2458. case R.id.apf_setting_layout /*2131230819*/:
  2459. if (i4 != 1) {
  2460. i3 = 0;
  2461. }
  2462. this.photoApfValueForLocalPrinter = i3;
  2463. displayApfState(this.photoApfValueForLocalPrinter);
  2464. break;
  2465. case R.id.color /*2131230930*/:
  2466. this.mLookupTable = new MediaInfo.Color();
  2467. this.colorInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2468. this.mLookupTable.destructor();
  2469. this.color = i4;
  2470. break;
  2471. case R.id.duplex /*2131231005*/:
  2472. this.mLookupTable = new MediaInfo.Duplex();
  2473. this.duplexInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2474. this.mLookupTable.destructor();
  2475. this.duplex = i4;
  2476. break;
  2477. case R.id.feed_direction /*2131231037*/:
  2478. this.mLookupTable = new MediaInfo.FeedDirection();
  2479. this.feedDirectionInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2480. this.mLookupTable.destructor();
  2481. this.feedDirection = i4;
  2482. break;
  2483. case R.id.layout /*2131231158*/:
  2484. this.mLookupTable = new LayoutEx();
  2485. this.layoutInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2486. this.mLookupTable.destructor();
  2487. this.layout = i4;
  2488. this.undoFlag = false;
  2489. this.mHandler.sendEmptyMessage(32);
  2490. break;
  2491. case R.id.paper_size /*2131231306*/:
  2492. this.sizeIndex = intent.getExtras().getInt("INDEX");
  2493. this.mLookupTable = new MediaInfo.PaperSize();
  2494. this.paperSizeInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2495. this.mLookupTable.destructor();
  2496. this.paperSize = i4;
  2497. this.paperType = this.mPaperSizeType.getID(this.paperSize);
  2498. this.undoFlag = false;
  2499. this.mHandler.sendEmptyMessage(2);
  2500. break;
  2501. case R.id.paper_source /*2131231311*/:
  2502. this.mLookupTable = new MediaInfo.PaperSource();
  2503. this.paperSourceInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2504. this.mLookupTable.destructor();
  2505. int[] iArr = this.paper_source_info;
  2506. if (iArr != null && iArr.length > 1) {
  2507. this.paperSource = i4;
  2508. }
  2509. this.undoFlag = false;
  2510. this.mHandler.sendEmptyMessage(32);
  2511. break;
  2512. case R.id.paper_type /*2131231314*/:
  2513. this.typeIndex = intent.getExtras().getInt("INDEX");
  2514. this.mLookupTable = new MediaInfo.PaperType();
  2515. this.paperTypeInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2516. this.mLookupTable.destructor();
  2517. this.paperType = i4;
  2518. this.mPaperSizeType.putID(this.paperSize, this.paperType);
  2519. this.undoFlag = false;
  2520. this.mHandler.sendEmptyMessage(3);
  2521. break;
  2522. case R.id.printdate /*2131231355*/:
  2523. this.mLookupTable = new MediaInfo.PrintDate();
  2524. this.printDateInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2525. this.mLookupTable.destructor();
  2526. this.printdate = i4;
  2527. break;
  2528. case R.id.quality /*2131231392*/:
  2529. this.mLookupTable = new MediaInfo.Quality();
  2530. this.qualityInfo.setText(getString(this.mLookupTable.getStringId(i4)));
  2531. this.mLookupTable.destructor();
  2532. this.quality = i4;
  2533. break;
  2534. case R.id.sharpness_setting_layout /*2131231482*/:
  2535. if (i4 != 1) {
  2536. i3 = 0;
  2537. }
  2538. this.mSharpnessValue = i3;
  2539. displaySharpnessState(this.mSharpnessValue);
  2540. break;
  2541. }
  2542. }
  2543. } else if (i2 == -1) {
  2544. this.printAll = intent.getExtras().getBoolean("printAll");
  2545. this.startValue = intent.getExtras().getInt("startValue");
  2546. this.endValue = intent.getExtras().getInt("endValue");
  2547. this.mHandler.sendEmptyMessage(64);
  2548. }
  2549. } else {
  2550. endInkReplAndGoProbePrinter();
  2551. }
  2552. } else {
  2553. onPrinterSelectEnd(i2, intent);
  2554. }
  2555. updatePrinterIcon();
  2556. }
  2557. /* JADX WARNING: Can't fix incorrect switch cases order */
  2558. /* JADX WARNING: Code restructure failed: missing block: B:25:0x00ea, code lost:
  2559. if (r7.loadIpPrinterInfo(r6.printerId) == null) goto L_0x00f7;
  2560. */
  2561. /* JADX WARNING: Code restructure failed: missing block: B:27:0x00f3, code lost:
  2562. if (r7.loadRemotePrinterInfo(r6.printerEmailAddress) == null) goto L_0x00f7;
  2563. */
  2564. /* Code decompiled incorrectly, please refer to instructions dump. */
  2565. private void onPrinterSelectEnd(int r7, android.content.Intent r8) {
  2566. /*
  2567. r6 = this;
  2568. r0 = 0
  2569. r1 = 1
  2570. r2 = -1
  2571. if (r7 != r2) goto L_0x00d6
  2572. android.os.Bundle r7 = r8.getExtras()
  2573. java.lang.String r2 = "myprinter"
  2574. android.os.Parcelable r7 = r7.getParcelable(r2)
  2575. epson.print.MyPrinter r7 = (epson.print.MyPrinter) r7
  2576. r6.printer = r7
  2577. android.widget.TextView r7 = r6.printerName
  2578. epson.print.MyPrinter r2 = r6.printer
  2579. java.lang.String r2 = r2.getName()
  2580. r7.setText(r2)
  2581. epson.print.MyPrinter r7 = r6.printer
  2582. java.lang.String r7 = r7.getName()
  2583. r6.printerDeviceId = r7
  2584. epson.print.MyPrinter r7 = r6.printer
  2585. java.lang.String r7 = r7.getPrinterId()
  2586. r6.printerId = r7
  2587. epson.print.MyPrinter r7 = r6.printer
  2588. java.lang.String r7 = r7.getIp()
  2589. r6.printerIp = r7
  2590. epson.print.MyPrinter r7 = r6.printer
  2591. java.lang.String r7 = r7.getSerialNo()
  2592. r6.printerSerialNo = r7
  2593. epson.print.MyPrinter r7 = r6.printer
  2594. java.lang.String r7 = r7.getEmailAddress()
  2595. r6.printerEmailAddress = r7
  2596. epson.print.MyPrinter r7 = r6.printer
  2597. int r7 = r7.getLocation()
  2598. r6.printerLocation = r7
  2599. epson.print.EPPrinterManager r7 = new epson.print.EPPrinterManager
  2600. r7.<init>(r6)
  2601. int r2 = r6.printerLocation
  2602. switch(r2) {
  2603. case 2: goto L_0x0075;
  2604. case 3: goto L_0x0059;
  2605. default: goto L_0x0058;
  2606. }
  2607. L_0x0058:
  2608. goto L_0x0090
  2609. L_0x0059:
  2610. java.lang.String r2 = r6.printerId
  2611. epson.print.EPPrinterInfo r7 = r7.loadIpPrinterInfo(r2)
  2612. if (r7 == 0) goto L_0x0090
  2613. java.lang.String r2 = r7.userDefName
  2614. if (r2 == 0) goto L_0x0090
  2615. java.lang.String r2 = r7.userDefName
  2616. int r2 = r2.length()
  2617. if (r2 <= 0) goto L_0x0090
  2618. android.widget.TextView r2 = r6.printerName
  2619. java.lang.String r7 = r7.userDefName
  2620. r2.setText(r7)
  2621. goto L_0x0090
  2622. L_0x0075:
  2623. java.lang.String r2 = r6.printerEmailAddress
  2624. epson.print.EPPrinterInfo r7 = r7.loadRemotePrinterInfo(r2)
  2625. if (r7 == 0) goto L_0x0090
  2626. java.lang.String r2 = r7.userDefName
  2627. if (r2 == 0) goto L_0x0090
  2628. java.lang.String r2 = r7.userDefName
  2629. int r2 = r2.length()
  2630. if (r2 <= 0) goto L_0x0090
  2631. android.widget.TextView r2 = r6.printerName
  2632. java.lang.String r7 = r7.userDefName
  2633. r2.setText(r7)
  2634. L_0x0090:
  2635. android.os.Bundle r7 = r8.getExtras()
  2636. java.lang.String r8 = "simpleap"
  2637. java.lang.String r7 = r7.getString(r8)
  2638. r6.autoConnectSsid = r7
  2639. android.content.Context r7 = r6.getApplicationContext()
  2640. java.lang.String r8 = "PrintSetting"
  2641. java.lang.String r2 = "RE_SEARCH"
  2642. epson.common.Utils.savePref((android.content.Context) r7, (java.lang.String) r8, (java.lang.String) r2, (boolean) r1)
  2643. r6.undoFlag = r0
  2644. r6.mPrinterSelectDone = r1
  2645. r6.mWaiteInkReplenProgress = r1
  2646. android.content.Context r7 = r6.getApplicationContext()
  2647. java.lang.String r8 = r6.printerId
  2648. boolean r7 = epson.print.inkrpln.InkReplnHelper.isSimpleApOrP2p(r7, r8)
  2649. if (r7 != 0) goto L_0x00d2
  2650. epson.print.inkrpln.PrintSettingDependencyBuilder r7 = new epson.print.inkrpln.PrintSettingDependencyBuilder
  2651. java.lang.String r1 = r6.printerId
  2652. java.lang.String r2 = r6.printerIp
  2653. java.lang.String r3 = r6.printerSerialNo
  2654. int r4 = r6.printerLocation
  2655. java.lang.String r5 = r6.printerDeviceId
  2656. r0 = r7
  2657. r0.<init>(r1, r2, r3, r4, r5)
  2658. android.content.Intent r7 = epson.print.inkrpln.InkRplnProgressDialog.getStartIntent2(r6, r7)
  2659. r8 = 4
  2660. r6.startActivityForResult(r7, r8)
  2661. goto L_0x00fc
  2662. L_0x00d2:
  2663. r6.endInkReplAndGoProbePrinter()
  2664. goto L_0x00fc
  2665. L_0x00d6:
  2666. r6.bindEpsonService()
  2667. epson.print.EPPrinterManager r7 = new epson.print.EPPrinterManager
  2668. r7.<init>(r6)
  2669. int r8 = r6.printerLocation
  2670. switch(r8) {
  2671. case 2: goto L_0x00ed;
  2672. case 3: goto L_0x00e4;
  2673. default: goto L_0x00e3;
  2674. }
  2675. L_0x00e3:
  2676. goto L_0x00f6
  2677. L_0x00e4:
  2678. java.lang.String r8 = r6.printerId
  2679. epson.print.EPPrinterInfo r7 = r7.loadIpPrinterInfo(r8)
  2680. if (r7 != 0) goto L_0x00f6
  2681. goto L_0x00f7
  2682. L_0x00ed:
  2683. java.lang.String r8 = r6.printerEmailAddress
  2684. epson.print.EPPrinterInfo r7 = r7.loadRemotePrinterInfo(r8)
  2685. if (r7 != 0) goto L_0x00f6
  2686. goto L_0x00f7
  2687. L_0x00f6:
  2688. r1 = 0
  2689. L_0x00f7:
  2690. if (r1 == 0) goto L_0x00fc
  2691. r6.resetSettings()
  2692. L_0x00fc:
  2693. return
  2694. */
  2695. throw new UnsupportedOperationException("Method not decompiled: epson.print.screen.SettingScr.onPrinterSelectEnd(int, android.content.Intent):void");
  2696. }
  2697. private void endInkReplAndGoProbePrinter() {
  2698. this.mWaiteInkReplenProgress = false;
  2699. bindEpsonService();
  2700. this.mHandler.sendEmptyMessageDelayed(17, 100);
  2701. }
  2702. private void updateSettingView() {
  2703. int i = 8;
  2704. if (this.isDocumentSetting) {
  2705. if (this.printerLocation != 2) {
  2706. setVisibilityPageRange(true);
  2707. setClickablePageRange(true);
  2708. } else if (!this.enableShowPreview) {
  2709. setVisibilityPageRange(false);
  2710. } else if (this.disablePrintArea) {
  2711. setVisibilityPageRange(true);
  2712. setClickablePageRange(false);
  2713. } else {
  2714. setVisibilityPageRange(true);
  2715. setClickablePageRange(true);
  2716. }
  2717. if (this.sheets == 1) {
  2718. ((ImageView) findViewById(R.id.page_range_next_screen_imv)).setVisibility(8);
  2719. } else {
  2720. ((ImageView) findViewById(R.id.page_range_next_screen_imv)).setVisibility(0);
  2721. }
  2722. } else {
  2723. setVisibilityPageRange(false);
  2724. }
  2725. int[] iArr = this.color_info;
  2726. if (iArr == null) {
  2727. ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(8);
  2728. } else if (iArr.length <= 1) {
  2729. ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(8);
  2730. } else {
  2731. ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(0);
  2732. }
  2733. int[] iArr2 = this.duplex_info;
  2734. if (iArr2 == null) {
  2735. findViewById(R.id.duplex_view).setVisibility(8);
  2736. ((LinearLayout) findViewById(R.id.duplex)).setVisibility(8);
  2737. } else if (iArr2.length <= 1) {
  2738. findViewById(R.id.duplex_view).setVisibility(8);
  2739. ((LinearLayout) findViewById(R.id.duplex)).setVisibility(8);
  2740. } else {
  2741. findViewById(R.id.duplex_view).setVisibility(0);
  2742. ((LinearLayout) findViewById(R.id.duplex)).setVisibility(0);
  2743. }
  2744. switch (this.lang) {
  2745. case 2:
  2746. case 3:
  2747. findViewById(R.id.feed_direction_view).setVisibility(0);
  2748. findViewById(R.id.feed_direction).setVisibility(0);
  2749. break;
  2750. default:
  2751. findViewById(R.id.feed_direction_view).setVisibility(8);
  2752. findViewById(R.id.feed_direction).setVisibility(8);
  2753. break;
  2754. }
  2755. if (this.isDocumentSetting || this.printerLocation == 2) {
  2756. findViewById(R.id.printdate).setVisibility(8);
  2757. } else {
  2758. findViewById(R.id.printdate).setVisibility(0);
  2759. }
  2760. if (this.printerLocation != 2 && !this.isDocumentSetting) {
  2761. i = 0;
  2762. }
  2763. findViewById(R.id.viewGroupPhotoEffect).setVisibility(i);
  2764. findViewById(R.id.apf_setting_layout).setVisibility(i);
  2765. findViewById(R.id.sharpness_setting_layout).setVisibility(i);
  2766. }
  2767. private int getPrinterLang() {
  2768. int i;
  2769. IEpsonService iEpsonService;
  2770. if (!(this.printerLocation == 2 || (iEpsonService = this.mEpsonService) == null)) {
  2771. try {
  2772. i = iEpsonService.getLang();
  2773. } catch (RemoteException e) {
  2774. e.printStackTrace();
  2775. }
  2776. EPLog.d("PrintSetting", "getPrinterLang called : ret = " + i);
  2777. return i;
  2778. }
  2779. i = 1;
  2780. EPLog.d("PrintSetting", "getPrinterLang called : ret = " + i);
  2781. return i;
  2782. }
  2783. private void setVisibilityPageRange(boolean z) {
  2784. int i = 0;
  2785. findViewById(R.id.page_range_setting).setVisibility(z ? 0 : 8);
  2786. View findViewById = findViewById(R.id.page_range_separator);
  2787. if (!z) {
  2788. i = 8;
  2789. }
  2790. findViewById.setVisibility(i);
  2791. }
  2792. private void setClickablePageRange(boolean z) {
  2793. findViewById(R.id.page_range_setting).setClickable(z);
  2794. int i = 0;
  2795. findViewById(R.id.page_range_next_screen_imv).setVisibility(z ? 0 : 8);
  2796. View findViewById = findViewById(R.id.page_range_value);
  2797. if (!z) {
  2798. i = 8;
  2799. }
  2800. findViewById.setVisibility(i);
  2801. }
  2802. private void resetSettings() {
  2803. this.printerDeviceId = null;
  2804. this.printerId = null;
  2805. this.printerEmailAddress = null;
  2806. this.printerIp = null;
  2807. this.printerLocation = 0;
  2808. this.info = null;
  2809. this.paper_source_info = null;
  2810. this.color_info = null;
  2811. this.paper_size_info = null;
  2812. this.paper_type_info = null;
  2813. this.layout_info = null;
  2814. this.quality_info = null;
  2815. this.duplex_info = null;
  2816. this.autoConnectSsid = "";
  2817. this.printerName.setText(getString(R.string.str_lbl_title_scan));
  2818. ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(8);
  2819. updateSettingView();
  2820. setScreenState(true);
  2821. }
  2822. public void onBackPressed() {
  2823. super.onBackPressed();
  2824. this.mFinishRequested = true;
  2825. IEpsonService iEpsonService = this.mEpsonService;
  2826. if (iEpsonService != null) {
  2827. try {
  2828. iEpsonService.cancelSearchPrinter();
  2829. } catch (RemoteException e) {
  2830. e.printStackTrace();
  2831. }
  2832. }
  2833. loadSupportedMediaFile();
  2834. EPPrinterManager ePPrinterManager = new EPPrinterManager(this.mContext);
  2835. ePPrinterManager.rollbackRemotePrinterInfo();
  2836. ePPrinterManager.rollbackIPPrinterInfo();
  2837. new InkRplnRepository(false).deleteTemporaryData(this);
  2838. }
  2839. private void setScreenState(Boolean bool) {
  2840. if (bool.booleanValue()) {
  2841. this.progressGetOption.setVisibility(8);
  2842. } else {
  2843. this.progressGetOption.setVisibility(0);
  2844. }
  2845. findViewById(R.id.printer).setClickable(bool.booleanValue());
  2846. findViewById(R.id.paper_size).setClickable(bool.booleanValue());
  2847. findViewById(R.id.paper_type).setClickable(bool.booleanValue());
  2848. findViewById(R.id.layout).setClickable(bool.booleanValue());
  2849. findViewById(R.id.quality).setClickable(bool.booleanValue());
  2850. findViewById(R.id.paper_source).setClickable(bool.booleanValue());
  2851. findViewById(R.id.color).setClickable(bool.booleanValue());
  2852. findViewById(R.id.duplex).setClickable(bool.booleanValue());
  2853. findViewById(R.id.feed_direction).setClickable(bool.booleanValue());
  2854. findViewById(R.id.printdate).setClickable(bool.booleanValue());
  2855. }
  2856. public void showErrorDialog(String str, String str2) {
  2857. new CustomTitleAlertDialogBuilder(this).setCancelable(false).setTitle(str).setMessage(str2).setNegativeButton(getString(R.string.f343ok), new DialogInterface.OnClickListener() {
  2858. public void onClick(DialogInterface dialogInterface, int i) {
  2859. SettingScr.this.setScreenState(true);
  2860. dialogInterface.cancel();
  2861. }
  2862. }).create().show();
  2863. updateSupportedMediaFile(true);
  2864. }
  2865. protected void onResume() {
  2866. super.onResume();
  2867. EPLog.e("SettingScr", "onResume()");
  2868. if (this.printerId != null && this.printerLocation == 1 && this.isRetryAfterConnectSimpleAp && !this.mWaiteInkReplenProgress) {
  2869. this.undoFlag = false;
  2870. if (loadSupportedMediaFile()) {
  2871. this.mHandler.sendEmptyMessage(1);
  2872. } else {
  2873. this.mHandler.sendEmptyMessage(17);
  2874. }
  2875. }
  2876. }
  2877. protected void onPause() {
  2878. EPLog.d("SettingScr", "onPause");
  2879. super.onPause();
  2880. if (isFinishing()) {
  2881. this.mFinishRequested = true;
  2882. deleteLongTapMessage();
  2883. }
  2884. WiFiDirectManager.disconnect(this, WiFiDirectManager.DEVICE_TYPE_PRINTER, this.printerIp);
  2885. WiFiDirectManager.disconnectSimpleAP(this, this.autoConnectSsid, this.printerIp);
  2886. }
  2887. public boolean onCreateOptionsMenu(Menu menu) {
  2888. getMenuInflater().inflate(R.C2138menu.menu_done, menu);
  2889. return super.onCreateOptionsMenu(menu);
  2890. }
  2891. public boolean onOptionsItemSelected(MenuItem menuItem) {
  2892. if (menuItem.getItemId() != R.id.menuSettingsDone) {
  2893. return super.onOptionsItemSelected(menuItem);
  2894. }
  2895. saveChanged();
  2896. setResult(3, getIntent());
  2897. finish();
  2898. return true;
  2899. }
  2900. protected void deleteLongTapMessage() {
  2901. MotionEvent obtain = MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis() + 10, 1, 0.0f, 0.0f, 0);
  2902. this.copiesMinus.dispatchTouchEvent(obtain);
  2903. this.copiesPlus.dispatchTouchEvent(obtain);
  2904. }
  2905. public void onConfigurationChanged(Configuration configuration) {
  2906. super.onConfigurationChanged(configuration);
  2907. deleteLongTapMessage();
  2908. }
  2909. }