SettingScr.java 146 KB

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