liuyuqi-dellpc 3 years ago
parent
commit
bca2128798
57 changed files with 515 additions and 583 deletions
  1. 7 0
      README.md
  2. 1 1
      app/src/main/java/com/epson/cameracopy/ui/CameraPreviewActivity.java
  3. 1 1
      app/src/main/java/com/epson/cameracopy/ui/CameraPreviewFragment.java
  4. 1 1
      app/src/main/java/com/epson/cameracopy/ui/CameraPreviewOptionActivity.java
  5. 1 1
      app/src/main/java/com/epson/cameracopy/ui/ImagePreviewActivity.java
  6. 1 1
      app/src/main/java/com/epson/iprint/storage/StorageProcessDownloadActivity.java
  7. 1 1
      app/src/main/java/com/epson/iprint/storage/gdrivev3/ListAndDownloadActivity.java
  8. 24 113
      app/src/main/java/com/epson/mobilephone/common/ble/BleAsyncTask.java
  9. 213 331
      app/src/main/java/com/epson/mobilephone/common/ble/BleWorkActivity.java
  10. 4 1
      app/src/main/java/com/epson/mobilephone/common/ble/DeviceAdapter.java
  11. 33 34
      app/src/main/java/com/epson/mobilephone/common/ble/ProbePrinter.java
  12. 9 3
      app/src/main/java/com/epson/mobilephone/common/guide/GuideWebviewFragment.java
  13. 6 3
      app/src/main/java/com/epson/mobilephone/common/guide/MyViewPager.java
  14. 19 18
      app/src/main/java/com/epson/mobilephone/common/guide/NoticeGuideActivity.java
  15. 7 4
      app/src/main/java/com/epson/mobilephone/common/guide/Utils.java
  16. 16 0
      app/src/main/java/com/epson/mobilephone/common/license/DefaultLicenseInfo.java
  17. 6 0
      app/src/main/java/com/epson/mobilephone/common/license/InfoDisplayActivity.java
  18. 3 16
      app/src/main/java/com/epson/mobilephone/common/license/LicenseInfo.java
  19. 14 1
      app/src/main/java/com/epson/mobilephone/common/license/LicenseTopActivity.java
  20. 16 1
      app/src/main/java/com/epson/mobilephone/common/license/SimpleMessageDialogFragment.java
  21. 3 17
      app/src/main/java/com/epson/mobilephone/common/license/UserSurveyInfo.java
  22. 11 4
      app/src/main/java/com/epson/mobilephone/common/license/UserSurveyInvitationActivity.java
  23. 1 1
      app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityRequestLocationPermission.java
  24. 1 1
      app/src/main/java/epson/common/CustomListRowAdapter.java
  25. 1 1
      app/src/main/java/epson/common/ExifCopy.java
  26. 19 3
      app/src/main/java/epson/common/ExternalFileUtils.java
  27. 9 0
      app/src/main/java/epson/common/IprintAppRecord.java
  28. 12 0
      app/src/main/java/epson/common/IprintLicenseInfo.java
  29. 1 1
      app/src/main/java/epson/maintain/BatteryInfoAdapter.java
  30. 1 1
      app/src/main/java/epson/maintain/EfuReader.java
  31. 8 2
      app/src/main/java/epson/print/ActivityIACommon.java
  32. 1 1
      app/src/main/java/epson/print/ActivityRequestPermissions.java
  33. 1 1
      app/src/main/java/epson/print/IconTextArrayAdapter.java
  34. 1 1
      app/src/main/java/epson/print/IconifiedTextListAdapter.java
  35. 11 3
      app/src/main/java/epson/print/IprintHome.java
  36. 1 1
      app/src/main/java/epson/print/copy/CopyScaleActivity.java
  37. 1 1
      app/src/main/java/epson/print/copy/CopySettingActivity.java
  38. 1 1
      app/src/main/java/epson/print/fileBrower.java
  39. 1 1
      app/src/main/java/epson/print/imgsel/ImageFolderListFragment.java
  40. 1 1
      app/src/main/java/epson/print/imgsel/ImageGridFragment.java
  41. 1 1
      app/src/main/java/epson/print/imgsel/ImageViewBaseFragment.java
  42. 1 1
      app/src/main/java/epson/print/imgsel/ImageViewPagerActivity.java
  43. 1 1
      app/src/main/java/epson/print/inkrpln/InkRplnProgressFragment.java
  44. 1 1
      app/src/main/java/epson/print/inkrpln/JumpUrlFragment.java
  45. 1 1
      app/src/main/java/epson/print/rpcopy/CopySettingActivity.java
  46. 1 1
      app/src/main/java/epson/print/storage/StorageProcessDownloadActivity.java
  47. 1 1
      app/src/main/java/epson/print/storage/gdrivev3/ListAndDownloadActivity.java
  48. 1 1
      app/src/main/java/epson/print/widgets/CustomTitleAlertDialogBuilder.java
  49. 1 1
      app/src/main/java/epson/server/screens/UploadScreen.java
  50. 5 0
      app/src/main/res/drawable/g_dialog_left_button_normal.xml
  51. 5 0
      app/src/main/res/drawable/g_dialog_left_button_press.xml
  52. 7 0
      app/src/main/res/drawable/g_dialog_left_button_selector.xml
  53. 5 0
      app/src/main/res/drawable/g_dialog_right_button_normal.xml
  54. 5 0
      app/src/main/res/drawable/g_dialog_right_button_press.xml
  55. 7 0
      app/src/main/res/drawable/g_dialog_right_button_selector.xml
  56. BIN
      app/src/main/res/drawable/list_divider.9.png
  57. 3 1
      app/src/main/res/layout/activity_notice_guide.xml

+ 7 - 0
README.md

@@ -0,0 +1,7 @@
+## IPrint
+
+反编译 爱普生 打印机app Epson_iPrint_7.5.1.apk
+
+去除云存储功能,只留打印图片,文档功能。
+
+

+ 1 - 1
app/src/main/java/com/epson/cameracopy/ui/CameraPreviewActivity.java

@@ -4,7 +4,7 @@ import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 import android.view.Menu;
 import android.view.MenuItem;
 

+ 1 - 1
app/src/main/java/com/epson/cameracopy/ui/CameraPreviewFragment.java

@@ -6,7 +6,7 @@ import android.hardware.Camera;
 import android.hardware.SensorManager;
 import android.os.AsyncTask;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;

+ 1 - 1
app/src/main/java/com/epson/cameracopy/ui/CameraPreviewOptionActivity.java

@@ -3,7 +3,7 @@ package com.epson.cameracopy.ui;
 import android.content.Intent;
 import android.graphics.Point;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;

+ 1 - 1
app/src/main/java/com/epson/cameracopy/ui/ImagePreviewActivity.java

@@ -14,7 +14,7 @@ import android.media.ExifInterface;
 import android.os.Bundle;
 
 
-import android.support.p000v4.app.Fragment;
+
 
 import android.view.LayoutInflater;
 import android.view.Menu;

+ 1 - 1
app/src/main/java/com/epson/iprint/storage/StorageProcessDownloadActivity.java

@@ -400,7 +400,7 @@ public class StorageProcessDownloadActivity extends StorageProcessActivity {
 
         StorageItemAdapter(List<StorageItem> list) {
             super(StorageProcessDownloadActivity.this.getBaseContext(), R.layout.file_list_item, list);
-            this.layoutInflater = (LayoutInflater) StorageProcessDownloadActivity.this.getBaseContext().getSystemService("layout_inflater");
+            this.layoutInflater = (LayoutInflater) StorageProcessDownloadActivity.this.getBaseContext().getSystemService(Service.LAYOUT_INFLATER_SERVICE);
             this.storageItems = list;
             this.viewCache = new HashMap<>();
         }

+ 1 - 1
app/src/main/java/com/epson/iprint/storage/gdrivev3/ListAndDownloadActivity.java

@@ -8,7 +8,7 @@ import android.os.Bundle;
 
 
 
-import android.support.p000v4.app.Fragment;
+
 import android.support.p000v4.app.FragmentManager;
 import android.view.Menu;
 import android.view.MenuItem;

+ 24 - 113
app/src/main/java/com/epson/mobilephone/common/ble/BleAsyncTask.java

@@ -19,6 +19,9 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import epson.print.R;
+import epson.print.Util.EPLog;
+
 public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
     private static AlertDialog dialog = null;
     private static HandlerThread handlerThread = null;
@@ -43,7 +46,7 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
                 mTimeOutTask = null;
                 BleAsyncTask bleAsyncTask = mTask;
                 if (bleAsyncTask != null) {
-                    bleAsyncTask.cancel(true);
+                    cancel(true);
                 }
             }
         }
@@ -53,17 +56,17 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
         mTimeOutTask = new Runnable() {
             public void run() {
                 try {
-                    BleAsyncTask.this.get(BleAsyncTask.mTimeOut, TimeUnit.MILLISECONDS);
+                    get(mTimeOut, TimeUnit.MILLISECONDS);
                 } catch (InterruptedException unused) {
                     EPLog.e("InterruptedException");
                 } catch (ExecutionException unused2) {
                     EPLog.e("ExecutionException");
                 } catch (TimeoutException unused3) {
                     EPLog.i("Running task has timed out!!");
-                    if (BleAsyncTask.mBleWork != null) {
-                        BleAsyncTask.mBleWork.stopScan();
+                    if (mBleWork != null) {
+                        mBleWork.stopScan();
                     }
-                    BleAsyncTask.mTask.cancel(true);
+                    mTask.cancel(true);
                 } catch (CancellationException unused4) {
                     EPLog.e("CancellationException");
                 }
@@ -78,17 +81,17 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
         mTimeOutTask = new Runnable() {
             public void run() {
                 try {
-                    BleAsyncTask.this.get(BleAsyncTask.mTimeOut, TimeUnit.MILLISECONDS);
+                    get(mTimeOut, TimeUnit.MILLISECONDS);
                 } catch (InterruptedException unused) {
                     EPLog.e("InterruptedException");
                 } catch (ExecutionException unused2) {
                     EPLog.e("ExecutionException");
                 } catch (TimeoutException unused3) {
                     EPLog.i("Running task has timed out!!");
-                    if (BleAsyncTask.mBleWork != null) {
-                        BleAsyncTask.mBleWork.stopScan();
+                    if (mBleWork != null) {
+                        mBleWork.stopScan();
                     }
-                    BleAsyncTask.mTask.cancel(true);
+                    mTask.cancel(true);
                 } catch (CancellationException unused4) {
                     EPLog.e("CancellationException");
                 }
@@ -105,102 +108,10 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
         mBleWork = BleScanWork.getInstace();
     }
 
-    /* access modifiers changed from: protected */
-    /* JADX WARNING: Removed duplicated region for block: B:14:0x0072  */
-    /* JADX WARNING: Removed duplicated region for block: B:26:0x00ac A[EDGE_INSN: B:26:0x00ac->B:24:0x00ac ?: BREAK  , SYNTHETIC] */
-    /* Code decompiled incorrectly, please refer to instructions dump. */
+
     public java.lang.Boolean doInBackground(java.lang.Void... r5) {
-        /*
-            r4 = this;
-            java.lang.StringBuilder r5 = new java.lang.StringBuilder
-            r5.<init>()
-            java.lang.String r0 = "mStop  "
-            r5.append(r0)
-            boolean r0 = mStop
-            r5.append(r0)
-            java.lang.String r5 = r5.toString()
-            com.epson.mobilephone.common.EPLog.i(r5)
-            boolean r5 = mStop
-            if (r5 == 0) goto L_0x001d
-            java.lang.Boolean r5 = r4.mFind
-            return r5
-        L_0x001d:
-            java.lang.Thread r5 = java.lang.Thread.currentThread()
-            java.lang.String r0 = "BleAsyncTask"
-            r5.setName(r0)
-            com.epson.mobilephone.common.EPLog.m68d()
-            java.lang.Thread r5 = java.lang.Thread.currentThread()
-            java.lang.String r5 = r5.getName()
-            com.epson.mobilephone.common.EPLog.i(r5)
-            mTask = r4
-            long r0 = r4.mTimeOut
-            r2 = 0
-            int r5 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))
-            if (r5 <= 0) goto L_0x0048
-            java.lang.Thread r5 = new java.lang.Thread
-            java.lang.Runnable r0 = mTimeOutTask
-            r5.<init>(r0)
-            r5.start()
-        L_0x0048:
-            com.epson.mobilephone.common.ble.BleScanWork r5 = r4.mBleWork
-            android.app.Activity r0 = r4.m_Activity
-            boolean r5 = r5.init_scan(r0)
-            if (r5 != 0) goto L_0x005a
-            java.lang.String r5 = "BLE is not available !!"
-            com.epson.mobilephone.common.EPLog.m82w(r5)
-            java.lang.Boolean r5 = r4.mFind
-            return r5
-        L_0x005a:
-            java.lang.String r5 = "BLE is available!!"
-            com.epson.mobilephone.common.EPLog.i(r5)
-            com.epson.mobilephone.common.ble.BleScanWork r5 = r4.mBleWork
-            com.epson.mobilephone.common.ble.BleAsyncTask$2 r0 = new com.epson.mobilephone.common.ble.BleAsyncTask$2
-            r0.<init>()
-            com.epson.mobilephone.common.ble.BleAsyncTask$3 r1 = new com.epson.mobilephone.common.ble.BleAsyncTask$3
-            r1.<init>()
-            r5.search(r0, r1)
-        L_0x006e:
-            boolean r5 = mStop
-            if (r5 != 0) goto L_0x00ac
-            java.lang.StringBuilder r5 = new java.lang.StringBuilder
-            r5.<init>()
-            java.lang.String r0 = "生きてるんです. mStop = "
-            r5.append(r0)
-            boolean r0 = mStop
-            r5.append(r0)
-            java.lang.String r5 = r5.toString()
-            com.epson.mobilephone.common.EPLog.d(r5)
-            r0 = 2000(0x7d0, double:9.88E-321)
-            java.lang.Thread.sleep(r0)     // Catch:{ InterruptedException -> 0x008e }
-            goto L_0x0093
-        L_0x008e:
-            java.lang.String r5 = "InterruptedException"
-            com.epson.mobilephone.common.EPLog.e((java.lang.String) r5)
-        L_0x0093:
-            boolean r5 = r4.isCancelled()
-            if (r5 != 0) goto L_0x009d
-            boolean r5 = mStop
-            if (r5 == 0) goto L_0x006e
-        L_0x009d:
-            java.lang.String r5 = "死にます"
-            com.epson.mobilephone.common.EPLog.d(r5)
-            java.lang.String r5 = "★ stopScan"
-            com.epson.mobilephone.common.EPLog.d(r5)
-            com.epson.mobilephone.common.ble.BleScanWork r5 = r4.mBleWork
-            r5.stopScan()
-        L_0x00ac:
-            java.lang.StringBuilder r5 = new java.lang.StringBuilder
-            r5.<init>()
-            java.lang.String r0 = "見つかった? "
-            r5.append(r0)
-            java.lang.Boolean r0 = r4.mFind
-            r5.append(r0)
-            java.lang.String r5 = r5.toString()
-            com.epson.mobilephone.common.EPLog.d(r5)
-            java.lang.Boolean r5 = r4.mFind
-            return r5
-        */
-        throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.ble.BleAsyncTask.doInBackground(java.lang.Void[]):java.lang.Boolean");
+
+        throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.ble.doInBackground(java.lang.Void[]):java.lang.Boolean");
     }
 
     protected void onPostExecute(Boolean bool) {
@@ -222,22 +133,22 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
         dialog = new AlertDialog.Builder(m_Activity).setCancelable(false).setMessage(m_Activity.getString(R.string.BLE_find_unconfigured_printer_title)).setPositiveButton(m_Activity.getString(R.string.BLE_find_unconfigured_printer_setup_button), new DialogInterface.OnClickListener() {
             public void onClick(DialogInterface dialogInterface, int i) {
                 EPLog.d("★ stopScan");
-                BleAsyncTask.mBleWork.stopScan();
+                mBleWork.stopScan();
                 BleAsyncTask bleAsyncTask = BleAsyncTask.this;
-                List unused = bleAsyncTask.mDevicelist = bleAsyncTask.mBleWork.getScannedDeviceList();
+                List unused = mDevicelist = mBleWork.getScannedDeviceList();
                 ArrayList arrayList = new ArrayList();
-                for (ScannedDevice scannedDevice : BleAsyncTask.mDevicelist) {
+                for (ScannedDevice scannedDevice : mDevicelist) {
                     arrayList.add(new ScannedDevice(scannedDevice.getDevice(), scannedDevice.getRssi(), scannedDevice.getDisplayName(), scannedDevice.getHardwareType()));
                 }
-                Intent intent = new Intent(BleAsyncTask.m_Activity.getApplicationContext(), BleWorkActivity.class);
+                Intent intent = new Intent(m_Activity.getApplicationContext(), BleWorkActivity.class);
                 intent.putParcelableArrayListExtra(ScannedDevice.TYPE, arrayList);
-                BleAsyncTask.m_Activity.startActivity(intent);
+                m_Activity.startActivity(intent);
             }
         }).setNegativeButton(m_Activity.getString(R.string.BLE_find_unconfigured_printer_not_now_button), new DialogInterface.OnClickListener() {
             public void onClick(DialogInterface dialogInterface, int i) {
                 EPLog.d("★ stopScan");
-                BleAsyncTask.mBleWork.stopScan();
-                BleAsyncTask.setStop(true);
+                mBleWork.stopScan();
+                setStop(true);
             }
         }).create();
         dialog.show();
@@ -274,7 +185,7 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
                 new Handler(handlerThread.getLooper()).postDelayed(new Runnable() {
                     public void run() {
                         EPLog.i(" 0 handlerThread run !!!!");
-                        BleAsyncTask.handlerThread.quitSafely();
+                        handlerThread.quitSafely();
                         new BleAsyncTask(activity).execute(new Void[0]);
                     }
                 }, 500);
@@ -296,7 +207,7 @@ public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
         new Handler(handlerThread.getLooper()).postDelayed(new Runnable() {
             public void run() {
                 EPLog.i(" handlerThread run !!!!");
-                BleAsyncTask.handlerThread.quitSafely();
+                handlerThread.quitSafely();
                 new BleAsyncTask(activity, bleWorkCallback, BleWork.getScanAdvertisingPacketTimeout()).execute(new Void[0]);
             }
         }, 1000);

+ 213 - 331
app/src/main/java/com/epson/mobilephone/common/ble/BleWorkActivity.java

@@ -23,6 +23,8 @@ import android.widget.ListView;
 import android.widget.ProgressBar;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+
 import com.epson.iprint.prtlogger.Analytics;
 import com.epson.mobilephone.common.ble.util.BLEUtility;
 import com.epson.mobilephone.common.ble.util.ScannedDevice;
@@ -32,6 +34,8 @@ import epson.maintain.activity.PrinterNotFoundDialogCreator;
 import epson.print.ActivityIACommon;
 
 import epson.print.CommonDefine;
+import epson.print.R;
+import epson.print.Util.EPLog;
 
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
@@ -137,86 +141,86 @@ public class BleWorkActivity extends ActivityIACommon {
                 sb.append(bool.booleanValue());
                 EPLog.i(sb.toString());
                 if (bool.booleanValue()) {
-                    BleWorkActivity.this.count = BleWorkActivity.TOTAL_PROGRESS_SEC;
-                    EPLog.i("count = " + BleWorkActivity.this.count);
+                    count = TOTAL_PROGRESS_SEC;
+                    EPLog.i("count = " + count);
                 }
-                BleWorkActivity.this.stopCallbacks();
-                if (BleWorkActivity.mAlertDialog != null && BleWorkActivity.mAlertDialog.isShowing()) {
-                    BleWorkActivity.this.runOnUiThread(new Runnable() {
+                stopCallbacks();
+                if (mAlertDialog != null && mAlertDialog.isShowing()) {
+                    runOnUiThread(new Runnable() {
                         public void run() {
                             EPLog.i("dismiss ");
-                            BleWorkActivity.mAlertDialog.dismiss();
-                            BleWorkActivity.mAlertDialog = null;
+                            mAlertDialog.dismiss();
+                            mAlertDialog = null;
                         }
                     });
                 }
-                BleWorkActivity.mBleWork.resetSequence();
-                BleWorkActivity.this.settingResultDailog(bool.booleanValue());
+                mBleWork.resetSequence();
+                settingResultDailog(bool.booleanValue());
             }
         };
         mNext = new CallbackWork() {
             public void call(Object obj) {
-                BleWorkActivity.this.stopWifiSearch();
-                Handler unused = BleWorkActivity.mWifiSearchHandler = new Handler();
-                BleWorkActivity.this.runOnUiThread(new Runnable() {
+                stopWifiSearch();
+                Handler unused = mWifiSearchHandler = new Handler();
+                runOnUiThread(new Runnable() {
                     public void run() {
                         EPLog.i("setSSID");
-                        BleWorkActivity.mBleWork.setSSID(new BLEUtility.BleWorkCallback() {
+                        mBleWork.setSSID(new BLEUtility.BleWorkCallback() {
                             public void call(Object obj) {
-                                Runnable unused = BleWorkActivity.this.runnableWifiSearch = new Runnable() {
+                                Runnable unused = runnableWifiSearch = new Runnable() {
                                     int postCount = 0;
 
                                     public void run() {
                                         int i = postCount;
                                         if (i >= 2) {
                                             EPLog.i("postCount >= 2 ");
-                                            BleWorkActivity.mProbePrinter.interruptSearch();
-                                            if (BleWorkActivity.mAlertDialog != null) {
-                                                BleWorkActivity.mAlertDialog.dismiss();
-                                                BleWorkActivity.mAlertDialog = null;
+                                            mProbePrinter.interruptSearch();
+                                            if (mAlertDialog != null) {
+                                                mAlertDialog.dismiss();
+                                                mAlertDialog = null;
                                             }
-                                            if (BleWorkActivity.mCompletion != null) {
-                                                BleWorkActivity.mCompletion.call(false);
+                                            if (mCompletion != null) {
+                                                mCompletion.call(false);
                                                 return;
                                             }
                                             return;
                                         }
                                         if (i == 1) {
-                                            BleWorkActivity.mProbePrinter.setMacAddress(BleWorkActivity.mBleWork.getDeviceMacAddress());
-                                            BleWorkActivity.mProbePrinter.setBleCallback(BleWorkActivity.mCompletion);
+                                            mProbePrinter.setMacAddress(mBleWork.getDeviceMacAddress());
+                                            mProbePrinter.setBleCallback(mCompletion);
                                             try {
-                                                BleWorkActivity.mProbePrinter.search();
+                                                mProbePrinter.search();
                                             } catch (IllegalStateException e) {
                                                 EPLog.e(e.getMessage());
-                                                BleWorkActivity.mProbePrinter.interruptSearch();
-                                                if (BleWorkActivity.mAlertDialog != null) {
-                                                    BleWorkActivity.mAlertDialog.dismiss();
-                                                    BleWorkActivity.mAlertDialog = null;
+                                                mProbePrinter.interruptSearch();
+                                                if (mAlertDialog != null) {
+                                                    mAlertDialog.dismiss();
+                                                    mAlertDialog = null;
                                                 }
-                                                if (BleWorkActivity.mCompletion != null) {
-                                                    BleWorkActivity.mCompletion.call(false);
+                                                if (mCompletion != null) {
+                                                    mCompletion.call(false);
                                                 }
                                             }
                                         }
                                         postCount++;
-                                        if (BleWorkActivity.mCompletion != null) {
+                                        if (mCompletion != null) {
                                             StringBuilder sb = new StringBuilder();
                                             sb.append("postDelayed  postCount = ");
-                                            sb.append(this.postCount);
+                                            sb.append(postCount);
                                             sb.append(" delay ");
-                                            sb.append(this.postCount == 1 ? 10000 : BleWorkActivity.SECOND_DELAY);
+                                            sb.append(postCount == 1 ? 10000 : SECOND_DELAY);
                                             EPLog.i(sb.toString());
-                                            BleWorkActivity.mWifiSearchHandler.postDelayed(this, postCount == 1 ? 10000 : 200000);
+                                            mWifiSearchHandler.postDelayed(this, postCount == 1 ? 10000 : 200000);
                                         }
                                     }
                                 };
-                                BleWorkActivity.mWifiSearchHandler.post(BleWorkActivity.this.runnableWifiSearch);
+                                mWifiSearchHandler.post(runnableWifiSearch);
                             }
                         }, new BLEUtility.BleWorkCallback() {
                             public void call(Object obj) {
                                 EPLog.e("BleWorkCallback");
-                                if (BleWorkActivity.mCompletion != null) {
-                                    BleWorkActivity.mCompletion.call(false);
+                                if (mCompletion != null) {
+                                    mCompletion.call(false);
                                 }
                             }
                         });
@@ -229,23 +233,23 @@ public class BleWorkActivity extends ActivityIACommon {
                 BleWork.jobSequence jobsequence = (BleWork.jobSequence) obj;
                 EPLog.i("mSequenceCallbackSuccess  " + jobsequence);
                 if (jobsequence == BleWork.jobSequence.UNINITIALIZED || jobsequence == BleWork.jobSequence.BEFORE_CHECK_SSID || jobsequence == BleWork.jobSequence.MIB_GET_MACADDRESS || jobsequence == BleWork.jobSequence.AFTER_SETTING_PASSWORD) {
-                    BleWorkActivity.this.stopConnectTimeOut();
+                    stopConnectTimeOut();
                 }
-                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))) {
-                    BleWorkActivity.mAlertDialog.dismiss();
-                    BleWorkActivity.mAlertDialog = null;
+                if (!(jobsequence == BleWork.jobSequence.UNINITIALIZED || jobsequence == BleWork.jobSequence.BEFORE_CHECK_SSID || !mBleWork.getSSIDPassword().isEmpty() || mAlertDialog == null || ((jobsequence == BleWork.jobSequence.CHECK_SSID && mBleWork.getSecurityType() == 1) || mBleWork.getSecurityType() == 255))) {
+                    mAlertDialog.dismiss();
+                    mAlertDialog = null;
                     EPLog.i("mAlertDialog        dismiss " + jobsequence);
                 }
                 if (jobsequence == BleWork.jobSequence.CHECK_SSID) {
-                    BleWorkActivity.this.setSSIDPassword();
+                    setSSIDPassword();
                 } else if (jobsequence == BleWork.jobSequence.MIB_GET_SSID_LIST) {
-                    BleWorkActivity.this.showSSIDList();
+                    showSSIDList();
                 }
             }
         };
         mSequenceCallbackFailed = new BLEUtility.BleWorkCallback() {
             public void call(Object obj) {
-                BleWorkActivity.this.failedDialog((BleWork.jobSequence) obj);
+                failedDialog((BleWork.jobSequence) obj);
             }
         };
     }
@@ -260,7 +264,7 @@ public class BleWorkActivity extends ActivityIACommon {
     private void stopSetUpProgress() {
         Handler handler = setUpProgressHandler;
         if (handler != null) {
-            handler.removeCallbacks(this.runnableSetUpProgress);
+            handler.removeCallbacks(runnableSetUpProgress);
             setUpProgressHandler = null;
             runnableSetUpProgress = null;
         }
@@ -269,7 +273,7 @@ public class BleWorkActivity extends ActivityIACommon {
     private void stopWifiSearch() {
         Handler handler = mWifiSearchHandler;
         if (handler != null) {
-            handler.removeCallbacks(this.runnableWifiSearch);
+            handler.removeCallbacks(runnableWifiSearch);
             mWifiSearchHandler = null;
             runnableWifiSearch = null;
         }
@@ -278,43 +282,43 @@ public class BleWorkActivity extends ActivityIACommon {
     private void settingResultDailog(final boolean z) {
         runOnUiThread(new Runnable() {
             public void run() {
-                AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.mContext).setCancelable(false);
+                AlertDialog.Builder cancelable = new AlertDialog.Builder(mContext).setCancelable(false);
                 if (z) {
-                    cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_success_setup_printer_title));
-                    cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_success_setup_printer_msg));
-                    cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
+                    cancelable.setTitle(getString(R.string.BLE_success_setup_printer_title));
+                    cancelable.setMessage(getString(R.string.BLE_success_setup_printer_msg));
+                    cancelable.setPositiveButton(getString(R.string.ok_button), new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialogInterface, int i) {
                             Analytics.SetUpPath setUpPath;
-                            if (BleWorkActivity.this.getCallingActivity() != null) {
-                                BleWorkActivity.this.setResult(-1);
+                            if (getCallingActivity() != null) {
+                                setResult(-1);
                                 setUpPath = Analytics.SetUpPath.Button;
                             } else {
                                 setUpPath = Analytics.SetUpPath.Home;
                             }
-                            Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), setUpPath, Analytics.SetUpResult.Success);
-                            Intent intent = new Intent(BleWorkActivity.this, ActivityECConfiguration.class);
+                            Analytics.sendSetup(mBleWork.getDeviceName(), setUpPath, Analytics.SetUpResult.Success);
+                            Intent intent = new Intent(this, ActivityECConfiguration.class);
                             intent.putExtra(ActivityECConfiguration.INTENT_EC_BLE_CONTENT, true);
-                            BleWorkActivity.this.startActivityForResult(intent, BleWorkActivity.REQUEST_CODE_EPSON_CONNECT_REGISTRATION);
+                            startActivityForResult(intent, REQUEST_CODE_EPSON_CONNECT_REGISTRATION);
                         }
                     });
                 } else {
-                    cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_fail_setup_printer_title));
-                    cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_fail_setup_printer_msg));
-                    cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.BLE_fail_setup_printer_other_method_button), new DialogInterface.OnClickListener() {
+                    cancelable.setTitle(getString(R.string.BLE_fail_setup_printer_title));
+                    cancelable.setMessage(getString(R.string.BLE_fail_setup_printer_msg));
+                    cancelable.setPositiveButton(getString(R.string.BLE_fail_setup_printer_other_method_button), new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialogInterface, int i) {
-                            BleWorkActivity.this.startActivity(PrinterNotFoundDialogCreator.getStartIntent(BleWorkActivity.this.getApplicationContext()));
-                            Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), BleWorkActivity.this.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Fail);
-                            BleWorkActivity.this.finish();
+                            startActivity(PrinterNotFoundDialogCreator.getStartIntent(getApplicationContext()));
+                            Analytics.sendSetup(mBleWork.getDeviceName(), getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Fail);
+                            finish();
                         }
-                    }).setNeutralButton(BleWorkActivity.this.getString(R.string.str_btn_close), new DialogInterface.OnClickListener() {
+                    }).setNeutralButton(getString(R.string.str_btn_close), new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialogInterface, int i) {
-                            Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), BleWorkActivity.this.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Fail);
-                            BleWorkActivity.this.finish();
+                            Analytics.sendSetup(mBleWork.getDeviceName(), getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Fail);
+                            finish();
                         }
                     });
                 }
-                BleWorkActivity.mAlertDialog = cancelable.create();
-                BleWorkActivity.mAlertDialog.show();
+                mAlertDialog = cancelable.create();
+                mAlertDialog.show();
             }
         });
     }
@@ -351,41 +355,41 @@ public class BleWorkActivity extends ActivityIACommon {
         runnableSetUpProgress = new Runnable() {
             public void run() {
                 int i;
-                if (BleWorkActivity.this.isStopSetUpProgress) {
+                if (isStopSetUpProgress) {
                     EPLog.i("☆☆runnableSetUpProgress retuen ");
                     return;
                 }
-                EPLog.i("mSequence " + BleWorkActivity.mBleWork.mSequence);
-                BleWorkActivity bleWorkActivity = BleWorkActivity.this;
-                bleWorkActivity.count = bleWorkActivity.count + 1;
-                int i2 = BleWorkActivity.this.count;
-                int i3 = BleWorkActivity.TOTAL_PROGRESS_SEC;
-                if (i2 > BleWorkActivity.TOTAL_PROGRESS_SEC) {
-                    if (BleWorkActivity.mAlertDialog != null) {
-                        BleWorkActivity.mAlertDialog.dismiss();
-                        BleWorkActivity.mAlertDialog = null;
+                EPLog.i("mSequence " + mBleWork.mSequence);
+                BleWorkActivity bleWorkActivity = this;
+                count = count + 1;
+                int i2 = count;
+                int i3 = TOTAL_PROGRESS_SEC;
+                if (i2 > TOTAL_PROGRESS_SEC) {
+                    if (mAlertDialog != null) {
+                        mAlertDialog.dismiss();
+                        mAlertDialog = null;
                     }
                     EPLog.e("TIME OUT");
-                    BleWorkActivity.mCompletion.call(false);
-                    CallbackWork unused = BleWorkActivity.mCompletion = null;
+                    mCompletion.call(false);
+                    CallbackWork unused = mCompletion = null;
                     return;
                 }
-                if (BleWorkActivity.this.count <= 90) {
-                    i = BleWorkActivity.this.count;
+                if (count <= 90) {
+                    i = count;
                 } else {
-                    if (BleWorkActivity.this.count <= BleWorkActivity.TOTAL_PROGRESS_SEC) {
-                        i3 = BleWorkActivity.this.count;
+                    if (count <= TOTAL_PROGRESS_SEC) {
+                        i3 = count;
                     }
                     i = ((((i3 - 90)) / 12.0d) + 90.0d);
                 }
-                EPLog.i(BleWorkActivity.this.count + "::" + i + " %");
-                BleWorkActivity.this.updateProgress(i);
-                if (!BleWorkActivity.this.isStopSetUpProgress) {
-                    BleWorkActivity.this.setUpProgressHandler.postDelayed(this, 1000);
+                EPLog.i(count + "::" + i + " %");
+                updateProgress(i);
+                if (!isStopSetUpProgress) {
+                    setUpProgressHandler.postDelayed(this, 1000);
                 }
             }
         };
-        setUpProgressHandler.post(this.runnableSetUpProgress);
+        setUpProgressHandler.post(runnableSetUpProgress);
     }
 
     private void updateProgress(int i) {
@@ -406,9 +410,9 @@ public class BleWorkActivity extends ActivityIACommon {
         }
         listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
-                ScannedDevice scannedDevice = (ScannedDevice) BleWorkActivity.mDeviceAdapter.getItem(i);
+                ScannedDevice scannedDevice = (ScannedDevice) mDeviceAdapter.getItem(i);
                 if (scannedDevice != null) {
-                    BleWorkActivity.this.selectDevice(scannedDevice);
+                    selectDevice(scannedDevice);
                 }
             }
         });
@@ -442,7 +446,7 @@ public class BleWorkActivity extends ActivityIACommon {
         String property = System.getProperty("line.separator");
         AlertDialog alertDialog = mAlertDialog;
         alertDialog.setMessage(str + property + property + getString(R.string.BLE_inquiry_access_point_information_msg));
-        if (this.isAlive && !isFinishing()) {
+        if (isAlive && !isFinishing()) {
             mAlertDialog.show();
         }
         setConnectTimeOut();
@@ -452,11 +456,11 @@ public class BleWorkActivity extends ActivityIACommon {
         mTimeoutHandler = new Handler();
         mTimeoutHandler.postDelayed(new Runnable() {
             public void run() {
-                EPLog.e(" timeout ------------" + BleWorkActivity.mBleWork.mSequence);
-                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) {
-                    BleWorkActivity.mBleWork.failedProcessing();
+                EPLog.e(" timeout ------------" + mBleWork.mSequence);
+                if (mBleWork.mSequence == BleWork.jobSequence.AFTER_SETTING_PASSWORD || mBleWork.mSequence == BleWork.jobSequence.MIB_GET_MACADDRESS || mBleWork.mSequence == BleWork.jobSequence.BEFORE_CHECK_SSID || mBleWork.mSequence == BleWork.jobSequence.UNINITIALIZED) {
+                    mBleWork.failedProcessing();
                 }
-                BleWorkActivity.mBleWork.setRetryFinish();
+                mBleWork.setRetryFinish();
             }
         }, DateUtils.MILLIS_PER_MINUTE);
     }
@@ -472,25 +476,25 @@ public class BleWorkActivity extends ActivityIACommon {
     private void failedDialog(final BleWork.jobSequence jobsequence) {
         runOnUiThread(new Runnable() {
             public void run() {
-                BleWorkActivity.this.stopCallbacks();
+                stopCallbacks();
                 BleWork.jobSequence jobsequence = jobsequence;
                 EPLog.i("sequence = " + jobsequence);
-                if (BleWorkActivity.mAlertDialog != null) {
-                    BleWorkActivity.mAlertDialog.dismiss();
+                if (mAlertDialog != null) {
+                    mAlertDialog.dismiss();
                 }
-                BleWorkActivity bleWorkActivity = BleWorkActivity.this;
-                bleWorkActivity.mAlertDialog = null;
-                AlertDialog.Builder cancelable = new AlertDialog.Builder(bleWorkActivity.mContext).setCancelable(false);
-                cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_setup_general_error_msg));
-                cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
+                BleWorkActivity bleWorkActivity = this;
+                mAlertDialog = null;
+                AlertDialog.Builder cancelable = new AlertDialog.Builder(mContext).setCancelable(false);
+                cancelable.setMessage(getString(R.string.BLE_setup_general_error_msg));
+                cancelable.setPositiveButton(getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialogInterface, int i) {
-                        Analytics.sendSetup(BleWorkActivity.mBleWork.getDeviceName(), BleWorkActivity.this.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Error);
-                        BleWorkActivity.this.finish();
+                        Analytics.sendSetup(mBleWork.getDeviceName(), getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, Analytics.SetUpResult.Error);
+                        finish();
                     }
                 });
-                if (BleWorkActivity.this.isAlive && !BleWorkActivity.this.isFinishing()) {
-                    BleWorkActivity.mAlertDialog = cancelable.create();
-                    BleWorkActivity.mAlertDialog.show();
+                if (isAlive && !isFinishing()) {
+                    mAlertDialog = cancelable.create();
+                    mAlertDialog.show();
                 }
             }
         });
@@ -505,23 +509,23 @@ public class BleWorkActivity extends ActivityIACommon {
             }
 
             public final void run() {
-                BleWorkActivity.lambda$SSIDfailedDialog$1(BleWorkActivity.this, f$1);
+                lambda$SSIDfailedDialog$1(this, f$1);
             }
         });
     }
 
     public static /* synthetic */ void lambda$SSIDfailedDialog$1(BleWorkActivity bleWorkActivity, BleWork.jobSequence jobsequence) {
-        bleWorkActivity.stopCallbacks();
+        stopCallbacks();
         EPLog.i("sequence = " + jobsequence);
-        AlertDialog alertDialog = bleWorkActivity.mAlertDialog;
+        AlertDialog alertDialog = mAlertDialog;
         if (alertDialog != null) {
             alertDialog.dismiss();
         }
-        bleWorkActivity.mAlertDialog = null;
-        boolean z = !bleWorkActivity.mBleWork.getSsidLis().isEmpty();
-        AlertDialog.Builder cancelable = new AlertDialog.Builder(bleWorkActivity.mContext).setCancelable(false);
-        cancelable.setMessage(bleWorkActivity.getString(R.string.BLE_not_support_security_type));
-        cancelable.setPositiveButton(bleWorkActivity.getString(z ? R.string.str_btn_close : R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener(z) {
+        mAlertDialog = null;
+        boolean z = !mBleWork.getSsidLis().isEmpty();
+        AlertDialog.Builder cancelable = new AlertDialog.Builder(mContext).setCancelable(false);
+        cancelable.setMessage(getString(R.string.BLE_not_support_security_type));
+        cancelable.setPositiveButton(getString(z ? R.string.str_btn_close : R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener(z) {
             private final /* synthetic */ boolean f$1;
 
             {
@@ -529,74 +533,74 @@ public class BleWorkActivity extends ActivityIACommon {
             }
 
             public final void onClick(DialogInterface dialogInterface, int i) {
-                BleWorkActivity.lambda$null$0(BleWorkActivity.this, f$1, dialogInterface, i);
+                lambda$null$0(this, f$1, dialogInterface, i);
             }
         });
-        if (bleWorkActivity.isAlive && !bleWorkActivity.isFinishing()) {
-            bleWorkActivity.mAlertDialog = cancelable.create();
-            bleWorkActivity.mAlertDialog.show();
+        if (isAlive && !isFinishing()) {
+            mAlertDialog = cancelable.create();
+            mAlertDialog.show();
         }
     }
 
     public static /* synthetic */ void lambda$null$0(BleWorkActivity bleWorkActivity, boolean z, DialogInterface dialogInterface, int i) {
-        Analytics.sendSetup(bleWorkActivity.mBleWork.getDeviceName(), bleWorkActivity.getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, z ? Analytics.SetUpResult.Error119 : Analytics.SetUpResult.Error106);
+        Analytics.sendSetup(mBleWork.getDeviceName(), getCallingActivity() != null ? Analytics.SetUpPath.Button : Analytics.SetUpPath.Home, z ? Analytics.SetUpResult.Error119 : Analytics.SetUpResult.Error106);
         if (z) {
-            bleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
-            bleWorkActivity.mBleWork.setSecurityType(0);
-            bleWorkActivity.showSSIDList();
+            mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
+            mBleWork.setSecurityType(0);
+            showSSIDList();
             return;
         }
-        bleWorkActivity.mBleWork.disconnect();
-        bleWorkActivity.finish();
+        mBleWork.disconnect();
+        finish();
     }
 
     private void showSSIDList() {
         runOnUiThread(new Runnable() {
             public void run() {
-                BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_SET_SSID;
-                BleWorkActivity.mBleWork.disconnect(false);
-                EPLog.d("sequence = " + BleWorkActivity.mBleWork.mSequence);
-                List<String> ssidLis = BleWorkActivity.mBleWork.getSsidLis();
-                ssidLis.remove(BleWorkActivity.this.getResources().getText(R.string.BLE_select_SSID_manual_button).toString());
-                BleWorkActivity.this.sortSSIDlist(ssidLis);
-                ssidLis.add(BleWorkActivity.this.getResources().getText(R.string.BLE_select_SSID_manual_button).toString());
+                mBleWork.mSequence = BleWork.jobSequence.MIB_SET_SSID;
+                mBleWork.disconnect(false);
+                EPLog.d("sequence = " + mBleWork.mSequence);
+                List<String> ssidLis = mBleWork.getSsidLis();
+                ssidLis.remove(getResources().getText(R.string.BLE_select_SSID_manual_button).toString());
+                sortSSIDlist(ssidLis);
+                ssidLis.add(getResources().getText(R.string.BLE_select_SSID_manual_button).toString());
                 final String[] strArr = (String[]) ssidLis.toArray(new String[ssidLis.size()]);
-                LinearLayout linearLayout = new LinearLayout(BleWorkActivity.this);
+                LinearLayout linearLayout = new LinearLayout(this);
                 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
                 layoutParams.setMargins(40, 25, 40, 25);
-                TextView textView = new TextView(BleWorkActivity.this);
-                textView.setText(BleWorkActivity.this.getResources().getText(R.string.BLE_select_SSID_screen_msg));
+                TextView textView = new TextView(this);
+                textView.setText(getResources().getText(R.string.BLE_select_SSID_screen_msg));
                 textView.setTextSize(20.0f);
                 textView.setLayoutParams(layoutParams);
                 linearLayout.addView(textView);
-                AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
+                AlertDialog.Builder cancelable = new AlertDialog.Builder(this).setCancelable(false);
                 cancelable.setCustomTitle(linearLayout);
                 cancelable.setItems(strArr, new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialogInterface, int i) {
                         String str = strArr[i];
                         EPLog.d("select = " + str);
                         if (i == strArr.length - 1) {
-                            BleWorkActivity.this.setSSID();
+                            setSSID();
                             return;
                         }
-                        EPLog.i("☆" + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
-                        BleWorkActivity.mBleWork.setSSID(str);
-                        if (BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.DISCONNECTED || BleWorkActivity.mBleWork.mStatus == 0) {
-                            EPLog.i("☆☆ " + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
-                            BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.BEFORE_CHECK_SSID;
-                            BleWorkActivity.mBleWork.connect();
+                        EPLog.i("☆" + mBleWork.mSequence + "::" + mBleWork.mStatus);
+                        mBleWork.setSSID(str);
+                        if (mBleWork.mSequence == BleWork.jobSequence.DISCONNECTED || mBleWork.mStatus == 0) {
+                            EPLog.i("☆☆ " + mBleWork.mSequence + "::" + mBleWork.mStatus);
+                            mBleWork.mSequence = BleWork.jobSequence.BEFORE_CHECK_SSID;
+                            mBleWork.connect();
                             EPLog.d("              getInfoForConnectDialog");
-                            BleWorkActivity.this.getInfoForConnectDialog(BleWorkActivity.mBleWork.getDeviceName());
+                            getInfoForConnectDialog(mBleWork.getDeviceName());
                             return;
                         }
-                        EPLog.i("☆☆☆☆ " + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
-                        BleWorkActivity.mBleWork.setSSIDType();
+                        EPLog.i("☆☆☆☆ " + mBleWork.mSequence + "::" + mBleWork.mStatus);
+                        mBleWork.setSSIDType();
                     }
                 });
-                cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
+                cancelable.setNegativeButton(getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialogInterface, int i) {
                         EPLog.i();
-                        BleWorkActivity.mBleWork.disconnect(true);
+                        mBleWork.disconnect(true);
                     }
                 });
                 cancelable.show();
@@ -629,9 +633,9 @@ public class BleWorkActivity extends ActivityIACommon {
         runOnUiThread(new Runnable() {
             public void run() {
                 EPLog.i("inputs = ");
-                final EditText editText = new EditText(BleWorkActivity.this);
+                final EditText editText = new EditText(this);
                 editText.setInputType(33);
-                editText.setFilters(BleWorkActivity.this.getInputFilters(100));
+                editText.setFilters(getInputFilters(100));
                 editText.addTextChangedListener(new TextWatcher() {
                     public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
                     }
@@ -641,39 +645,39 @@ public class BleWorkActivity extends ActivityIACommon {
 
                     public void afterTextChanged(Editable editable) {
                         EPLog.i("afterTextChanged " + editable);
-                        BleWorkActivity.this.validateInputText(100, editable.toString());
+                        validateInputText(100, editable.toString());
                     }
                 });
-                AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
-                cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_input_SSID_by_manual_dialog_title));
-                cancelable.setMessage(BleWorkActivity.this.getString(R.string.BLE_input_SSID_by_manual_dialog_msg));
+                AlertDialog.Builder cancelable = new AlertDialog.Builder(this).setCancelable(false);
+                cancelable.setTitle(getString(R.string.BLE_input_SSID_by_manual_dialog_title));
+                cancelable.setMessage(getString(R.string.BLE_input_SSID_by_manual_dialog_msg));
                 cancelable.setView(editText);
-                cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
+                cancelable.setPositiveButton(getString(R.string.ok_button), new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialogInterface, int i) {
                         EPLog.i(editText.getText().toString());
-                        BleWorkActivity.mBleWork.setSSID(editText.getText().toString());
-                        BleWorkActivity.mBleWork.setSecurityType(255);
-                        BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.SET_PASSWORD;
-                        BleWorkActivity.this.setSSIDPassword();
+                        mBleWork.setSSID(editText.getText().toString());
+                        mBleWork.setSecurityType(255);
+                        mBleWork.mSequence = BleWork.jobSequence.SET_PASSWORD;
+                        setSSIDPassword();
                     }
                 });
-                cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.no_button), new DialogInterface.OnClickListener() {
+                cancelable.setNegativeButton(getString(R.string.no_button), new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialogInterface, int i) {
                         EPLog.i();
-                        ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
-                        if (!BleWorkActivity.mBleWork.getSsidLis().isEmpty()) {
-                            BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
-                            BleWorkActivity.mBleWork.setSecurityType(0);
-                            BleWorkActivity.this.showSSIDList();
+                        ((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
+                        if (!mBleWork.getSsidLis().isEmpty()) {
+                            mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
+                            mBleWork.setSecurityType(0);
+                            showSSIDList();
                             return;
                         }
-                        BleWorkActivity.mBleWork.disconnect();
+                        mBleWork.disconnect();
                     }
                 });
-                if (!BleWorkActivity.this.isFinishing()) {
-                    BleWorkActivity.mDialog = cancelable.create();
-                    BleWorkActivity.mDialog.show();
-                    BleWorkActivity.mDialog.getButton(-1).setEnabled(false);
+                if (!isFinishing()) {
+                    mDialog = cancelable.create();
+                    mDialog.show();
+                    mDialog.getButton(-1).setEnabled(false);
                 }
             }
         });
@@ -685,14 +689,14 @@ public class BleWorkActivity extends ActivityIACommon {
             runOnUiThread(new Runnable() {
                 public void run() {
                     EPLog.i("password mNext");
-                    BleWorkActivity.mNext.call("");
-                    if (BleWorkActivity.this.setUpProgressHandler == null && BleWorkActivity.this.runnableSetUpProgress == null) {
-                        if (BleWorkActivity.mAlertDialog != null) {
-                            BleWorkActivity.mAlertDialog.dismiss();
-                            BleWorkActivity.mAlertDialog = null;
+                    mNext.call("");
+                    if (setUpProgressHandler == null && runnableSetUpProgress == null) {
+                        if (mAlertDialog != null) {
+                            mAlertDialog.dismiss();
+                            mAlertDialog = null;
                         }
                         EPLog.d("waitingCommunicationDaialog");
-                        BleWorkActivity.this.waitingCommunicationDaialog();
+                        waitingCommunicationDaialog();
                     }
                 }
             });
@@ -700,15 +704,15 @@ public class BleWorkActivity extends ActivityIACommon {
             runOnUiThread(new Runnable() {
                 public void run() {
                     EPLog.i("inputs = ");
-                    final short securityType = BleWorkActivity.mBleWork.getSecurityType();
+                    final short securityType = mBleWork.getSecurityType();
                     if (securityType == 7 || securityType == 10) {
-                        BleWorkActivity bleWorkActivity = BleWorkActivity.this;
-                        bleWorkActivity.SSIDfailedDialog(bleWorkActivity.mBleWork.mSequence);
+                        BleWorkActivity bleWorkActivity = this;
+                        SSIDfailedDialog(mBleWork.mSequence);
                         return;
                     }
-                    final EditText editText = new EditText(BleWorkActivity.this);
+                    final EditText editText = new EditText(this);
                     editText.setInputType(33);
-                    editText.setFilters(BleWorkActivity.this.getInputFilters(securityType));
+                    editText.setFilters(getInputFilters(securityType));
                     editText.addTextChangedListener(new TextWatcher() {
                         public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
                         }
@@ -718,53 +722,53 @@ public class BleWorkActivity extends ActivityIACommon {
 
                         public void afterTextChanged(Editable editable) {
                             EPLog.i("afterTextChanged " + editable);
-                            BleWorkActivity.this.validateInputText(securityType, editable.toString());
+                            validateInputText(securityType, editable.toString());
                         }
                     });
-                    AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
-                    cancelable.setTitle(BleWorkActivity.this.getString(R.string.BLE_input_password_of_SSID_dialog_title));
-                    BleWorkActivity bleWorkActivity2 = BleWorkActivity.this;
+                    AlertDialog.Builder cancelable = new AlertDialog.Builder(this).setCancelable(false);
+                    cancelable.setTitle(getString(R.string.BLE_input_password_of_SSID_dialog_title));
+                    BleWorkActivity bleWorkActivity2 = this;
                     boolean z = true;
                     cancelable.setMessage(bleWorkActivity2.getString(R.string.BLE_input_password_of_SSID_dialog_msg, new Object[]{bleWorkActivity2.mBleWork.getSSID()}));
                     cancelable.setView(editText);
-                    cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
+                    cancelable.setPositiveButton(getString(R.string.ok_button), new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialogInterface, int i) {
                             EPLog.i(editText.getText().toString());
-                            BleWorkActivity.mBleWork.setSSIDPassword(editText.getText().toString());
-                            BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_MACADDRESS;
-                            BleWorkActivity.mBleWork.connect();
-                            BleWorkActivity.this.setConnectTimeOut();
+                            mBleWork.setSSIDPassword(editText.getText().toString());
+                            mBleWork.mSequence = BleWork.jobSequence.MIB_GET_MACADDRESS;
+                            mBleWork.connect();
+                            setConnectTimeOut();
                             EPLog.d("waitingCommunicationDaialog");
-                            BleWorkActivity.this.waitingCommunicationDaialog();
-                            ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
+                            waitingCommunicationDaialog();
+                            ((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
                         }
                     });
-                    cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.no_button), new DialogInterface.OnClickListener() {
+                    cancelable.setNegativeButton(getString(R.string.no_button), new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialogInterface, int i) {
                             EPLog.i();
-                            ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
-                            if (!BleWorkActivity.mBleWork.getSsidLis().isEmpty()) {
-                                BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
-                                BleWorkActivity.mBleWork.setSecurityType(0);
-                                BleWorkActivity.this.showSSIDList();
+                            ((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
+                            if (!mBleWork.getSsidLis().isEmpty()) {
+                                mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
+                                mBleWork.setSecurityType(0);
+                                showSSIDList();
                                 return;
                             }
-                            BleWorkActivity.mBleWork.disconnect();
+                            mBleWork.disconnect();
                         }
                     });
-                    if (!BleWorkActivity.this.isFinishing()) {
-                        BleWorkActivity.mDialog = cancelable.create();
-                        BleWorkActivity.mDialog.show();
-                        Button button = BleWorkActivity.mDialog.getButton(-1);
+                    if (!isFinishing()) {
+                        mDialog = cancelable.create();
+                        mDialog.show();
+                        Button button = mDialog.getButton(-1);
                         if (securityType != 255) {
                             z = false;
                         }
                         button.setEnabled(z);
                     }
-                    EPLog.d("sequence = " + BleWorkActivity.mBleWork.mSequence);
-                    BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.AFTER_SETTING_PASSWORD;
-                    BleWorkActivity.mBleWork.disconnect(false);
-                    EPLog.d("sequence = " + BleWorkActivity.mBleWork.mSequence);
+                    EPLog.d("sequence = " + mBleWork.mSequence);
+                    mBleWork.mSequence = BleWork.jobSequence.AFTER_SETTING_PASSWORD;
+                    mBleWork.disconnect(false);
+                    EPLog.d("sequence = " + mBleWork.mSequence);
                 }
             });
         }
@@ -830,131 +834,9 @@ public class BleWorkActivity extends ActivityIACommon {
         }
     }
 
-    /* JADX WARNING: Can't fix incorrect switch cases order */
-    /* JADX WARNING: Code restructure failed: missing block: B:12:0x0031, code lost:
-        if (r11 > 63) goto L_0x00ac;
-     */
-    /* JADX WARNING: Code restructure failed: missing block: B:14:0x0037, code lost:
-        if (r11 <= 63) goto L_0x00ad;
-     */
-    /* JADX WARNING: Code restructure failed: missing block: B:16:0x0055, code lost:
-        if (java.util.Arrays.asList(new java.lang.Integer[]{13, 26}).contains(java.lang.Integer.valueOf(r11)) != false) goto L_0x00ad;
-     */
-    /* JADX WARNING: Code restructure failed: missing block: B:18:0x0072, code lost:
-        if (java.util.Arrays.asList(new java.lang.Integer[]{5, 10}).contains(java.lang.Integer.valueOf(r11)) != false) goto L_0x00ad;
-     */
-    /* JADX WARNING: Code restructure failed: missing block: B:20:0x009d, code lost:
-        if (java.util.Arrays.asList(new java.lang.Integer[]{5, 10, 13, 26}).contains(java.lang.Integer.valueOf(r11)) != false) goto L_0x00ad;
-     */
-    /* JADX WARNING: Code restructure failed: missing block: B:23:0x00a4, code lost:
-        if (r11 <= 32) goto L_0x00ad;
-     */
-    /* JADX WARNING: Code restructure failed: missing block: B:25:0x00a9, code lost:
-        if (r11 <= 63) goto L_0x00ad;
-     */
-    /* Code decompiled incorrectly, please refer to instructions dump. */
+
     public void validateInputText(int r10, java.lang.String r11) {
-        /*
-            r9 = this;
-            java.lang.String r0 = r11.toString()
-            java.lang.String r1 = "^[^ -~。-゚]+$"
-            boolean r0 = r0.matches(r1)
-            r1 = 0
-            r2 = 1
-            if (r0 != 0) goto L_0x00ac
-            int r11 = r11.length()
-            r0 = 7
-            r3 = 63
-            r4 = 8
-            if (r10 == r0) goto L_0x00a7
-            r0 = 100
-            if (r10 == r0) goto L_0x00a0
-            r0 = 26
-            r5 = 13
-            r6 = 10
-            r7 = 2
-            r8 = 5
-            switch(r10) {
-                case 2: goto L_0x0075;
-                case 3: goto L_0x0058;
-                case 4: goto L_0x003b;
-                case 5: goto L_0x00a7;
-                default: goto L_0x0028;
-            }
-        L_0x0028:
-            switch(r10) {
-                case 9: goto L_0x0035;
-                case 10: goto L_0x0035;
-                case 11: goto L_0x0035;
-                default: goto L_0x002b;
-            }
-        L_0x002b:
-            if (r11 == 0) goto L_0x00ad
-            if (r11 == r8) goto L_0x00ad
-            if (r11 < r4) goto L_0x00ac
-            if (r11 > r3) goto L_0x00ac
-            goto L_0x00ad
-        L_0x0035:
-            if (r11 < r4) goto L_0x00ac
-            if (r11 > r3) goto L_0x00ac
-            goto L_0x00ad
-        L_0x003b:
-            java.lang.Integer[] r10 = new java.lang.Integer[r7]
-            java.lang.Integer r3 = java.lang.Integer.valueOf(r5)
-            r10[r1] = r3
-            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
-            r10[r2] = r0
-            java.util.List r10 = java.util.Arrays.asList(r10)
-            java.lang.Integer r11 = java.lang.Integer.valueOf(r11)
-            boolean r10 = r10.contains(r11)
-            if (r10 == 0) goto L_0x00ac
-            goto L_0x00ad
-        L_0x0058:
-            java.lang.Integer[] r10 = new java.lang.Integer[r7]
-            java.lang.Integer r0 = java.lang.Integer.valueOf(r8)
-            r10[r1] = r0
-            java.lang.Integer r0 = java.lang.Integer.valueOf(r6)
-            r10[r2] = r0
-            java.util.List r10 = java.util.Arrays.asList(r10)
-            java.lang.Integer r11 = java.lang.Integer.valueOf(r11)
-            boolean r10 = r10.contains(r11)
-            if (r10 == 0) goto L_0x00ac
-            goto L_0x00ad
-        L_0x0075:
-            r10 = 4
-            java.lang.Integer[] r10 = new java.lang.Integer[r10]
-            java.lang.Integer r3 = java.lang.Integer.valueOf(r8)
-            r10[r1] = r3
-            java.lang.Integer r3 = java.lang.Integer.valueOf(r6)
-            r10[r2] = r3
-            java.lang.Integer r3 = java.lang.Integer.valueOf(r5)
-            r10[r7] = r3
-            r3 = 3
-            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
-            r10[r3] = r0
-            java.util.List r10 = java.util.Arrays.asList(r10)
-            java.lang.Integer r11 = java.lang.Integer.valueOf(r11)
-            boolean r10 = r10.contains(r11)
-            if (r10 == 0) goto L_0x00ac
-            goto L_0x00ad
-        L_0x00a0:
-            if (r11 < r2) goto L_0x00ac
-            r10 = 32
-            if (r11 > r10) goto L_0x00ac
-            goto L_0x00ad
-        L_0x00a7:
-            if (r11 < r4) goto L_0x00ac
-            if (r11 > r3) goto L_0x00ac
-            goto L_0x00ad
-        L_0x00ac:
-            r2 = 0
-        L_0x00ad:
-            android.app.AlertDialog r10 = r9.mDialog
-            r11 = -1
-            android.widget.Button r10 = r10.getButton(r11)
-            r10.setEnabled(r2)
-            return
-        */
-        throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.ble.BleWorkActivity.validateInputText(int, java.lang.String):void");
+
+        throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.ble.validateInputText(int, java.lang.String):void");
     }
 }

+ 4 - 1
app/src/main/java/com/epson/mobilephone/common/ble/DeviceAdapter.java

@@ -1,5 +1,6 @@
 package com.epson.mobilephone.common.ble;
 
+import android.app.Service;
 import android.bluetooth.BluetoothDevice;
 import android.content.Context;
 import android.content.res.Resources;
@@ -14,6 +15,8 @@ import android.widget.TextView;
 import com.epson.mobilephone.common.ble.util.ScannedDevice;
 
 import epson.print.IprintApplication;
+import epson.print.R;
+import epson.print.Util.EPLog;
 
 import java.util.Iterator;
 import java.util.List;
@@ -28,7 +31,7 @@ public class DeviceAdapter extends ArrayAdapter<ScannedDevice> {
         super(context, i, list);
         mResId = i;
         mList = list;
-        mInflater = (LayoutInflater) context.getSystemService("layout_inflater");
+        mInflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
     }
 
     public View getView(int i, View view, ViewGroup viewGroup) {

+ 33 - 34
app/src/main/java/com/epson/mobilephone/common/ble/ProbePrinter.java

@@ -4,20 +4,19 @@ import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.ServiceConnection;
+import android.media.ExifInterface;
 import android.os.AsyncTask;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Message;
 import android.os.RemoteException;
-import android.support.media.ExifInterface;
-
 import com.epson.mobilephone.common.maintain2.MaintainPrinter2;
 import com.epson.mobilephone.common.wifidirect.WiFiDirectManager;
-
 import epson.common.ExternalFileUtils;
 import epson.common.Utils;
 import epson.print.CommonDefine;
 import epson.print.MyPrinter;
+import epson.print.Util.EPLog;
 import epson.print.service.EpsonService;
 import epson.print.service.IEpsonService;
 import epson.print.service.IEpsonServiceCallback;
@@ -52,20 +51,20 @@ public class ProbePrinter {
             EPLog.i("find      :" + str + ":" + str2 + ":★" + str3 + "★:" + str4);
             if (str.contains("FINISH")) {
                 EPLog.i(" !!  FINISH  !!");
-                if (!ProbePrinter.this.isPrinterFound) {
-                    ProbePrinter.this.unbindEpsonService();
+                if (!isPrinterFound) {
+                    unbindEpsonService();
                     EPLog.i(" !!  確認失敗  !!");
-                    ProbePrinter.this.callbackCompletion(false);
+                    callbackCompletion(false);
                 }
-            } else if (str3.contains(ProbePrinter.macAddress)) {
-                EPLog.i(" !!  FIND    OK    !! :" + ProbePrinter.macAddress + ": ◆");
-                boolean unused = ProbePrinter.this.isPrinterFound = true;
+            } else if (str3.contains(macAddress)) {
+                EPLog.i(" !!  FIND    OK    !! :" + macAddress + ": ◆");
+                boolean unused = isPrinterFound = true;
                 MyPrinter myPrinter = new MyPrinter(str, str2, str3, str4);
-                Message obtainMessage = ProbePrinter.mHandler.obtainMessage();
+                Message obtainMessage = mHandler.obtainMessage();
                 obtainMessage.obj = myPrinter;
                 obtainMessage.what = 4;
-                ProbePrinter.mHandler.sendMessage(obtainMessage);
-                ProbePrinter.mHandler.sendEmptyMessageDelayed(2, 100);
+                mHandler.sendMessage(obtainMessage);
+                mHandler.sendEmptyMessageDelayed(2, 100);
             }
         }
 
@@ -88,10 +87,10 @@ public class ProbePrinter {
     private ServiceConnection mEpsonConnection = new ServiceConnection() {
         public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
             EPLog.i();
-            IEpsonService unused = ProbePrinter.mEpsonService = IEpsonService.Stub.asInterface(iBinder);
-            if (ProbePrinter.mEpsonService != null) {
+            IEpsonService unused = mEpsonService = IEpsonService.Stub.asInterface(iBinder);
+            if (mEpsonService != null) {
                 try {
-                    ProbePrinter.mEpsonService.registerCallback(ProbePrinter.mCallback);
+                    mEpsonService.registerCallback(mCallback);
                 } catch (RemoteException e) {
                     e.printStackTrace();
                 }
@@ -100,7 +99,7 @@ public class ProbePrinter {
 
         public void onServiceDisconnected(ComponentName componentName) {
             EPLog.i("ComponentName " + componentName);
-            IEpsonService unused = ProbePrinter.mEpsonService = null;
+            IEpsonService unused = mEpsonService = null;
         }
     };
     private IEpsonService mEpsonService;
@@ -108,27 +107,27 @@ public class ProbePrinter {
         public boolean handleMessage(Message message) {
             int i = message.what;
             if (i == 4) {
-                ProbePrinter probePrinter = ProbePrinter.this;
-                new printerProbeTask(probePrinter.context, (MyPrinter) message.obj).execute(new Void[0]);
+                ProbePrinter probePrinter = this;
+                new printerProbeTask(context, (MyPrinter) message.obj).execute(new Void[0]);
             } else if (i != 17) {
                 switch (i) {
                     case 1:
                         try {
-                            ProbePrinter.this.search();
+                            search();
                             break;
                         } catch (IllegalStateException e) {
                             EPLog.e(e.getMessage());
                             break;
                         }
                     case 2:
-                        ProbePrinter.this.interruptSearch();
+                        interruptSearch();
                         break;
                     default:
                         EPLog.i("not handled (" + message.what + ")");
                         break;
                 }
             } else {
-                ProbePrinter.this.bindEpsonService();
+                bindEpsonService();
             }
             return false;
         }
@@ -208,7 +207,7 @@ public class ProbePrinter {
     private void unbindEpsonService() {
         EPLog.i();
         if (mEpsonService != null) {
-            if (!this.isPrinterFound) {
+            if (!isPrinterFound) {
                 mHandler.sendEmptyMessageDelayed(2, 200);
                 EPLog.i("1");
             }
@@ -234,9 +233,9 @@ public class ProbePrinter {
     }
 
     private void selectPrinter(MyPrinter myPrinter) {
-        myPrinter.setCurPrinter(this.context.getApplicationContext());
-        Utils.savePref(this.context.getApplicationContext(), "PrintSetting", CommonDefine.RE_SEARCH, true);
-        WiFiDirectManager.resetConnectInfo(this.context.getApplicationContext(), WiFiDirectManager.DEVICE_TYPE_PRINTER);
+        myPrinter.setCurPrinter(context.getApplicationContext());
+        Utils.savePref(context.getApplicationContext(), "PrintSetting", CommonDefine.RE_SEARCH, true);
+        WiFiDirectManager.resetConnectInfo(context.getApplicationContext(), WiFiDirectManager.DEVICE_TYPE_PRINTER);
     }
 
     private class printerProbeTask extends AsyncTask<Void, Void, Integer> {
@@ -288,11 +287,11 @@ public class ProbePrinter {
         protected void onPostExecute(Integer num) {
             super.onPostExecute(num);
             if (num.intValue() == 0) {
-                ProbePrinter.this.selectPrinter(mMyPrinter);
-                ProbePrinter.this.callbackCompletion(true);
+                selectPrinter(mMyPrinter);
+                callbackCompletion(true);
                 return;
             }
-            ProbePrinter.this.callbackCompletion(false);
+            callbackCompletion(false);
         }
     }
 
@@ -307,7 +306,7 @@ public class ProbePrinter {
             boolean z;
             Context applicationContext = contextArr[0].getApplicationContext();
             EPLog.i("スキャナ検索処理");
-            int escanWrapperInitDriver = ProbePrinter.mScanner.escanWrapperInitDriver(applicationContext);
+            int escanWrapperInitDriver = mScanner.escanWrapperInitDriver(applicationContext);
             if (escanWrapperInitDriver == -1050) {
                 z = true;
             } else if (escanWrapperInitDriver != 0) {
@@ -317,10 +316,10 @@ public class ProbePrinter {
                 z = false;
             }
             try {
-                ScanSettingHelper.recodeScannerInfo(ProbePrinter.mScanner, applicationContext, mPrinter);
+                ScanSettingHelper.recodeScannerInfo(mScanner, applicationContext, mPrinter);
                 EPLog.i("Scan 機能あり");
                 if (!z) {
-                    ProbePrinter.mScanner.escanWrapperReleaseDriver();
+                    mScanner.escanWrapperReleaseDriver();
                 }
                 EPLog.i("YYY");
                 return contextArr[0];
@@ -328,12 +327,12 @@ public class ProbePrinter {
                 EPLog.i("Scan 機能なし");
                 Context context = contextArr[0];
                 if (!z) {
-                    ProbePrinter.mScanner.escanWrapperReleaseDriver();
+                    mScanner.escanWrapperReleaseDriver();
                 }
                 return context;
             } catch (Throwable th) {
                 if (!z) {
-                    ProbePrinter.mScanner.escanWrapperReleaseDriver();
+                    mScanner.escanWrapperReleaseDriver();
                 }
                 throw th;
             }
@@ -342,7 +341,7 @@ public class ProbePrinter {
         protected void onPostExecute(Context context) {
             super.onPostExecute(context);
             EPLog.i("スキャナ検索onPostExecute");
-            ProbePrinter.this.callbackCompletion(true);
+            callbackCompletion(true);
         }
     }
 }

+ 9 - 3
app/src/main/java/com/epson/mobilephone/common/guide/GuideWebviewFragment.java

@@ -2,7 +2,6 @@ package com.epson.mobilephone.common.guide;
 
 import android.content.Context;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -11,8 +10,11 @@ import android.widget.FrameLayout;
 
 import androidx.fragment.app.Fragment;
 
-import com.epson.guidelib.R;
+import epson.print.R;
 
+/**
+ * 新手引导页
+ */
 public class GuideWebviewFragment extends Fragment {
     private static final String ARG_PARAM1 = "html_file_path";
     MyClickListener mClickListerner;
@@ -20,6 +22,9 @@ public class GuideWebviewFragment extends Fragment {
     private WebView mWebView;
     private FrameLayout mWebViewFrame;
 
+    /**
+     * 子类实现自定义监听方法
+     */
     public interface MyClickListener {
         void onClickClose();
     }
@@ -28,7 +33,7 @@ public class GuideWebviewFragment extends Fragment {
         GuideWebviewFragment guideWebviewFragment = new GuideWebviewFragment();
         Bundle bundle = new Bundle();
         bundle.putString(ARG_PARAM1, str);
-        setArguments(bundle);
+        guideWebviewFragment.setArguments(bundle);
         return guideWebviewFragment;
     }
 
@@ -41,6 +46,7 @@ public class GuideWebviewFragment extends Fragment {
 
     public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
         View inflate = layoutInflater.inflate(R.layout.fragment_guide_webview, viewGroup, false);
+
         mWebView = (WebView) inflate.findViewById(R.id.guideWebview);
         mWebViewFrame = (FrameLayout) inflate.findViewById(R.id.guideWebViewFrame);
         ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) mWebView.getLayoutParams();

+ 6 - 3
app/src/main/java/com/epson/mobilephone/common/guide/MyViewPager.java

@@ -1,12 +1,14 @@
 package com.epson.mobilephone.common.guide;
 
 import android.content.Context;
-
 import android.util.AttributeSet;
 import android.view.View;
 
 import androidx.viewpager.widget.ViewPager;
 
+/**
+ * 自定义ViewPage
+ */
 public class MyViewPager extends ViewPager {
     public MyViewPager(Context context) {
         super(context);
@@ -16,16 +18,17 @@ public class MyViewPager extends ViewPager {
         super(context, attributeSet);
     }
 
+    @Override
     protected void onMeasure(int i, int i2) {
         int i3 = 0;
         for (int i4 = 0; i4 < getChildCount(); i4++) {
             View childAt = getChildAt(i4);
-            childAt.measure(i, View.MeasureSpec.makeMeasureSpec(0, 0));
+            childAt.measure(i, View.MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
             int measuredHeight = childAt.getMeasuredHeight();
             if (measuredHeight > i3) {
                 i3 = measuredHeight;
             }
         }
-        super.onMeasure(i, View.MeasureSpec.makeMeasureSpec(i3, 1073741824));
+        super.onMeasure(i, View.MeasureSpec.makeMeasureSpec(i3, MeasureSpec.UNSPECIFIED));
     }
 }

+ 19 - 18
app/src/main/java/com/epson/mobilephone/common/guide/NoticeGuideActivity.java

@@ -4,7 +4,6 @@ import android.content.Intent;
 import android.content.res.Configuration;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.Button;
@@ -18,13 +17,15 @@ import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentManager;
 import androidx.fragment.app.FragmentStatePagerAdapter;
 import androidx.viewpager.widget.ViewPager;
-import com.epson.mobilephone.common.guide.GuideWebviewFragment;
 
 import java.util.ArrayList;
 import java.util.Locale;
 
 import epson.print.R;
 
+/**
+ * 新手引导页
+ */
 public class NoticeGuideActivity extends AppCompatActivity implements GuideWebviewFragment.MyClickListener {
 
     public static int DIALOG_MODE_OFF = 20001;
@@ -66,7 +67,7 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
         Intent intent = getIntent();
         if (intent != null) {
             htmlpath = intent.getStringArrayListExtra(KEY_HTML_PATH);
-            if (this.htmlpath.size() == 0) {
+            if (htmlpath.size() == 0) {
                 finish();
             }
             boot_mode = intent.getIntExtra(KEY_BOOT_MODE, 0);
@@ -76,12 +77,12 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
             mDialogTextMessage = intent.getStringExtra(KEY_DIALOG_TITLE);
             mDialogButtonYes = intent.getStringExtra(KEY_DIALOG_BUTTON_YES);
             mDialogButtonNo = intent.getStringExtra(KEY_DIALOG_BUTTON_NO);
-            if (this.boot_group != null) {
+            if (boot_group != null) {
                 SP_KEY_GUIDE_VER += "-" + boot_group;
             }
         }
-        if (this.boot_mode == MODE_AUTO) {
-            if (this.version <= PreferenceManager.getDefaultSharedPreferences(this).getInt(this.SP_KEY_GUIDE_VER, 0)) {
+        if (boot_mode == MODE_AUTO) {
+            if (version <= PreferenceManager.getDefaultSharedPreferences(this).getInt(SP_KEY_GUIDE_VER, 0)) {
                 finish();
             }
         }
@@ -111,7 +112,7 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
         if (i == DIALOG_MODE_ON || i == DIALOG_MODE_ONLY_BUTTON) {
             mGuideDialogView.setVisibility(View.VISIBLE);
             ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) mGuideDialogView.getLayoutParams();
-            marginLayoutParams.width = Utils.dptopx(Utils.getWebViewDP(this, getApplicationContext()) + Utils.LAYOUT_MEARGIN, getApplicationContext());
+            marginLayoutParams.width = (int) Utils.dptopx(Utils.getWebViewDP(this, getApplicationContext()) + Utils.LAYOUT_MEARGIN, getApplicationContext());
             mGuideDialogView.setLayoutParams(marginLayoutParams);
             mOK = (Button) findViewById(R.id.ok_button);
             mCancel = (Button) findViewById(R.id.cancel_btn);
@@ -125,20 +126,20 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
             }
             mOK.setOnClickListener(new View.OnClickListener() {
                 public void onClick(View view) {
-                    NoticeGuideActivity.this.setResult(-1);
-                    NoticeGuideActivity.this.onClickClose();
+                    setResult(-1);
+                    onClickClose();
                 }
             });
             mCancel.setOnClickListener(new View.OnClickListener() {
                 public void onClick(View view) {
-                    NoticeGuideActivity.this.setResult(0);
-                    NoticeGuideActivity.this.onClickClose();
+                    setResult(0);
+                    onClickClose();
                 }
             });
-            if (this.dialog_mode == DIALOG_MODE_ON && (str = mDialogTextMessage) != null) {
+            if (dialog_mode == DIALOG_MODE_ON && (str = mDialogTextMessage) != null) {
                 mDialogText.setText(str);
             }
-            if (this.dialog_mode == DIALOG_MODE_ONLY_BUTTON) {
+            if (dialog_mode == DIALOG_MODE_ONLY_BUTTON) {
                 mGrayLine_Hor.setVisibility(View.GONE);
                 mDialogText.setVisibility(View.GONE);
                 mOK.setBackground(getResources().getDrawable(R.drawable.rectangle_left_button));
@@ -152,8 +153,8 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
     }
 
     public void onClickClose() {
-        if (this.boot_mode == MODE_AUTO) {
-            PreferenceManager.getDefaultSharedPreferences(this).edit().putInt(this.SP_KEY_GUIDE_VER, version).apply();
+        if (boot_mode == MODE_AUTO) {
+            PreferenceManager.getDefaultSharedPreferences(this).edit().putInt(SP_KEY_GUIDE_VER, version).apply();
         }
         finish();
     }
@@ -161,13 +162,13 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
     public void onConfigurationChanged(Configuration configuration) {
         switch (configuration.orientation) {
             case 1:
-                if (this.dialog_mode == DIALOG_MODE_ON) {
+                if (dialog_mode == DIALOG_MODE_ON) {
                     mGuideDialogView.setVisibility(View.VISIBLE);
                     break;
                 }
                 break;
             case 2:
-                if (this.dialog_mode == DIALOG_MODE_ON) {
+                if (dialog_mode == DIALOG_MODE_ON) {
                     mGuideDialogView.setVisibility(View.GONE);
                     break;
                 }
@@ -207,7 +208,7 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
             mPagePosition = new ImageView[i];
             int i2 = 0;
             while (i2 < i) {
-                ImageView imageView = new ImageView(NoticeGuideActivity.this.getApplicationContext());
+                ImageView imageView = new ImageView(getApplicationContext());
                 imageView.setImageResource(R.drawable.cycle02);
                 int i3 = i2 + 1;
                 viewGroup.addView(imageView, i3);

+ 7 - 4
app/src/main/java/com/epson/mobilephone/common/guide/Utils.java

@@ -6,6 +6,9 @@ import android.graphics.Point;
 import android.util.TypedValue;
 import android.view.Display;
 
+/**
+ * 像素转换工具类
+ */
 public class Utils {
     public static int LAYOUT_MEARGIN = 32;
     public static int WEBVIEW_300DP_SIZE = 300;
@@ -34,11 +37,11 @@ public class Utils {
         return point;
     }
 
-    public static float pxtodp(int i, Context context) {
-        return ((float) i) / context.getResources().getDisplayMetrics().density;
+    public static int pxtodp(int i, Context context) {
+        return (int) (i/ context.getResources().getDisplayMetrics().density);
     }
 
-    public static float dptopx(int i, Context context) {
-        return TypedValue.applyDimension(1, (float) i, context.getResources().getDisplayMetrics());
+    public static int dptopx(int i, Context context) {
+        return (int) TypedValue.applyDimension(1,  i, context.getResources().getDisplayMetrics());
     }
 }

+ 16 - 0
app/src/main/java/com/epson/mobilephone/common/license/DefaultLicenseInfo.java

@@ -7,11 +7,27 @@ import androidx.annotation.NonNull;
 import epson.print.R;
 
 
+/**
+ * 基类
+ */
 public abstract class DefaultLicenseInfo implements LicenseInfo {
+
+    /**
+     * 用户协议
+     *
+     * @param context 上下文
+     * @return
+     */
     private String getDefaultSoftwareLicense(@NonNull Context context) {
         return Util.getStringFromRawResource(context, R.raw.eula);
     }
 
+    /**
+     * 隐私协议
+     *
+     * @param context 上下文
+     * @return
+     */
     private String getDefaultPrivacyStatement(@NonNull Context context) {
         return Util.getStringFromRawResource(context, R.raw.privacy);
     }

+ 6 - 0
app/src/main/java/com/epson/mobilephone/common/license/InfoDisplayActivity.java

@@ -110,6 +110,12 @@ public class InfoDisplayActivity extends AppCompatActivity {
         bundle.putInt(KEY_SCROLL_Y, mScrollView.getLastY());
     }
 
+    /**
+     * @param context 跳转前Activity的上下文对象
+     * @param licenseInfo
+     * @param i
+     * @return
+     */
     @NonNull
     public static Intent getStartIntent(@NonNull Context context, LicenseInfo licenseInfo, int i) {
         Intent intent = new Intent(context, InfoDisplayActivity.class);

+ 3 - 16
app/src/main/java/com/epson/mobilephone/common/license/LicenseInfo.java

@@ -8,23 +8,10 @@ import java.io.Serializable;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
+/**
+ * 协议对象
+ */
 public interface LicenseInfo extends Serializable {
-    public static final int DOCUMENT_TYPE_LICENSE = 1;
-    public static final int DOCUMENT_TYPE_OSS_LICENSE = 3;
-    public static final int DOCUMENT_TYPE_PRIVACY_STATEMENT = 2;
-    public static final int LICENSE_MODE_AGREED_CURRENT_VERSION = 3;
-    public static final int LICENSE_MODE_EULA_AND_PRIVACY_CHANGED = 0;
-    public static final int LICENSE_MODE_EULA_CHANGED = 1;
-    public static final int LICENSE_MODE_NOT_AGREED = -1;
-    public static final int LICENSE_MODE_PRIVACY_STATEMENT_CHANGED = 2;
-
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface DocumentType {
-    }
-
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface LicenseMode {
-    }
 
     String getApplicationName(@NonNull Context context);
 

+ 14 - 1
app/src/main/java/com/epson/mobilephone/common/license/LicenseTopActivity.java

@@ -44,6 +44,7 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
                 startDocumentDisplayActivity(2);
             }
         });
+
         ((Button) findViewById(R.id.agreeButton)).setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {
                 onAgree();
@@ -104,6 +105,9 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
         SimpleMessageDialogFragment.newInstance(getString(R.string.Update_Message) + Constants.BREAK_LINE + str, 1).show(getSupportFragmentManager(), DIALOG_ID);
     }
 
+    /**
+     * 同意点击事件
+     */
     private void onAgree() {
         LicenseInfo licenseInfo = mLicenseInfo;
         if (licenseInfo == null) {
@@ -130,6 +134,9 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
         }
     }
 
+    /**
+     * 不同意则弹框确认
+     */
     private void onDisagree() {
         SimpleMessageDialogFragment.newInstance(getString(R.string.Disagree_License_Button_Message), 2).show(getSupportFragmentManager(), DIALOG_ID);
     }
@@ -146,13 +153,19 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
         }
     }
 
+    /**
+     * 实现点击事件
+     *
+     * @param i
+     */
+    @Override
     public void onButtonClicked(int i) {
         switch (i) {
             case 1:
                 return;
             case 2:
                 setResult(0);
-                finish();
+                finish(); //不同意退出app
                 return;
             default:
                 return;

+ 16 - 1
app/src/main/java/com/epson/mobilephone/common/license/SimpleMessageDialogFragment.java

@@ -12,7 +12,11 @@ import androidx.fragment.app.DialogFragment;
 import epson.print.R;
 
 
+/**
+ * 自定义对话框
+ */
 public class SimpleMessageDialogFragment extends DialogFragment {
+    
     private static final String PARAM_DIALOG_ID = "dialog_id";
     private static final String PARAM_MESSAGE_STRING = "message_string";
     private DialogCallback mDialogCallback;
@@ -23,6 +27,13 @@ public class SimpleMessageDialogFragment extends DialogFragment {
         void onButtonClicked(int i);
     }
 
+    /**
+     * 实例化一个单确认按钮的对话框
+     *
+     * @param str 显示字符串
+     * @param i   对话框id
+     * @return
+     */
     @NonNull
     public static SimpleMessageDialogFragment newInstance(String str, int i) {
         SimpleMessageDialogFragment simpleMessageDialogFragment = new SimpleMessageDialogFragment();
@@ -41,17 +52,21 @@ public class SimpleMessageDialogFragment extends DialogFragment {
     }
 
     @NonNull
+    @Override
     public Dialog onCreateDialog(Bundle bundle) {
         super.onCreateDialog(bundle);
         AlertDialog create = new AlertDialog.Builder(getActivity()).setMessage(mMessageString).setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {
             public void onClick(DialogInterface dialogInterface, int i) {
-                SimpleMessageDialogFragment.this.onOkClicked();
+                onOkClicked();
             }
         }).create();
         setCancelable(false);
         return create;
     }
 
+    /**
+     * 对话框点击事件
+     */
     private void onOkClicked() {
         mDialogCallback.onButtonClicked(mDialogId);
     }

+ 3 - 17
app/src/main/java/com/epson/mobilephone/common/license/UserSurveyInfo.java

@@ -2,29 +2,15 @@ package com.epson.mobilephone.common.license;
 
 import android.content.Context;
 
-
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
 import java.io.Serializable;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
 
+/**
+ * 用户隐私信息接口
+ */
 public interface UserSurveyInfo extends Serializable {
-    public static final int BUTTON_CANCEL = 0;
-    public static final int BUTTON_OK = 1;
-    public static final int NOT_RESPONDED = 0;
-    public static final int RESPONDED_CURRENT_VERSION = 2;
-    public static final int RESPONDED_OLD_VERSION = 1;
-
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ButtonType {
-    }
-
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface UserSurveyMode {
-    }
-
     @Nullable
     String getButtonString(@NonNull Context context, int i);
 

+ 11 - 4
app/src/main/java/com/epson/mobilephone/common/license/UserSurveyInvitationActivity.java

@@ -15,6 +15,9 @@ import androidx.appcompat.widget.Toolbar;
 import epson.common.Constants;
 import epson.print.R;
 
+/**
+ *
+ */
 public class UserSurveyInvitationActivity extends AppCompatActivity implements SimpleMessageDialogFragment.DialogCallback {
     private static final int DIALOG_ID_CHANGE_DIALOG = 1;
     private static final String PARAM_DISPLAY_CHANGE_DIALOG = "display_change_dialog";
@@ -32,23 +35,24 @@ public class UserSurveyInvitationActivity extends AppCompatActivity implements S
         UserSurveyInfo userSurveyInfo;
         super.onCreate(bundle);
         setContentView(R.layout.activity_user_survey_invitation);
+
         setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
         setTitle(R.string.GALicense);
-        Button button = (Button) findViewById(R.id.disagreeButton);
+        Button button = findViewById(R.id.disagreeButton);
         button.setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {
-                UserSurveyInvitationActivity.this.finishWithStatus(false);
+                finishWithStatus(false);
             }
         });
         Button button2 = (Button) findViewById(R.id.agreeButton);
         button2.setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {
-                UserSurveyInvitationActivity.this.finishWithStatus(true);
+                finishWithStatus(true);
             }
         });
         ((ViewGroup) findViewById(R.id.privacyStatementViewGroup)).setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {
-                UserSurveyInvitationActivity.this.startPrivacyStatementDisplayActivity();
+                startPrivacyStatementDisplayActivity();
             }
         });
         TextView textView = (TextView) findViewById(R.id.analytics_content);
@@ -76,6 +80,9 @@ public class UserSurveyInvitationActivity extends AppCompatActivity implements S
         }
     }
 
+    /**
+     * 跳转到用户隐私协议页面
+     */
     private void startPrivacyStatementDisplayActivity() {
         LicenseInfo licenseInfo = mLicenseInfo;
         if (licenseInfo != null) {

+ 1 - 1
app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityRequestLocationPermission.java

@@ -18,7 +18,7 @@ import android.os.Handler;
 import android.provider.Settings;
 
 
-import android.support.p000v4.app.Fragment;
+
 import android.widget.LinearLayout;
 import android.widget.TextView;
 

+ 1 - 1
app/src/main/java/epson/common/CustomListRowAdapter.java

@@ -28,7 +28,7 @@ public class CustomListRowAdapter extends ArrayAdapter<CustomListRow> {
         super(context, i, list);
         resourceId = i;
         items = list;
-        inflater = (LayoutInflater) context.getSystemService("layout_inflater");
+        inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
         listener = onClickListener;
     }
 

+ 1 - 1
app/src/main/java/epson/common/ExifCopy.java

@@ -3,7 +3,7 @@ package epson.common;
 import android.os.Build;
 
 import android.support.annotation.RequiresApi;
-import android.support.media.ExifInterface;
+
 
 import java.io.IOException;
 import java.util.ArrayList;

+ 19 - 3
app/src/main/java/epson/common/ExternalFileUtils.java

@@ -1,13 +1,16 @@
 package epson.common;
 
 import android.content.Context;
+
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.VisibleForTesting;
-import epson.print.Util.EPLog;
+
 import java.io.File;
 import java.util.Locale;
 
+import epson.print.Util.EPLog;
+
 public class ExternalFileUtils {
     private static String AREA_INFO = "area_info.dat";
     private static String EPSONIPRINT_DOWNLOAD_FOLDER = "download/";
@@ -82,8 +85,13 @@ public class ExternalFileUtils {
         return file.mkdirs();
     }
 
-    public void clearTempFoler(String str) {
-        File file = new File(str);
+    /**
+     * 清除临时文件夹
+     *
+     * @param dirPath 文件夹路径
+     */
+    public void clearTempFoler(String dirPath) {
+        File file = new File(dirPath);
         File[] listFiles = file.listFiles();
         if (listFiles != null) {
             for (int i = 0; i < listFiles.length; i++) {
@@ -144,6 +152,11 @@ public class ExternalFileUtils {
         return new File(getFilesDir()).getParent();
     }
 
+    /**
+     * 远程打印机保存路径
+     *
+     * @return 文件夹路径
+     */
     public String getRemotePrintersInfo() {
         return new File(getWorkingDir(), INFO_FOLDER_REMOTEPRINTER).getPath();
     }
@@ -152,6 +165,9 @@ public class ExternalFileUtils {
         return new File(getWorkingDir(), INFO_FOLDER_IPPRINTER).getPath();
     }
 
+    /**
+     * 清除远程打印机信息,缓存
+     */
     public void clearRemotePrintersInfo() {
         clearTempFoler(getRemotePrintersInfo());
     }

+ 9 - 0
app/src/main/java/epson/common/IprintAppRecord.java

@@ -7,11 +7,20 @@ import android.preference.PreferenceManager;
 import androidx.annotation.NonNull;
 
 
+/**
+ * sp中用户确认隐私协议保存设置
+ */
 public class IprintAppRecord {
     private static final String KEY_LICENSE_AGREE_TIME = "license_agree_time";
     private static final String KEY_LICENSE_AGREE_VERSION_CODE = "license_agree_version_code";
     private static final String KEY_LICENSE_SCREEN_SHOWN_PREF = "licenseScreenShown";
 
+    /**
+     * 用户是否同意了协议
+     *
+     * @param context
+     * @return
+     */
     public boolean getLicenseAgreementValue(@NonNull Context context) {
         return getLicensePreferences(context).getBoolean(KEY_LICENSE_SCREEN_SHOWN_PREF, false);
     }

+ 12 - 0
app/src/main/java/epson/common/IprintLicenseInfo.java

@@ -2,10 +2,17 @@ package epson.common;
 
 import android.content.Context;
 
+import androidx.annotation.NonNull;
+
 import com.epson.mobilephone.common.license.DefaultLicenseInfo;
 
 import java.util.Locale;
 
+import epson.print.R;
+
+/**
+ *
+ */
 public class IprintLicenseInfo extends DefaultLicenseInfo {
     private static final int LICENSE_VERSION_CODE = 70006;
     private static final int PRIVACY_STATEMENT_VERSION_CODE = 60600;
@@ -52,6 +59,11 @@ public class IprintLicenseInfo extends DefaultLicenseInfo {
         return new IprintLicenseInfo().getLicenseAgreement(context) == 3;
     }
 
+    /**
+     * 是否同意隐私协议检测
+     *
+     * @param context
+     */
     public static void beforeLicenseCheck(@NonNull Context context) {
         if (!new IprintAppRecord().getLicenseAgreementValue(context)) {
             ExternalFileUtils.getInstance(context).clearRemotePrintersInfo();

+ 1 - 1
app/src/main/java/epson/maintain/BatteryInfoAdapter.java

@@ -28,7 +28,7 @@ public class BatteryInfoAdapter extends ArrayAdapter<BatteryInfoAdapter.BatteryI
         super(context, i, arrayList);
         mResourceId = i;
         mItems = arrayList;
-        mInflater = (LayoutInflater) context.getSystemService("layout_inflater");
+        mInflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
     }
 
     public View getView(int i, View view, ViewGroup viewGroup) {

+ 1 - 1
app/src/main/java/epson/maintain/EfuReader.java

@@ -2,7 +2,7 @@ package epson.maintain;
 
 
 
-import android.support.media.ExifInterface;
+
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;

+ 8 - 2
app/src/main/java/epson/print/ActivityIACommon.java

@@ -9,8 +9,14 @@ import androidx.appcompat.widget.Toolbar;
  * 基类
  */
 public abstract class ActivityIACommon extends AppCompatActivity {
-    protected void setActionBar(int i, boolean z) {
-        setActionBar(getResources().getString(i), z);
+
+    /**
+     * 设置标题栏
+     * @param i
+     * @param z
+     */
+    protected void setActionBar(int resId, boolean z) {
+        setActionBar(getResources().getString(resId), z);
     }
 
     protected void setActionBar(String str, boolean z) {

+ 1 - 1
app/src/main/java/epson/print/ActivityRequestPermissions.java

@@ -10,7 +10,7 @@ import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
 import android.support.p000v4.app.ActivityCompat;
-import android.support.p000v4.app.Fragment;
+
 
 import java.io.Serializable;
 import java.util.ArrayList;

+ 1 - 1
app/src/main/java/epson/print/IconTextArrayAdapter.java

@@ -30,7 +30,7 @@ public class IconTextArrayAdapter extends AsymmetricGridViewAdapter<IconTextArra
         super(context, asymmetricGridView, list);
         textViewResourceId = i;
         items = list;
-        inflater = (LayoutInflater) context.getSystemService("layout_inflater");
+        inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
     }
 
     public View getActualView(int i, View view, ViewGroup viewGroup2) {

+ 1 - 1
app/src/main/java/epson/print/IconifiedTextListAdapter.java

@@ -27,7 +27,7 @@ public class IconifiedTextListAdapter extends BaseAdapter {
 
     public IconifiedTextListAdapter(Context context) {
         mContext = context;
-        inflater = (LayoutInflater) context.getSystemService("layout_inflater");
+        inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
     }
 
     public void addItem(IconifiedText iconifiedText) {

+ 11 - 3
app/src/main/java/epson/print/IprintHome.java

@@ -66,7 +66,7 @@ import epson.support.SupportActivity;
  * 主页
  */
 public class IprintHome extends ActivityIACommon implements CommonDefine {
-    
+
     private static final int EPS_COMM_BID = 2;
     private static final int EPS_ERR_PRINTER_NOT_FOUND = -1300;
     private static final int EPS_PRB_BYID = 1;
@@ -88,10 +88,10 @@ public class IprintHome extends ActivityIACommon implements CommonDefine {
     boolean finishProbe;
     private boolean mActivityForeground;
     private ArrayList<Runnable> mForegroundRunnableList;
-    
+
     Handler mHandler = new Handler(new Handler.Callback() {
         public boolean handleMessage(Message message) {
-            
+
             EPLog.i(TAG, "HandlerCallback");
             switch (message.what) {
                 case 0:
@@ -220,6 +220,7 @@ public class IprintHome extends ActivityIACommon implements CommonDefine {
                 Analytics.sendAction(getApplicationContext(), Analytics.ACTION_ID_HOME_MAINTAIN);
             }
         });
+        //首次启动跳转到同意隐私协议页面
         if (bundle == null) {
             startLicenseCheckActivity();
         } else if (!IprintLicenseInfo.isAgreedCurrentVersion(getApplicationContext())) {
@@ -680,10 +681,17 @@ public class IprintHome extends ActivityIACommon implements CommonDefine {
         startActivity(new Intent(this, JumpUrlProgressActivity.class));
     }
 
+    /**
+     * 是否是日本手机
+     * @return
+     */
     private boolean isJapaneseDevice() {
         return Locale.getDefault().getLanguage().equalsIgnoreCase(Locale.JAPAN.getLanguage()) || Locale.getDefault().getLanguage().equalsIgnoreCase(Locale.JAPANESE.getLanguage());
     }
 
+    /**
+     * 跳转到新手引导页
+     */
     public void startGuideActivity() {
         InformationGuide informationGuide = new InformationGuide(getApplicationContext());
         Intent intent = new Intent(this, NoticeGuideActivity.class);

+ 1 - 1
app/src/main/java/epson/print/copy/CopyScaleActivity.java

@@ -166,7 +166,7 @@ public class CopyScaleActivity extends ActivityBase {
             public ScaleAdapter(Context context, int i, ArrayList<ScaleInfo> arrayList) {
                 super(context, i, arrayList);
                 this.items = arrayList;
-                this.inflater = (LayoutInflater) context.getSystemService("layout_inflater");
+                this.inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
             }
 
             public View getView(int i, View view, ViewGroup viewGroup) {

+ 1 - 1
app/src/main/java/epson/print/copy/CopySettingActivity.java

@@ -112,7 +112,7 @@ public class CopySettingActivity extends ActivityBase {
             public SettingAdapter(Context context, int i, String[] strArr) {
                 super(context, i, strArr);
                 this.items = strArr;
-                this.inflater = (LayoutInflater) context.getSystemService("layout_inflater");
+                this.inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
             }
 
             public View getView(int i, View view, ViewGroup viewGroup) {

+ 1 - 1
app/src/main/java/epson/print/fileBrower.java

@@ -7,7 +7,7 @@ import android.content.DialogInterface;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
-import android.support.media.ExifInterface;
+
 import android.support.p000v4.app.NotificationCompat;
 import android.text.InputFilter;
 import android.util.Log;

+ 1 - 1
app/src/main/java/epson/print/imgsel/ImageFolderListFragment.java

@@ -3,7 +3,7 @@ package epson.print.imgsel;
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 
 import android.support.p000v4.app.ListFragment;
 import android.view.View;

+ 1 - 1
app/src/main/java/epson/print/imgsel/ImageGridFragment.java

@@ -7,7 +7,7 @@ import android.content.SharedPreferences;
 import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 
 import android.util.Log;
 import android.view.LayoutInflater;

+ 1 - 1
app/src/main/java/epson/print/imgsel/ImageViewBaseFragment.java

@@ -3,7 +3,7 @@ package epson.print.imgsel;
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;

+ 1 - 1
app/src/main/java/epson/print/imgsel/ImageViewPagerActivity.java

@@ -2,7 +2,7 @@ package epson.print.imgsel;
 
 import android.content.Intent;
 import android.os.Bundle;
-import android.support.p000v4.app.Fragment;
+
 import android.support.p000v4.app.FragmentManager;
 import android.support.p000v4.app.FragmentStatePagerAdapter;
 

+ 1 - 1
app/src/main/java/epson/print/inkrpln/InkRplnProgressFragment.java

@@ -8,7 +8,7 @@ import android.os.Bundle;
 
 
 
-import android.support.p000v4.app.Fragment;
+
 
 import android.support.p000v4.app.FragmentManager;
 import epson.print.R;

+ 1 - 1
app/src/main/java/epson/print/inkrpln/JumpUrlFragment.java

@@ -5,7 +5,7 @@ import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Bundle;
 
-import android.support.p000v4.app.Fragment;
+
 
 import android.support.p000v4.app.FragmentManager;
 import epson.print.R;

+ 1 - 1
app/src/main/java/epson/print/rpcopy/CopySettingActivity.java

@@ -112,7 +112,7 @@ public class CopySettingActivity extends ActivityBase {
             public SettingAdapter(Context context, int i, String[] strArr) {
                 super(context, i, strArr);
                 this.items = strArr;
-                this.inflater = (LayoutInflater) context.getSystemService("layout_inflater");
+                this.inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
             }
 
             public View getView(int i, View view, ViewGroup viewGroup) {

+ 1 - 1
app/src/main/java/epson/print/storage/StorageProcessDownloadActivity.java

@@ -398,7 +398,7 @@ public class StorageProcessDownloadActivity extends StorageProcessActivity {
 
         StorageItemAdapter(List<StorageItem> list) {
             super(StorageProcessDownloadActivity.this.getBaseContext(), R.layout.file_list_item, list);
-            layoutInflater = (LayoutInflater) StorageProcessDownloadActivity.this.getBaseContext().getSystemService("layout_inflater");
+            layoutInflater = (LayoutInflater) StorageProcessDownloadActivity.this.getBaseContext().getSystemService(Service.LAYOUT_INFLATER_SERVICE);
             storageItems = list;
             viewCache = new HashMap<>();
         }

+ 1 - 1
app/src/main/java/epson/print/storage/gdrivev3/ListAndDownloadActivity.java

@@ -6,7 +6,7 @@ import android.graphics.Typeface;
 import android.os.Build;
 import android.os.Bundle;
 
-import android.support.p000v4.app.Fragment;
+
 import android.support.p000v4.app.FragmentManager;
 import android.view.Menu;
 import android.view.MenuItem;

+ 1 - 1
app/src/main/java/epson/print/widgets/CustomTitleAlertDialogBuilder.java

@@ -54,7 +54,7 @@ public class CustomTitleAlertDialogBuilder extends AlertDialog.Builder {
     }
 
     private void setUpCustomTitle() {
-        this.titleView = (ViewGroup) ((LayoutInflater) getContext().getSystemService("layout_inflater")).inflate(R.layout.alert_dialog_title, (ViewGroup) null);
+        this.titleView = (ViewGroup) ((LayoutInflater) getContext().getSystemService(Service.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.alert_dialog_title, (ViewGroup) null);
         ViewGroup viewGroup = this.titleView;
         if (viewGroup != null) {
             setCustomTitle(viewGroup);

+ 1 - 1
app/src/main/java/epson/server/screens/UploadScreen.java

@@ -8,7 +8,7 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Parcelable;
-import android.support.media.ExifInterface;
+
 import android.support.p000v4.media.session.PlaybackStateCompat;
 import android.text.Editable;
 import android.text.InputFilter;

+ 5 - 0
app/src/main/res/drawable/g_dialog_left_button_normal.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:shape="rectangle">
+    <solid android:color="#ffffffff"/>
+    <corners android:radius="5dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" android:bottomRightRadius="0dp"/>
+</shape>

+ 5 - 0
app/src/main/res/drawable/g_dialog_left_button_press.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:shape="rectangle">
+    <solid android:color="#ffd3d3d3"/>
+    <corners android:radius="5dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" android:bottomRightRadius="0dp"/>
+</shape>

+ 7 - 0
app/src/main/res/drawable/g_dialog_left_button_selector.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
+    <item android:state_pressed="true" android:drawable="@drawable/g_dialog_left_button_press"/>
+    <item android:state_focused="false" android:state_pressed="false" android:drawable="@drawable/g_dialog_left_button_normal"/>
+    <item android:state_focused="true" android:drawable="@drawable/g_dialog_left_button_press"/>
+    <item android:state_focused="false" android:drawable="@drawable/g_dialog_left_button_normal"/>
+</selector>

+ 5 - 0
app/src/main/res/drawable/g_dialog_right_button_normal.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:shape="rectangle">
+    <solid android:color="#ffffffff"/>
+    <corners android:radius="5dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" android:bottomLeftRadius="0dp"/>
+</shape>

+ 5 - 0
app/src/main/res/drawable/g_dialog_right_button_press.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:shape="rectangle">
+    <solid android:color="#ffd3d3d3"/>
+    <corners android:radius="5dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" android:bottomLeftRadius="0dp"/>
+</shape>

+ 7 - 0
app/src/main/res/drawable/g_dialog_right_button_selector.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
+    <item android:state_pressed="true" android:drawable="@drawable/g_dialog_right_button_press"/>
+    <item android:state_focused="false" android:state_pressed="false" android:drawable="@drawable/g_dialog_right_button_normal"/>
+    <item android:state_focused="true" android:drawable="@drawable/g_dialog_right_button_press"/>
+    <item android:state_focused="false" android:drawable="@drawable/g_dialog_right_button_normal"/>
+</selector>

BIN
app/src/main/res/drawable/list_divider.9.png


+ 3 - 1
app/src/main/res/layout/activity_notice_guide.xml

@@ -21,7 +21,9 @@
         android:minHeight="20dp"
         android:layout_alignParentBottom="true"
         android:layout_alignParentStart="true"
-        android:layout_alignParentEnd="true">
+        android:layout_alignParentEnd="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentRight="true">
 
         <ImageView
             android:layout_gravity="center_vertical"