BleWorkActivity.java 46 KB

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