BleWorkActivity.java 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. package com.epson.mobilephone.common.ble;
  2. import android.app.AlertDialog;
  3. import android.content.Context;
  4. import android.content.DialogInterface;
  5. import android.content.Intent;
  6. import android.os.Bundle;
  7. import android.os.Handler;
  8. import android.text.Editable;
  9. import android.text.InputFilter;
  10. import android.text.Spanned;
  11. import android.text.TextWatcher;
  12. import android.view.LayoutInflater;
  13. import android.view.View;
  14. import android.view.ViewGroup;
  15. import android.view.inputmethod.InputMethodManager;
  16. import android.widget.AdapterView;
  17. import android.widget.Button;
  18. import android.widget.EditText;
  19. import android.widget.LinearLayout;
  20. import android.widget.ListView;
  21. import android.widget.ProgressBar;
  22. import android.widget.TextView;
  23. import com.epson.iprint.prtlogger.Analytics;
  24. import com.epson.mobilephone.common.EpLog;
  25. import com.epson.mobilephone.common.ble.BleWork;
  26. import com.epson.mobilephone.common.ble.util.BLEUtility;
  27. import com.epson.mobilephone.common.ble.util.ScannedDevice;
  28. import epson.epsonconnectregistration.ActivityECConfiguration;
  29. import epson.maintain.activity.PrinterNotFoundDialogCreator;
  30. import epson.print.ActivityIACommon;
  31. import epson.print.CommonDefine;
  32. import java.io.UnsupportedEncodingException;
  33. import java.util.ArrayList;
  34. import java.util.Collections;
  35. import java.util.Comparator;
  36. import java.util.List;
  37. import org.apache.commons.lang.CharEncoding;
  38. import org.apache.commons.lang.StringUtils;
  39. import org.apache.commons.lang.time.DateUtils;
  40. public class BleWorkActivity extends ActivityIACommon {
  41. private static final int CONNECT_TIME_OUT = 60000;
  42. private static final int FIRST_DELAY = 10000;
  43. private static final int FIRST_DELAY_SEC = 10;
  44. private static final int FIRST_PROGRESS_PER = 90;
  45. private static final int FIRST_PROGRESS_SEC = 90;
  46. private static final int REQUEST_CODE_EPSON_CONNECT_REGISTRATION = 212;
  47. private static final int SECOND_DELAY = 200000;
  48. private static final int TOTAL_MARGIN_SEC = 30;
  49. private static final int TOTAL_PROGRESS_SEC = 210;
  50. int count = 0;
  51. private boolean isAlive;
  52. boolean isStopSetUpProgress = false;
  53. AlertDialog mAlertDialog;
  54. private BleWork mBleWork = null;
  55. private CallbackWork mCompletion = null;
  56. private Context mContext;
  57. private DeviceAdapter mDeviceAdapter;
  58. AlertDialog mDialog;
  59. private CallbackWork mNext = null;
  60. TextView mPercentView;
  61. ProbePrinter mProbePrinter;
  62. ProgressBar mProgressPercent;
  63. private BLEUtility.BleWorkCallback mSequenceCallbackFailed = null;
  64. private BLEUtility.BleWorkCallback mSequenceCallbackSuccess = null;
  65. private Handler mTimeoutHandler;
  66. private Handler mWifiSearchHandler;
  67. private Runnable runnableSetUpProgress;
  68. private Runnable runnableWifiSearch;
  69. private Handler setUpProgressHandler;
  70. public interface CallbackWork {
  71. void call(Object obj);
  72. }
  73. protected void onCreate(Bundle bundle) {
  74. EpLog.m76i();
  75. super.onCreate(bundle);
  76. requestWindowFeature(5);
  77. setContentView((int) R.layout.activity_scan);
  78. setActionBar((int) R.string.BLE_select_unconfigured_printer_title, true);
  79. findViewById(R.id.progress_bar).setVisibility(8);
  80. mContext = this;
  81. callBackFuncs();
  82. getWindow().addFlags(128);
  83. mProbePrinter = ProbePrinter.create().setContext(mContext);
  84. mBleWork = BleWork.getInstace();
  85. mBleWork.resetSequence();
  86. }
  87. protected void onResume() {
  88. ArrayList parcelableArrayListExtra;
  89. super.onResume();
  90. mProbePrinter.bindEpsonService();
  91. EpLog.m77i("mSequence = " + BleWork.getInstace().mSequence);
  92. if (mDeviceAdapter == null && BleWork.getInstace().mSequence == BleWork.jobSequence.UNINITIALIZED && (parcelableArrayListExtra = getIntent().getParcelableArrayListExtra(ScannedDevice.TYPE)) != null && parcelableArrayListExtra.size() > 0) {
  93. init(parcelableArrayListExtra);
  94. }
  95. }
  96. protected void onPause() {
  97. super.onPause();
  98. EpLog.m76i();
  99. }
  100. protected void onStart() {
  101. super.onStart();
  102. isAlive = true;
  103. }
  104. protected void onStop() {
  105. super.onStop();
  106. EpLog.m76i();
  107. isAlive = false;
  108. getWindow().clearFlags(128);
  109. }
  110. protected void onDestroy() {
  111. super.onDestroy();
  112. mProbePrinter.unbindEpsonService();
  113. }
  114. private void callBackFuncs() {
  115. mCompletion = new CallbackWork() {
  116. public void call(Object obj) {
  117. if (!(obj instanceof Boolean)) {
  118. EpLog.m71e(" type mismatch !");
  119. }
  120. StringBuilder sb = new StringBuilder();
  121. sb.append("result = ");
  122. Boolean bool = (Boolean) obj;
  123. sb.append(bool.booleanValue());
  124. EpLog.m77i(sb.toString());
  125. if (bool.booleanValue()) {
  126. BleWorkActivity.this.count = BleWorkActivity.TOTAL_PROGRESS_SEC;
  127. EpLog.m77i("count = " + BleWorkActivity.this.count);
  128. }
  129. BleWorkActivity.this.stopCallbacks();
  130. if (BleWorkActivity.mAlertDialog != null && BleWorkActivity.mAlertDialog.isShowing()) {
  131. BleWorkActivity.this.runOnUiThread(new Runnable() {
  132. public void run() {
  133. EpLog.m77i("dismiss ");
  134. BleWorkActivity.mAlertDialog.dismiss();
  135. BleWorkActivity.mAlertDialog = null;
  136. }
  137. });
  138. }
  139. BleWorkActivity.mBleWork.resetSequence();
  140. BleWorkActivity.this.settingResultDailog(bool.booleanValue());
  141. }
  142. };
  143. mNext = new CallbackWork() {
  144. public void call(Object obj) {
  145. BleWorkActivity.this.stopWifiSearch();
  146. Handler unused = BleWorkActivity.mWifiSearchHandler = new Handler();
  147. BleWorkActivity.this.runOnUiThread(new Runnable() {
  148. public void run() {
  149. EpLog.m77i("setSSID");
  150. BleWorkActivity.mBleWork.setSSID(new BLEUtility.BleWorkCallback() {
  151. public void call(Object obj) {
  152. Runnable unused = BleWorkActivity.this.runnableWifiSearch = new Runnable() {
  153. int postCount = 0;
  154. public void run() {
  155. int i = postCount;
  156. if (i >= 2) {
  157. EpLog.m77i("postCount >= 2 ");
  158. BleWorkActivity.mProbePrinter.interruptSearch();
  159. if (BleWorkActivity.mAlertDialog != null) {
  160. BleWorkActivity.mAlertDialog.dismiss();
  161. BleWorkActivity.mAlertDialog = null;
  162. }
  163. if (BleWorkActivity.mCompletion != null) {
  164. BleWorkActivity.mCompletion.call(false);
  165. return;
  166. }
  167. return;
  168. }
  169. if (i == 1) {
  170. BleWorkActivity.mProbePrinter.setMacAddress(BleWorkActivity.mBleWork.getDeviceMacAddress());
  171. BleWorkActivity.mProbePrinter.setBleCallback(BleWorkActivity.mCompletion);
  172. try {
  173. BleWorkActivity.mProbePrinter.search();
  174. } catch (IllegalStateException e) {
  175. EpLog.m71e(e.getMessage());
  176. BleWorkActivity.mProbePrinter.interruptSearch();
  177. if (BleWorkActivity.mAlertDialog != null) {
  178. BleWorkActivity.mAlertDialog.dismiss();
  179. BleWorkActivity.mAlertDialog = null;
  180. }
  181. if (BleWorkActivity.mCompletion != null) {
  182. BleWorkActivity.mCompletion.call(false);
  183. }
  184. }
  185. }
  186. postCount++;
  187. if (BleWorkActivity.mCompletion != null) {
  188. StringBuilder sb = new StringBuilder();
  189. sb.append("postDelayed postCount = ");
  190. sb.append(this.postCount);
  191. sb.append(" delay ");
  192. sb.append(this.postCount == 1 ? 10000 : BleWorkActivity.SECOND_DELAY);
  193. EpLog.m77i(sb.toString());
  194. BleWorkActivity.mWifiSearchHandler.postDelayed(this, postCount == 1 ? 10000 : 200000);
  195. }
  196. }
  197. };
  198. BleWorkActivity.mWifiSearchHandler.post(BleWorkActivity.this.runnableWifiSearch);
  199. }
  200. }, new BLEUtility.BleWorkCallback() {
  201. public void call(Object obj) {
  202. EpLog.m71e("BleWorkCallback");
  203. if (BleWorkActivity.mCompletion != null) {
  204. BleWorkActivity.mCompletion.call(false);
  205. }
  206. }
  207. });
  208. }
  209. });
  210. }
  211. };
  212. mSequenceCallbackSuccess = new BLEUtility.BleWorkCallback() {
  213. public void call(Object obj) {
  214. BleWork.jobSequence jobsequence = (BleWork.jobSequence) obj;
  215. EpLog.m77i("mSequenceCallbackSuccess " + jobsequence);
  216. if (jobsequence == BleWork.jobSequence.UNINITIALIZED || jobsequence == BleWork.jobSequence.BEFORE_CHECK_SSID || jobsequence == BleWork.jobSequence.MIB_GET_MACADDRESS || jobsequence == BleWork.jobSequence.AFTER_SETTING_PASSWORD) {
  217. BleWorkActivity.this.stopConnectTimeOut();
  218. }
  219. if (!(jobsequence == BleWork.jobSequence.UNINITIALIZED || jobsequence == BleWork.jobSequence.BEFORE_CHECK_SSID || !BleWorkActivity.mBleWork.getSSIDPassword().isEmpty() || BleWorkActivity.mAlertDialog == null || ((jobsequence == BleWork.jobSequence.CHECK_SSID && BleWorkActivity.mBleWork.getSecurityType() == 1) || BleWorkActivity.mBleWork.getSecurityType() == 255))) {
  220. BleWorkActivity.mAlertDialog.dismiss();
  221. BleWorkActivity.mAlertDialog = null;
  222. EpLog.m77i("mAlertDialog dismiss " + jobsequence);
  223. }
  224. if (jobsequence == BleWork.jobSequence.CHECK_SSID) {
  225. BleWorkActivity.this.setSSIDPassword();
  226. } else if (jobsequence == BleWork.jobSequence.MIB_GET_SSID_LIST) {
  227. BleWorkActivity.this.showSSIDList();
  228. }
  229. }
  230. };
  231. mSequenceCallbackFailed = new BLEUtility.BleWorkCallback() {
  232. public void call(Object obj) {
  233. BleWorkActivity.this.failedDialog((BleWork.jobSequence) obj);
  234. }
  235. };
  236. }
  237. private void stopCallbacks() {
  238. stopConnectTimeOut();
  239. stopWifiSearch();
  240. isStopSetUpProgress = true;
  241. stopSetUpProgress();
  242. }
  243. private void stopSetUpProgress() {
  244. Handler handler = setUpProgressHandler;
  245. if (handler != null) {
  246. handler.removeCallbacks(this.runnableSetUpProgress);
  247. setUpProgressHandler = null;
  248. runnableSetUpProgress = null;
  249. }
  250. }
  251. private void stopWifiSearch() {
  252. Handler handler = mWifiSearchHandler;
  253. if (handler != null) {
  254. handler.removeCallbacks(this.runnableWifiSearch);
  255. mWifiSearchHandler = null;
  256. runnableWifiSearch = null;
  257. }
  258. }
  259. private void settingResultDailog(final boolean z) {
  260. runOnUiThread(new Runnable() {
  261. public void run() {
  262. AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.mContext).setCancelable(false);
  263. if (z) {
  264. cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_success_setup_printer_title));
  265. cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_success_setup_printer_msg));
  266. cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
  267. public void onClick(DialogInterface dialogInterface, int i) {
  268. Analytics.SetUpPath setUpPath;
  269. if (BleWorkActivity.this.getCallingActivity() != null) {
  270. BleWorkActivity.this.setResult(-1);
  271. setUpPath = Analytics.SetUpPath.Button;
  272. } else {
  273. setUpPath = Analytics.SetUpPath.Home;
  274. }
  275. Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), setUpPath, Analytics.SetUpResult.Success);
  276. Intent intent = new Intent(BleWorkActivity.this, ActivityECConfiguration.class);
  277. intent.putExtra(ActivityECConfiguration.INTENT_EC_BLE_CONTENT, true);
  278. BleWorkActivity.this.startActivityForResult(intent, BleWorkActivity.REQUEST_CODE_EPSON_CONNECT_REGISTRATION);
  279. }
  280. });
  281. } else {
  282. cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_fail_setup_printer_title));
  283. cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_fail_setup_printer_msg));
  284. cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.BLE_fail_setup_printer_other_method_button), new DialogInterface.OnClickListener() {
  285. public void onClick(DialogInterface dialogInterface, int i) {
  286. BleWorkActivity.this.startActivity(PrinterNotFoundDialogCreator.getStartIntent(BleWorkActivity.this.getApplicationContext()));
  287. Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), BleWorkActivity.this.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Fail);
  288. BleWorkActivity.this.finish();
  289. }
  290. }).setNeutralButton(BleWorkActivity.this.getString(R.string.str_btn_close), new DialogInterface.OnClickListener() {
  291. public void onClick(DialogInterface dialogInterface, int i) {
  292. Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), BleWorkActivity.this.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Fail);
  293. BleWorkActivity.this.finish();
  294. }
  295. });
  296. }
  297. BleWorkActivity.mAlertDialog = cancelable.create();
  298. BleWorkActivity.mAlertDialog.show();
  299. }
  300. });
  301. }
  302. protected void onActivityResult(int i, int i2, Intent intent) {
  303. if (i == REQUEST_CODE_EPSON_CONNECT_REGISTRATION) {
  304. finish();
  305. }
  306. }
  307. private void waitingCommunicationDaialog() {
  308. if (mAlertDialog != null) {
  309. EpLog.m77i("dismiss ");
  310. mAlertDialog.dismiss();
  311. mAlertDialog = null;
  312. }
  313. isStopSetUpProgress = false;
  314. mAlertDialog = new AlertDialog.Builder(mContext).setCancelable(false).create();
  315. View inflate = LayoutInflater.from(mContext).inflate(R.layout.ble_progress_layout, (ViewGroup) null);
  316. mAlertDialog.setView(inflate);
  317. mProgressPercent = (ProgressBar) inflate.findViewById(R.id.progress_percent);
  318. mProgressPercent.setVisibility(0);
  319. mPercentView = (TextView) inflate.findViewById(R.id.percent);
  320. mPercentView.setVisibility(0);
  321. inflate.findViewById(R.id.space_upper).setVisibility(0);
  322. mProgressPercent.setProgress(0);
  323. mProgressPercent.setMax(100);
  324. mPercentView.setText("0%");
  325. mAlertDialog.setMessage(getResources().getString(R.string.BLE_wait_setup_complete_msg));
  326. mAlertDialog.show();
  327. count = 0;
  328. stopSetUpProgress();
  329. setUpProgressHandler = new Handler();
  330. runnableSetUpProgress = new Runnable() {
  331. public void run() {
  332. int i;
  333. if (BleWorkActivity.this.isStopSetUpProgress) {
  334. EpLog.m77i("☆☆runnableSetUpProgress retuen ");
  335. return;
  336. }
  337. EpLog.m77i("mSequence " + BleWorkActivity.mBleWork.mSequence);
  338. BleWorkActivity bleWorkActivity = BleWorkActivity.this;
  339. bleWorkActivity.count = bleWorkActivity.count + 1;
  340. int i2 = BleWorkActivity.this.count;
  341. int i3 = BleWorkActivity.TOTAL_PROGRESS_SEC;
  342. if (i2 > BleWorkActivity.TOTAL_PROGRESS_SEC) {
  343. if (BleWorkActivity.mAlertDialog != null) {
  344. BleWorkActivity.mAlertDialog.dismiss();
  345. BleWorkActivity.mAlertDialog = null;
  346. }
  347. EpLog.m71e("TIME OUT");
  348. BleWorkActivity.mCompletion.call(false);
  349. CallbackWork unused = BleWorkActivity.mCompletion = null;
  350. return;
  351. }
  352. if (BleWorkActivity.this.count <= 90) {
  353. i = BleWorkActivity.this.count;
  354. } else {
  355. if (BleWorkActivity.this.count <= BleWorkActivity.TOTAL_PROGRESS_SEC) {
  356. i3 = BleWorkActivity.this.count;
  357. }
  358. i = (int) ((((double) (i3 - 90)) / 12.0d) + 90.0d);
  359. }
  360. EpLog.m77i(BleWorkActivity.this.count + "::" + i + " %");
  361. BleWorkActivity.this.updateProgress(i);
  362. if (!BleWorkActivity.this.isStopSetUpProgress) {
  363. BleWorkActivity.this.setUpProgressHandler.postDelayed(this, 1000);
  364. }
  365. }
  366. };
  367. setUpProgressHandler.post(this.runnableSetUpProgress);
  368. }
  369. private void updateProgress(int i) {
  370. mProgressPercent.setProgress(i);
  371. TextView textView = mPercentView;
  372. textView.setText(i + " %");
  373. mProgressPercent.invalidate();
  374. mPercentView.invalidate();
  375. }
  376. private void init(ArrayList<ScannedDevice> arrayList) {
  377. ListView listView = (ListView) findViewById(R.id.list);
  378. Collections.sort(arrayList, new ScannedDeviceComparator());
  379. mDeviceAdapter = new DeviceAdapter(this, R.layout.listitem_device, arrayList != null ? arrayList : new ArrayList<>());
  380. listView.setAdapter(mDeviceAdapter);
  381. if (arrayList.size() == 1) {
  382. selectDevice((ScannedDevice) mDeviceAdapter.getItem(0));
  383. }
  384. listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  385. public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
  386. ScannedDevice scannedDevice = (ScannedDevice) BleWorkActivity.mDeviceAdapter.getItem(i);
  387. if (scannedDevice != null) {
  388. BleWorkActivity.this.selectDevice(scannedDevice);
  389. }
  390. }
  391. });
  392. }
  393. public class ScannedDeviceComparator implements Comparator<ScannedDevice> {
  394. public ScannedDeviceComparator() {
  395. }
  396. public int compare(ScannedDevice scannedDevice, ScannedDevice scannedDevice2) {
  397. if (scannedDevice.getRssi() == scannedDevice2.getRssi()) {
  398. return 0;
  399. }
  400. return scannedDevice.getRssi() < scannedDevice2.getRssi() ? 1 : -1;
  401. }
  402. }
  403. private void selectDevice(@NonNull ScannedDevice scannedDevice) {
  404. String displayName = scannedDevice.getDisplayName();
  405. BleScanWork.getInstace().stopScan();
  406. mBleWork.resetSequence();
  407. mBleWork.setSequenceCallback(mSequenceCallbackSuccess, mSequenceCallbackFailed);
  408. EpLog.m69d(" getInfoForConnectDialog");
  409. getInfoForConnectDialog(displayName);
  410. mBleWork.init(this, scannedDevice);
  411. }
  412. private void getInfoForConnectDialog(String str) {
  413. mAlertDialog = new AlertDialog.Builder(this).setCancelable(false).create();
  414. mAlertDialog.setView(LayoutInflater.from(mContext).inflate(R.layout.ble_progress_layout, (ViewGroup) null));
  415. String property = System.getProperty("line.separator");
  416. AlertDialog alertDialog = mAlertDialog;
  417. alertDialog.setMessage(str + property + property + getString(R.string.BLE_inquiry_access_point_information_msg));
  418. if (this.isAlive && !isFinishing()) {
  419. mAlertDialog.show();
  420. }
  421. setConnectTimeOut();
  422. }
  423. private void setConnectTimeOut() {
  424. mTimeoutHandler = new Handler();
  425. mTimeoutHandler.postDelayed(new Runnable() {
  426. public void run() {
  427. EpLog.m71e(" timeout ------------" + BleWorkActivity.mBleWork.mSequence);
  428. if (BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.AFTER_SETTING_PASSWORD || BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.MIB_GET_MACADDRESS || BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.BEFORE_CHECK_SSID || BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.UNINITIALIZED) {
  429. BleWorkActivity.mBleWork.failedProcessing();
  430. }
  431. BleWorkActivity.mBleWork.setRetryFinish();
  432. }
  433. }, DateUtils.MILLIS_PER_MINUTE);
  434. }
  435. private void stopConnectTimeOut() {
  436. Handler handler = mTimeoutHandler;
  437. if (handler != null) {
  438. handler.removeCallbacksAndMessages((Object) null);
  439. mTimeoutHandler = null;
  440. }
  441. }
  442. private void failedDialog(final BleWork.jobSequence jobsequence) {
  443. runOnUiThread(new Runnable() {
  444. public void run() {
  445. BleWorkActivity.this.stopCallbacks();
  446. BleWork.jobSequence jobsequence = jobsequence;
  447. EpLog.m77i("sequence = " + jobsequence);
  448. if (BleWorkActivity.mAlertDialog != null) {
  449. BleWorkActivity.mAlertDialog.dismiss();
  450. }
  451. BleWorkActivity bleWorkActivity = BleWorkActivity.this;
  452. bleWorkActivity.mAlertDialog = null;
  453. AlertDialog.Builder cancelable = new AlertDialog.Builder(bleWorkActivity.mContext).setCancelable(false);
  454. cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_setup_general_error_msg));
  455. cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
  456. public void onClick(DialogInterface dialogInterface, int i) {
  457. Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), BleWorkActivity.this.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Error);
  458. BleWorkActivity.this.finish();
  459. }
  460. });
  461. if (BleWorkActivity.this.isAlive && !BleWorkActivity.this.isFinishing()) {
  462. BleWorkActivity.mAlertDialog = cancelable.create();
  463. BleWorkActivity.mAlertDialog.show();
  464. }
  465. }
  466. });
  467. }
  468. private void SSIDfailedDialog(BleWork.jobSequence jobsequence) {
  469. runOnUiThread(new Runnable(jobsequence) {
  470. private final /* synthetic */ BleWork.jobSequence f$1;
  471. {
  472. f$1 = r2;
  473. }
  474. public final void run() {
  475. BleWorkActivity.lambda$SSIDfailedDialog$1(BleWorkActivity.this, f$1);
  476. }
  477. });
  478. }
  479. public static /* synthetic */ void lambda$SSIDfailedDialog$1(BleWorkActivity bleWorkActivity, BleWork.jobSequence jobsequence) {
  480. bleWorkActivity.stopCallbacks();
  481. EpLog.m77i("sequence = " + jobsequence);
  482. AlertDialog alertDialog = bleWorkActivity.mAlertDialog;
  483. if (alertDialog != null) {
  484. alertDialog.dismiss();
  485. }
  486. bleWorkActivity.mAlertDialog = null;
  487. boolean z = !bleWorkActivity.mBleWork.getSsidLis().isEmpty();
  488. AlertDialog.Builder cancelable = new AlertDialog.Builder(bleWorkActivity.mContext).setCancelable(false);
  489. cancelable.setMessage(bleWorkActivity.getString(R.string.BLE_not_support_security_type));
  490. cancelable.setPositiveButton(bleWorkActivity.getString(z ? R.string.str_btn_close : R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener(z) {
  491. private final /* synthetic */ boolean f$1;
  492. {
  493. f$1 = r2;
  494. }
  495. public final void onClick(DialogInterface dialogInterface, int i) {
  496. BleWorkActivity.lambda$null$0(BleWorkActivity.this, f$1, dialogInterface, i);
  497. }
  498. });
  499. if (bleWorkActivity.isAlive && !bleWorkActivity.isFinishing()) {
  500. bleWorkActivity.mAlertDialog = cancelable.create();
  501. bleWorkActivity.mAlertDialog.show();
  502. }
  503. }
  504. public static /* synthetic */ void lambda$null$0(BleWorkActivity bleWorkActivity, boolean z, DialogInterface dialogInterface, int i) {
  505. Analytics.sendSetup(bleWorkActivity.mBleWork.getDeviceName(), bleWorkActivity.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, z ? Analytics.SetUpResult.Error119 : Analytics.SetUpResult.Error106);
  506. if (z) {
  507. bleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
  508. bleWorkActivity.mBleWork.setSecurityType(0);
  509. bleWorkActivity.showSSIDList();
  510. return;
  511. }
  512. bleWorkActivity.mBleWork.disconnect();
  513. bleWorkActivity.finish();
  514. }
  515. private void showSSIDList() {
  516. runOnUiThread(new Runnable() {
  517. public void run() {
  518. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_SET_SSID;
  519. BleWorkActivity.mBleWork.disconnect(false);
  520. EpLog.m69d("sequence = " + BleWorkActivity.mBleWork.mSequence);
  521. List<String> ssidLis = BleWorkActivity.mBleWork.getSsidLis();
  522. ssidLis.remove(BleWorkActivity.this.getResources().getText(R.string.BLE_select_SSID_manual_button).toString());
  523. BleWorkActivity.this.sortSSIDlist(ssidLis);
  524. ssidLis.add(BleWorkActivity.this.getResources().getText(R.string.BLE_select_SSID_manual_button).toString());
  525. final String[] strArr = (String[]) ssidLis.toArray(new String[ssidLis.size()]);
  526. LinearLayout linearLayout = new LinearLayout(BleWorkActivity.this);
  527. LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
  528. layoutParams.setMargins(40, 25, 40, 25);
  529. TextView textView = new TextView(BleWorkActivity.this);
  530. textView.setText(BleWorkActivity.this.getResources().getText(R.string.BLE_select_SSID_screen_msg));
  531. textView.setTextSize(20.0f);
  532. textView.setLayoutParams(layoutParams);
  533. linearLayout.addView(textView);
  534. AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
  535. cancelable.setCustomTitle(linearLayout);
  536. cancelable.setItems(strArr, new DialogInterface.OnClickListener() {
  537. public void onClick(DialogInterface dialogInterface, int i) {
  538. String str = strArr[i];
  539. EpLog.m69d("select = " + str);
  540. if (i == strArr.length - 1) {
  541. BleWorkActivity.this.setSSID();
  542. return;
  543. }
  544. EpLog.m77i("☆" + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
  545. BleWorkActivity.mBleWork.setSSID(str);
  546. if (BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.DISCONNECTED || BleWorkActivity.mBleWork.mStatus == 0) {
  547. EpLog.m77i("☆☆ " + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
  548. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.BEFORE_CHECK_SSID;
  549. BleWorkActivity.mBleWork.connect();
  550. EpLog.m69d(" getInfoForConnectDialog");
  551. BleWorkActivity.this.getInfoForConnectDialog(BleWorkActivity.mBleWork.getDeviceName());
  552. return;
  553. }
  554. EpLog.m77i("☆☆☆☆ " + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
  555. BleWorkActivity.mBleWork.setSSIDType();
  556. }
  557. });
  558. cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
  559. public void onClick(DialogInterface dialogInterface, int i) {
  560. EpLog.m76i();
  561. BleWorkActivity.mBleWork.disconnect(true);
  562. }
  563. });
  564. cancelable.show();
  565. }
  566. });
  567. }
  568. private void sortSSIDlist(List<String> list) {
  569. Collections.sort(list);
  570. String replaceAll = BleWork.getSSID(this).toUpperCase().replaceAll(CommonDefine.UNDER_BAR, "-");
  571. int i = 0;
  572. while (true) {
  573. if (i >= list.size()) {
  574. i = -1;
  575. break;
  576. }
  577. String replaceAll2 = list.get(i).toUpperCase().replaceAll(CommonDefine.UNDER_BAR, "-");
  578. if (replaceAll2.replaceAll("-A$", "-G").equals(replaceAll) || replaceAll2.replaceFirst("-A-", "-G-").equals(replaceAll) || replaceAll.replaceAll("-5G$", "").equals(replaceAll2) || replaceAll.replaceAll("-5GHZ$", "").equals(replaceAll2)) {
  579. break;
  580. }
  581. i++;
  582. }
  583. if (i > 0) {
  584. list.add(0, list.get(i));
  585. list.remove(i + 1);
  586. }
  587. }
  588. private void setSSID() {
  589. runOnUiThread(new Runnable() {
  590. public void run() {
  591. EpLog.m77i("inputs = ");
  592. final EditText editText = new EditText(BleWorkActivity.this);
  593. editText.setInputType(33);
  594. editText.setFilters(BleWorkActivity.this.getInputFilters(100));
  595. editText.addTextChangedListener(new TextWatcher() {
  596. public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
  597. }
  598. public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
  599. }
  600. public void afterTextChanged(Editable editable) {
  601. EpLog.m77i("afterTextChanged " + editable);
  602. BleWorkActivity.this.validateInputText(100, editable.toString());
  603. }
  604. });
  605. AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
  606. cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_input_SSID_by_manual_dialog_title));
  607. cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_input_SSID_by_manual_dialog_msg));
  608. cancelable.setView(editText);
  609. cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
  610. public void onClick(DialogInterface dialogInterface, int i) {
  611. EpLog.m77i(editText.getText().toString());
  612. BleWorkActivity.mBleWork.setSSID(editText.getText().toString());
  613. BleWorkActivity.mBleWork.setSecurityType(255);
  614. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.SET_PASSWORD;
  615. BleWorkActivity.this.setSSIDPassword();
  616. }
  617. });
  618. cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.no_button), new DialogInterface.OnClickListener() {
  619. public void onClick(DialogInterface dialogInterface, int i) {
  620. EpLog.m76i();
  621. ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
  622. if (!BleWorkActivity.mBleWork.getSsidLis().isEmpty()) {
  623. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
  624. BleWorkActivity.mBleWork.setSecurityType(0);
  625. BleWorkActivity.this.showSSIDList();
  626. return;
  627. }
  628. BleWorkActivity.mBleWork.disconnect();
  629. }
  630. });
  631. if (!BleWorkActivity.this.isFinishing()) {
  632. BleWorkActivity.mDialog = cancelable.create();
  633. BleWorkActivity.mDialog.show();
  634. BleWorkActivity.mDialog.getButton(-1).setEnabled(false);
  635. }
  636. }
  637. });
  638. }
  639. private void setSSIDPassword() {
  640. EpLog.m76i();
  641. if (!mBleWork.getSSIDPassword().isEmpty() || mBleWork.getSecurityType() == 1 || (mBleWork.getSecurityType() == 255 && mBleWork.mSequence != BleWork.jobSequence.SET_PASSWORD)) {
  642. runOnUiThread(new Runnable() {
  643. public void run() {
  644. EpLog.m77i("password mNext");
  645. BleWorkActivity.mNext.call("");
  646. if (BleWorkActivity.this.setUpProgressHandler == null && BleWorkActivity.this.runnableSetUpProgress == null) {
  647. if (BleWorkActivity.mAlertDialog != null) {
  648. BleWorkActivity.mAlertDialog.dismiss();
  649. BleWorkActivity.mAlertDialog = null;
  650. }
  651. EpLog.m69d("waitingCommunicationDaialog");
  652. BleWorkActivity.this.waitingCommunicationDaialog();
  653. }
  654. }
  655. });
  656. } else {
  657. runOnUiThread(new Runnable() {
  658. public void run() {
  659. EpLog.m77i("inputs = ");
  660. final short securityType = BleWorkActivity.mBleWork.getSecurityType();
  661. if (securityType == 7 || securityType == 10) {
  662. BleWorkActivity bleWorkActivity = BleWorkActivity.this;
  663. bleWorkActivity.SSIDfailedDialog(bleWorkActivity.mBleWork.mSequence);
  664. return;
  665. }
  666. final EditText editText = new EditText(BleWorkActivity.this);
  667. editText.setInputType(33);
  668. editText.setFilters(BleWorkActivity.this.getInputFilters(securityType));
  669. editText.addTextChangedListener(new TextWatcher() {
  670. public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
  671. }
  672. public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
  673. }
  674. public void afterTextChanged(Editable editable) {
  675. EpLog.m77i("afterTextChanged " + editable);
  676. BleWorkActivity.this.validateInputText(securityType, editable.toString());
  677. }
  678. });
  679. AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
  680. cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_input_password_of_SSID_dialog_title));
  681. BleWorkActivity bleWorkActivity2 = BleWorkActivity.this;
  682. boolean z = true;
  683. cancelable.setMessage(bleWorkActivity2.getString(R.string.BLE_input_password_of_SSID_dialog_msg, new Object[]{bleWorkActivity2.mBleWork.getSSID()}));
  684. cancelable.setView(editText);
  685. cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
  686. public void onClick(DialogInterface dialogInterface, int i) {
  687. EpLog.m77i(editText.getText().toString());
  688. BleWorkActivity.mBleWork.setSSIDPassword(editText.getText().toString());
  689. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_MACADDRESS;
  690. BleWorkActivity.mBleWork.connect();
  691. BleWorkActivity.this.setConnectTimeOut();
  692. EpLog.m69d("waitingCommunicationDaialog");
  693. BleWorkActivity.this.waitingCommunicationDaialog();
  694. ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
  695. }
  696. });
  697. cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.no_button), new DialogInterface.OnClickListener() {
  698. public void onClick(DialogInterface dialogInterface, int i) {
  699. EpLog.m76i();
  700. ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
  701. if (!BleWorkActivity.mBleWork.getSsidLis().isEmpty()) {
  702. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
  703. BleWorkActivity.mBleWork.setSecurityType(0);
  704. BleWorkActivity.this.showSSIDList();
  705. return;
  706. }
  707. BleWorkActivity.mBleWork.disconnect();
  708. }
  709. });
  710. if (!BleWorkActivity.this.isFinishing()) {
  711. BleWorkActivity.mDialog = cancelable.create();
  712. BleWorkActivity.mDialog.show();
  713. Button button = BleWorkActivity.mDialog.getButton(-1);
  714. if (securityType != 255) {
  715. z = false;
  716. }
  717. button.setEnabled(z);
  718. }
  719. EpLog.m69d("sequence = " + BleWorkActivity.mBleWork.mSequence);
  720. BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.AFTER_SETTING_PASSWORD;
  721. BleWorkActivity.mBleWork.disconnect(false);
  722. EpLog.m69d("sequence = " + BleWorkActivity.mBleWork.mSequence);
  723. }
  724. });
  725. }
  726. }
  727. /* access modifiers changed from: private */
  728. @NonNull
  729. public InputFilter[] getInputFilters(int i) {
  730. int i2 = 26;
  731. if (i != 7) {
  732. if (i != 100) {
  733. switch (i) {
  734. case 2:
  735. case 4:
  736. break;
  737. case 3:
  738. i2 = 10;
  739. break;
  740. case 5:
  741. break;
  742. default:
  743. switch (i) {
  744. case 9:
  745. case 10:
  746. case 11:
  747. break;
  748. default:
  749. i2 = 63;
  750. break;
  751. }
  752. }
  753. } else {
  754. i2 = 32;
  755. }
  756. return new InputFilter[]{new InputFilter.LengthFilter(i2), new PasswordFilter(i)};
  757. }
  758. i2 = 63;
  759. return new InputFilter[]{new InputFilter.LengthFilter(i2), new PasswordFilter(i)};
  760. }
  761. class PasswordFilter implements InputFilter {
  762. int filterType;
  763. PasswordFilter(int i) {
  764. filterType = i;
  765. }
  766. public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
  767. String charSequence2 = charSequence.toString();
  768. if (charSequence2.contains(" ")) {
  769. return StringUtils.deleteWhitespace(charSequence2);
  770. }
  771. try {
  772. charSequence = charSequence2.replace(new String(new byte[]{-62, -91}, CharEncoding.UTF_8), new String("\\".getBytes(), CharEncoding.UTF_8));
  773. } catch (UnsupportedEncodingException e) {
  774. EpLog.m71e(e.getMessage());
  775. }
  776. if (charSequence.toString().matches("^[a-zA-Z0-9!-/:-@\\[-\\`\\{-\\~]+$")) {
  777. return charSequence;
  778. }
  779. EpLog.m77i("in NG");
  780. return "";
  781. }
  782. }
  783. /* JADX WARNING: Can't fix incorrect switch cases order */
  784. /* JADX WARNING: Code restructure failed: missing block: B:12:0x0031, code lost:
  785. if (r11 > 63) goto L_0x00ac;
  786. */
  787. /* JADX WARNING: Code restructure failed: missing block: B:14:0x0037, code lost:
  788. if (r11 <= 63) goto L_0x00ad;
  789. */
  790. /* JADX WARNING: Code restructure failed: missing block: B:16:0x0055, code lost:
  791. if (java.util.Arrays.asList(new java.lang.Integer[]{13, 26}).contains(java.lang.Integer.valueOf(r11)) != false) goto L_0x00ad;
  792. */
  793. /* JADX WARNING: Code restructure failed: missing block: B:18:0x0072, code lost:
  794. if (java.util.Arrays.asList(new java.lang.Integer[]{5, 10}).contains(java.lang.Integer.valueOf(r11)) != false) goto L_0x00ad;
  795. */
  796. /* JADX WARNING: Code restructure failed: missing block: B:20:0x009d, code lost:
  797. if (java.util.Arrays.asList(new java.lang.Integer[]{5, 10, 13, 26}).contains(java.lang.Integer.valueOf(r11)) != false) goto L_0x00ad;
  798. */
  799. /* JADX WARNING: Code restructure failed: missing block: B:23:0x00a4, code lost:
  800. if (r11 <= 32) goto L_0x00ad;
  801. */
  802. /* JADX WARNING: Code restructure failed: missing block: B:25:0x00a9, code lost:
  803. if (r11 <= 63) goto L_0x00ad;
  804. */
  805. /* Code decompiled incorrectly, please refer to instructions dump. */
  806. public void validateInputText(int r10, java.lang.String r11) {
  807. /*
  808. r9 = this;
  809. java.lang.String r0 = r11.toString()
  810. java.lang.String r1 = "^[^ -~。-゚]+$"
  811. boolean r0 = r0.matches(r1)
  812. r1 = 0
  813. r2 = 1
  814. if (r0 != 0) goto L_0x00ac
  815. int r11 = r11.length()
  816. r0 = 7
  817. r3 = 63
  818. r4 = 8
  819. if (r10 == r0) goto L_0x00a7
  820. r0 = 100
  821. if (r10 == r0) goto L_0x00a0
  822. r0 = 26
  823. r5 = 13
  824. r6 = 10
  825. r7 = 2
  826. r8 = 5
  827. switch(r10) {
  828. case 2: goto L_0x0075;
  829. case 3: goto L_0x0058;
  830. case 4: goto L_0x003b;
  831. case 5: goto L_0x00a7;
  832. default: goto L_0x0028;
  833. }
  834. L_0x0028:
  835. switch(r10) {
  836. case 9: goto L_0x0035;
  837. case 10: goto L_0x0035;
  838. case 11: goto L_0x0035;
  839. default: goto L_0x002b;
  840. }
  841. L_0x002b:
  842. if (r11 == 0) goto L_0x00ad
  843. if (r11 == r8) goto L_0x00ad
  844. if (r11 < r4) goto L_0x00ac
  845. if (r11 > r3) goto L_0x00ac
  846. goto L_0x00ad
  847. L_0x0035:
  848. if (r11 < r4) goto L_0x00ac
  849. if (r11 > r3) goto L_0x00ac
  850. goto L_0x00ad
  851. L_0x003b:
  852. java.lang.Integer[] r10 = new java.lang.Integer[r7]
  853. java.lang.Integer r3 = java.lang.Integer.valueOf(r5)
  854. r10[r1] = r3
  855. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  856. r10[r2] = r0
  857. java.util.List r10 = java.util.Arrays.asList(r10)
  858. java.lang.Integer r11 = java.lang.Integer.valueOf(r11)
  859. boolean r10 = r10.contains(r11)
  860. if (r10 == 0) goto L_0x00ac
  861. goto L_0x00ad
  862. L_0x0058:
  863. java.lang.Integer[] r10 = new java.lang.Integer[r7]
  864. java.lang.Integer r0 = java.lang.Integer.valueOf(r8)
  865. r10[r1] = r0
  866. java.lang.Integer r0 = java.lang.Integer.valueOf(r6)
  867. r10[r2] = r0
  868. java.util.List r10 = java.util.Arrays.asList(r10)
  869. java.lang.Integer r11 = java.lang.Integer.valueOf(r11)
  870. boolean r10 = r10.contains(r11)
  871. if (r10 == 0) goto L_0x00ac
  872. goto L_0x00ad
  873. L_0x0075:
  874. r10 = 4
  875. java.lang.Integer[] r10 = new java.lang.Integer[r10]
  876. java.lang.Integer r3 = java.lang.Integer.valueOf(r8)
  877. r10[r1] = r3
  878. java.lang.Integer r3 = java.lang.Integer.valueOf(r6)
  879. r10[r2] = r3
  880. java.lang.Integer r3 = java.lang.Integer.valueOf(r5)
  881. r10[r7] = r3
  882. r3 = 3
  883. java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
  884. r10[r3] = r0
  885. java.util.List r10 = java.util.Arrays.asList(r10)
  886. java.lang.Integer r11 = java.lang.Integer.valueOf(r11)
  887. boolean r10 = r10.contains(r11)
  888. if (r10 == 0) goto L_0x00ac
  889. goto L_0x00ad
  890. L_0x00a0:
  891. if (r11 < r2) goto L_0x00ac
  892. r10 = 32
  893. if (r11 > r10) goto L_0x00ac
  894. goto L_0x00ad
  895. L_0x00a7:
  896. if (r11 < r4) goto L_0x00ac
  897. if (r11 > r3) goto L_0x00ac
  898. goto L_0x00ad
  899. L_0x00ac:
  900. r2 = 0
  901. L_0x00ad:
  902. android.app.AlertDialog r10 = r9.mDialog
  903. r11 = -1
  904. android.widget.Button r10 = r10.getButton(r11)
  905. r10.setEnabled(r2)
  906. return
  907. */
  908. throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.ble.BleWorkActivity.validateInputText(int, java.lang.String):void");
  909. }
  910. }