liuyuqi-dellpc 3 years ago
parent
commit
85636f3f31
100 changed files with 1083 additions and 6028 deletions
  1. 4 0
      app/build.gradle
  2. 686 6
      app/src/main/AndroidManifest.xml
  3. 4 4
      app/src/main/java/com/epson/cameracopy/device/AptSensorAdapter.java
  4. 1 1
      app/src/main/java/com/epson/cameracopy/device/CameraPreviewControl.java
  5. 1 1
      app/src/main/java/com/epson/cameracopy/device/PaperContourDetector.java
  6. 10 10
      app/src/main/java/com/epson/cameracopy/device/PortraitCameraView.java
  7. 2 2
      app/src/main/java/com/epson/cameracopy/device/PreviewResolutionSelector.java
  8. 2 2
      app/src/main/java/com/epson/cameracopy/printlayout/CustomManuscriptSize.java
  9. 3 3
      app/src/main/java/com/epson/cameracopy/printlayout/IdManuscriptSize.java
  10. 14 14
      app/src/main/java/com/epson/cameracopy/printlayout/ImageAndLayout.java
  11. 5 5
      app/src/main/java/com/epson/cameracopy/printlayout/ManuscriptSize.java
  12. 20 20
      app/src/main/java/com/epson/cameracopy/printlayout/PreviewPosition.java
  13. 6 6
      app/src/main/java/com/epson/cameracopy/printlayout/PreviewView.java
  14. 3 3
      app/src/main/java/com/epson/cameracopy/ui/CameraPreviewActivity.java
  15. 14 14
      app/src/main/java/com/epson/cameracopy/ui/CameraPreviewFragment.java
  16. 3 3
      app/src/main/java/com/epson/cameracopy/ui/CameraPreviewOptionActivity.java
  17. 1 1
      app/src/main/java/com/epson/cameracopy/ui/CameraPrintProgress.java
  18. 17 17
      app/src/main/java/com/epson/cameracopy/ui/CameraPrintSettingActivity.java
  19. 31 31
      app/src/main/java/com/epson/cameracopy/ui/CropImageActivity.java
  20. 2 2
      app/src/main/java/com/epson/cameracopy/ui/CurrentFolderName.java
  21. 16 16
      app/src/main/java/com/epson/cameracopy/ui/DocumentSizeEditActivity.java
  22. 4 4
      app/src/main/java/com/epson/cameracopy/ui/DocumentSizeSettingActivity.java
  23. 2 2
      app/src/main/java/com/epson/cameracopy/ui/FolderSelectActivity.java
  24. 5 5
      app/src/main/java/com/epson/cameracopy/ui/ImageCollectView.java
  25. 6 6
      app/src/main/java/com/epson/cameracopy/ui/ImagePreviewActivity.java
  26. 1 1
      app/src/main/java/com/epson/cameracopy/ui/PictureResolutionDialogFragment.java
  27. 5 5
      app/src/main/java/com/epson/cameracopy/ui/PrintPreviewActivity.java
  28. 3 3
      app/src/main/java/com/epson/lib/escani2/ScanSize.java
  29. 2 2
      app/src/main/java/com/epson/lib/escani2/ScannerI2Info.java
  30. 1 1
      app/src/main/java/com/epson/memcardacc/AltViewImageAdapter.java
  31. 3 3
      app/src/main/java/com/epson/memcardacc/ConfirmReadMemcard.java
  32. 3 3
      app/src/main/java/com/epson/memcardacc/ConfirmWriteMemcard.java
  33. 1 1
      app/src/main/java/com/epson/memcardacc/CopyTask.java
  34. 3 3
      app/src/main/java/com/epson/memcardacc/ImageFileListAdapter.java
  35. 1 1
      app/src/main/java/com/epson/memcardacc/ImageUtil.java
  36. 1 1
      app/src/main/java/com/epson/memcardacc/MemcardImageGrid.java
  37. 2 2
      app/src/main/java/com/epson/memcardacc/MemcardPhotocopyTop.java
  38. 2 2
      app/src/main/java/com/epson/memcardacc/MemcardReadProgress.java
  39. 2 2
      app/src/main/java/com/epson/memcardacc/MemcardTop.java
  40. 5 5
      app/src/main/java/com/epson/mobilephone/common/EpLog.java
  41. 7 7
      app/src/main/java/com/epson/mobilephone/common/ble/BleWorkActivity.java
  42. 2 2
      app/src/main/java/com/epson/mobilephone/common/ble/DeviceAdapter.java
  43. 9 9
      app/src/main/java/com/epson/mobilephone/common/guide/GuideWebviewFragment.java
  44. 20 20
      app/src/main/java/com/epson/mobilephone/common/guide/NoticeGuideActivity.java
  45. 2 2
      app/src/main/java/com/epson/mobilephone/common/guide/Utils.java
  46. 2 2
      app/src/main/java/com/epson/mobilephone/common/usb/UsbPrinter.java
  47. 1 1
      app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityWiFiDirectBase.java
  48. 4 4
      app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityWiFiDirectManual.java
  49. 1 1
      app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityWiFiDirectStart.java
  50. 7 7
      app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityiPrintConnect.java
  51. 5 5
      app/src/main/java/com/epson/mobilephone/common/wifidirect/DialogProgressWiFiDirect.java
  52. 2 2
      app/src/main/java/com/epson/mobilephone/common/wifidirect/NfcTagParser.java
  53. 37 37
      app/src/main/java/epson/colorcorrection/ImageCollect.java
  54. 32 32
      app/src/main/java/epson/colorcorrection/SDIC_BCSC.java
  55. 1 1
      app/src/main/java/epson/colorcorrection/SDIC_MAT_PTR.java
  56. 11 11
      app/src/main/java/epson/colorcorrection/SDIC_PWC.java
  57. 5 5
      app/src/main/java/epson/common/DialogProgress.java
  58. 5 5
      app/src/main/java/epson/common/EpLog.java
  59. 1 1
      app/src/main/java/epson/common/ScalableImageView.java
  60. 1 1
      app/src/main/java/epson/common/Utils.java
  61. 0 330
      app/src/main/java/epson/common/ble/BleAsyncTask.java
  62. 0 11
      app/src/main/java/epson/common/ble/BleException.java
  63. 0 237
      app/src/main/java/epson/common/ble/BleScanWork.java
  64. 0 1331
      app/src/main/java/epson/common/ble/BleWork.java
  65. 0 958
      app/src/main/java/epson/common/ble/BleWorkActivity.java
  66. 0 90
      app/src/main/java/epson/common/ble/DeviceAdapter.java
  67. 0 347
      app/src/main/java/epson/common/ble/ProbePrinter.java
  68. 0 86
      app/src/main/java/epson/common/ble/util/BLEUtility.java
  69. 0 36
      app/src/main/java/epson/common/ble/util/BLEUuid.java
  70. 0 85
      app/src/main/java/epson/common/ble/util/ScannedDevice.java
  71. 0 9
      app/src/main/java/epson/common/escpr/EPS_LAYOUTSIZE_INFO.java
  72. 0 6
      app/src/main/java/epson/common/escpr/EPS_LAYOUT_INFO.java
  73. 0 8
      app/src/main/java/epson/common/escpr/EPS_MARGIN.java
  74. 0 6
      app/src/main/java/epson/common/escpr/EPS_PRINT_AREA_INFO.java
  75. 0 9
      app/src/main/java/epson/common/escpr/EPS_REDYINKINFO.java
  76. 0 56
      app/src/main/java/epson/common/escpr/EscprDef.java
  77. 0 188
      app/src/main/java/epson/common/escpr/EscprError.java
  78. 0 496
      app/src/main/java/epson/common/escpr/EscprLib.java
  79. 0 145
      app/src/main/java/epson/common/escpr/Info_paper.java
  80. 0 8
      app/src/main/java/epson/common/escpr/MIBCommand.java
  81. 0 6
      app/src/main/java/epson/common/escpr/MIBDataBlock.java
  82. 0 6
      app/src/main/java/epson/common/escpr/MIBIdentifier.java
  83. 0 683
      app/src/main/java/epson/common/escpr/MediaInfo.java
  84. 0 88
      app/src/main/java/epson/common/escpr/PaperSize.java
  85. 0 99
      app/src/main/java/epson/common/guide/GuideWebviewFragment.java
  86. 0 29
      app/src/main/java/epson/common/guide/MyViewPager.java
  87. 0 232
      app/src/main/java/epson/common/guide/NoticeGuideActivity.java
  88. 0 44
      app/src/main/java/epson/common/guide/Utils.java
  89. 2 2
      app/src/main/java/epson/common/usb/UsbPrinter.java
  90. 1 1
      app/src/main/java/epson/common/wifidirect/ActivityWiFiDirectBase.java
  91. 4 4
      app/src/main/java/epson/common/wifidirect/ActivityWiFiDirectManual.java
  92. 1 1
      app/src/main/java/epson/common/wifidirect/ActivityWiFiDirectStart.java
  93. 7 7
      app/src/main/java/epson/common/wifidirect/ActivityiPrintConnect.java
  94. 5 5
      app/src/main/java/epson/common/wifidirect/DialogProgressWiFiDirect.java
  95. 2 2
      app/src/main/java/epson/common/wifidirect/NfcTagParser.java
  96. 1 1
      app/src/main/java/epson/epsonconnectregistration/ActivityECConfiguration.java
  97. 2 2
      app/src/main/java/epson/epsonconnectregistration/ECAvailableCheckTask.java
  98. 2 2
      app/src/main/java/epson/epsonconnectregistration/ECConfigurationTask.java
  99. 2 2
      app/src/main/java/epson/epsonconnectregistration/SoapWEBSETUPDataInfo.java
  100. 2 2
      app/src/main/java/epson/maintain/BatteryInfoAdapter.java

+ 4 - 0
app/build.gradle

@@ -11,6 +11,7 @@ android {
         targetSdkVersion 29
         versionCode 1
         versionName "1.0"
+        multiDexEnabled true
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
@@ -25,6 +26,7 @@ android {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
+    flavorDimensions 'flavor1'
 }
 
 dependencies {
@@ -32,6 +34,8 @@ dependencies {
     implementation 'androidx.appcompat:appcompat:1.2.0'
     implementation 'com.google.android.material:material:1.2.1'
     implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
+    implementation 'androidx.multidex:multidex:2.0.1'
+
     testImplementation 'junit:junit:4.+'
     androidTestImplementation 'androidx.test.ext:junit:1.1.2'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

+ 686 - 6
app/src/main/AndroidManifest.xml

@@ -49,19 +49,699 @@
 
 
     <application
-        android:allowBackup="true"
+        android:name=".IprintApplication"
+        android:hardwareAccelerated="true"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher_round"
-        android:supportsRtl="true"
-        android:theme="@style/Theme.Print">
-        <activity android:name=".WellcomeScreenActivity">
+        android:largeHeap="true"
+        android:networkSecurityConfig="@xml/network_security_config"
+        android:theme="@style/AppTheme">
+        <uses-library
+            android:name="org.apache.http.legacy"
+            android:required="false" />
+
+        <activity
+            android:name="epson.print.WebShareActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
+                <action android:name="android.intent.action.SEND" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:mimeType="text/plain" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="epson.print.WebviewActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.ActivityViewImageSelect"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:hardwareAccelerated="@bool/enableHardwareAccelerated"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified">
+            <intent-filter>
+                <action android:name="android.intent.action.VIEW" />
+                <action android:name="android.intent.action.SEND" />
+                <action android:name="android.intent.action.SEND_MULTIPLE" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+
+                <data android:mimeType="image/jpg" />
+                <data android:mimeType="image/jpeg" />
+                <data android:mimeType="image/bmp" />
+                <data android:mimeType="image/png" />
+                <data android:mimeType="image/x-bmp" />
+                <data android:mimeType="image/x-ms-bmp" />
+                <data android:mimeType="image/heif" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="epson.support.SupportActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.support.SupportAboutActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.support.DeviceInformationActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.activity.AFolderPhoto"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.gdconv.ConvertProgressActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/AppTheme.Translucent.Gray" />
+        <activity
+            android:name="epson.scan.activity.ScanActivity"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.scan.activity.ScanSettingsActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.scan.activity.ScanSearchActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.scan.activity.ScanSettingsDetailActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.scan.activity.ScanSettingsAdvanceDetailActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.scan.activity.ScanSettingsAdvanceDensityActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.copy.CopyActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.copy.CopyScaleActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.copy.CopySettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.rpcopy.CopyActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:parentActivityName="epson.print.IprintHome"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified">
+            <meta-data
+                android:name="android.support.PARENT_ACTIVITY"
+                android:value="epson.print.IprintHome" />
+        </activity>
+        <activity
+            android:name="epson.print.rpcopy.CopySettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.PrintProgress"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/Theme.MyDialog" />
+        <activity
+            android:name="epson.print.screen.ConfirmMultiScr"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/Theme.MyDialog" />
+        <activity
+            android:name="epson.print.screen.SettingScr"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.SearchPrinterScr"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.PrinterFinder"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.PrinterInfoDetail"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.PageRangeSetting"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+
+        <service
+            android:name="epson.print.service.EpsonService"
+            android:exported="false"
+            android:process=":remote" />
 
+        <activity
+            android:name="epson.server.screens.StorageServer"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:label="@string/app_name"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.IprintHome"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize"
+            android:exported="true"
+            android:label="@string/app_name"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.server.screens.UploadScreen"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:label="@string/app_name"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:windowSoftInputMode="adjustResize" />
+        <activity
+            android:name="epson.maintain.activity.MaintainActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.maintain.activity.FirmwareUpdateActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent.Gray" />
+        <activity
+            android:name="epson.epsonconnectregistration.ActivityECConfiguration"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent.Gray" />
+        <activity
+            android:name="epson.maintain.activity.MaintainPrinterSearchActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize"
+            android:exported="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.maintain.activity.EccPrintLog"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.WellcomeScreenActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <activity
+            android:name="epson.print.ActivityPrintWeb"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.scan.activity.MailActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.fileBrower"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.ActivityDocsPrintPreview"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified">
+            <intent-filter>
+                <action android:name="android.intent.action.SEND" />
+                <action android:name="android.intent.action.VIEW" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+
+                <data android:mimeType="application/pdf" />
+                <data android:mimeType="application/msword" />
+                <data android:mimeType="application/vnd.ms-excel" />
+                <data android:mimeType="application/vnd.ms-powerpoint" />
+                <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
+                <data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" />
+                <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
+                <data android:mimeType="text/csv" />
+                <data android:mimeType="application/rtf" />
+                <data android:mimeType="text/rtf" />
+                <data android:mimeType="text/comma-separated-values" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="com.epson.iprint.storage.StorageProcessDownloadActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="com.epson.iprint.storage.StorageProcessUploadActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="com.epson.iprint.storage.StorageWaitingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent.Gray" />
+        <activity
+            android:name="com.epson.iprint.storage.gdrivev3.GoogleV3UploadSignInActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="com.epson.iprint.storage.gdrivev3.ListAndDownloadActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:excludeFromRecents="true"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.iprint.storage.dropbox.DropboxV2SignInActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="com.dropbox.core.android.AuthActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:launchMode="singleTask"
+            android:resizeableActivity="false">
+            <intent-filter>
+                <data android:scheme="db-73ps18y0cjibceg" />
+                <action android:name="android.intent.action.VIEW" />
+
+                <category android:name="android.intent.category.BROWSABLE" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="com.epson.iprint.storage.onedrive.OneDriveSignInActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="com.epson.iprint.storage.onedrive.OneDriveStorageProcessUploadActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="com.epson.iprint.storage.box.BoxNetSignInActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="com.box.boxandroidlibv2.activities.OAuthActivity"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.iprint.storage.evernote.EvernoteSignInActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="stateHidden" />
+        <activity
+            android:name="epson.print.screen.ActivityPrinterSetting"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.PaperSourceSettingScr"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.screen.ActivityIpPrinterSetting"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="epson.print.ActivityNfcPrinter"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/AppTheme.Translucent" />
+        <activity
+            android:name="com.evernote.client.android.EvernoteOAuthActivity"
+            android:configChanges="keyboardHidden|orientation"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.evernote.client.android.login.EvernoteLoginActivity"
+            android:configChanges="keyboardHidden|orientation"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.maintain.activity.GetPrinterReplyData"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:excludeFromRecents="false"
+            android:noHistory="false"
+            android:resizeableActivity="false"
+            android:screenOrientation="behind"
+            android:theme="@style/AppTheme.Translucent" />
+        <activity
+            android:name="com.epson.iprint.shared.EpsoniPrintSharedActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:excludeFromRecents="false"
+            android:noHistory="false"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent">
+            <intent-filter>
+                <action android:name="com.epson.iprint.photo" />
+                <action android:name="com.epson.iprint.scan" />
+                <action android:name="com.epson.iprint.web" />
+                <action android:name="com.epson.iprint.status" />
+                <action android:name="com.epson.iprint.isSetDevice" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityWiFiDirectStart"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityiPrintConnectStart"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityiPrintConnect"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityWiFiDirectManual"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityWiFiDirectError"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.memcardacc.MemcardImageGrid"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="com.epson.memcardacc.ConfirmReadMemcard"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="com.epson.memcardacc.MemcardReadProgress"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/Theme.MyDialog" />
+        <activity
+            android:name="com.epson.memcardacc.MemcardTop"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.memcardacc.MemcardWriteProgress"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/Theme.MyDialog" />
+        <activity
+            android:name="com.epson.memcardacc.PhotoCopyWriteProgress"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified"
+            android:theme="@style/Theme.MyDialog" />
+        <activity
+            android:name="com.epson.memcardacc.ConfirmWriteMemcard"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:screenOrientation="unspecified" />
+        <activity
+            android:name="com.epson.memcardacc.DirectorySelecterActivity"
+            android:resizeableActivity="false"
+            android:theme="@style/Theme.Dialog" />
+        <activity
+            android:name="com.epson.memcardacc.MemcardPhotocopyTop"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.memcardacc.LocalImageSelectActivity"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.memcardacc.PhotoCopyImageSelectActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.CameraPreviewActivity"
+            android:resizeableActivity="false"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.FolderSelectActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.ImagePreviewActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false">
+            <meta-data
+                android:name="android.support.PARENT_ACTIVITY"
+                android:value="com.epson.cameracopy.ui.CameraPreviewActivity" />
+        </activity>
+        <activity
+            android:name="com.epson.cameracopy.p006ui.CameraPreviewOptionActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.PrintPreviewActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.CameraPrintSettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.CameraPrintProgress"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:resizeableActivity="false"
+            android:theme="@style/Theme.MyDialog" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.CropImageActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.DocumentSizeSettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.cameracopy.p006ui.DocumentSizeEditActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.imgsel.PhotoImageSelectActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.imgsel.CameraCopyImageSelectActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.imgsel.ImageViewPagerActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.imgsel.ImageViewPagerWithNfcInvalidPrintMessageActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.ActivityRequestPermissions"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.RequestPerm" />
+        <activity
+            android:name="epson.scan.activity.I2ScanActivity"
+            android:configChanges="locale|keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.scan.activity.I2DoubleSideScanSettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.scan.activity.I2ScanSettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.scan.activity.I2SettingDetailActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.scan.activity.InputUnitSettingActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="com.epson.mobilephone.common.ble.BleWorkActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:resizeableActivity="false" />
+        <activity
+            android:name="epson.print.inkrpln.InkRplnProgressDialog"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent" />
+        <activity
+            android:name="epson.print.inkrpln.JumpUrlProgressActivity"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent" />
+        <activity
+            android:name="epson.maintain.activity.CheckEulaActivity"
+            android:resizeableActivity="false"
+            android:theme="@style/LicenseTheme" />
+
+        <provider
+            android:name="epson.provider.ScannedFileProvider"
+            android:authorities="epson.print.provider.scannedfile"
+            android:exported="false"
+            android:grantUriPermissions="true">
+            <meta-data
+                android:name="android.support.FILE_PROVIDER_PATHS"
+                android:resource="@xml/provider_paths_scannedfile" />
+        </provider>
+        <receiver
+            android:name="com.google.android.gms.analytics.AnalyticsReceiver"
+            android:enabled="true"
+            android:exported="false">
+            <intent-filter>
+                <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
+            </intent-filter>
+        </receiver>
+        <service
+            android:name="com.google.android.gms.analytics.AnalyticsService"
+            android:enabled="true"
+            android:exported="false" />
+
+        <meta-data
+            android:name="com.epson.iprint.prtlogger2.queryserver"
+            android:value="0" />
+        <meta-data
+            android:name="com.google.android.gms.analytics.globalConfigResource"
+            android:resource="@xml/ga_global_config" />
+
+        <provider
+            android:name="epson.provider.SharedPreferencesProvider"
+            android:authorities="epson.print.provider.SharedPreferences"
+            android:exported="false" />
+
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityConnectSimpleAP"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent_epWiFiDirectManager" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityConnectP2P"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent_epWiFiDirectManager" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityControlWiFi"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent_epWiFiDirectManager" />
+        <activity
+            android:name="com.epson.mobilephone.common.wifidirect.ActivityRequestLocationPermission"
+            android:configChanges="orientation|screenSize"
+            android:resizeableActivity="false"
+            android:theme="@style/AppTheme.Translucent_epWiFiDirectManager" />
+
+        <service
+            android:name="com.google.android.gms.analytics.AnalyticsJobService"
+            android:enabled="true"
+            android:exported="false"
+            android:permission="android.permission.BIND_JOB_SERVICE" />
+        <activity
+            android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
+            android:excludeFromRecents="true"
+            android:exported="false"
+            android:theme="@style/Theme.Translucent.NoTitleBar" />
+        <service
+            android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
+            android:exported="true"
+            android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
+        <activity
+            android:name="com.google.android.gms.common.api.GoogleApiActivity"
+            android:exported="false"
+            android:theme="@style/Theme.Translucent.NoTitleBar" />
+        <meta-data
+            android:name="com.google.android.gms.version"
+            android:value="@integer/google_play_services_version" />
+
+        <activity
+            android:name="com.box.androidsdk.content.auth.OAuthActivity"
+            android:configChanges="orientation|screenSize"
+            android:exported="true" />
+        <activity
+            android:name="com.box.androidsdk.content.auth.BlockedIPErrorActivity"
+            android:launchMode="singleInstance" />
+
+        <provider
+            android:name="android.arch.lifecycle.ProcessLifecycleOwnerInitializer"
+            android:authorities="epson.print.lifecycle-trojan"
+            android:exported="false"
+            android:multiprocess="true" />
+
+        <activity
+            android:name="com.epson.mobilephone.common.license.LicenseTopActivity"
+            android:theme="@style/LicenseTheme" />
+        <activity
+            android:name="com.epson.mobilephone.common.license.InfoDisplayActivity"
+            android:theme="@style/LicenseTheme" />
+        <activity
+            android:name="com.epson.mobilephone.common.license.UserSurveyInvitationActivity"
+            android:theme="@style/LicenseTheme" />
+        <activity
+            android:name="com.epson.mobilephone.common.usb.UsbReciever"
+            android:resizeableActivity="false">
+            <intent-filter>
+                <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
+            </intent-filter>
+            <meta-data
+                android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
+                android:resource="@xml/usb_device_filter" />
+        </activity>
+
+        <receiver android:name="com.epson.mobilephone.common.usb.UsbReciever$UsbReceiver">
+            <intent-filter>
+                <action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
+            </intent-filter>
+        </receiver>
+        <activity
+            android:name="com.epson.mobilephone.common.guide.NoticeGuideActivity"
+            android:configChanges="keyboardHidden|orientation|screenSize"
+            android:theme="@style/Translucent" />
     </application>
 
 </manifest>

+ 4 - 4
app/src/main/java/com/epson/cameracopy/device/AptSensorAdapter.java

@@ -56,7 +56,7 @@ public class AptSensorAdapter implements SensorEventListener {
     }
 
     public static double getRangeCompValue(int i) {
-        return Math.pow(Math.sin((((double) i) * 3.141592653589793d) / 180.0d) * 9.806650161743164d, 2.0d);
+        return Math.pow(Math.sin((( i) * 3.141592653589793d) / 180.0d) * 9.806650161743164d, 2.0d);
     }
 
     public void setDisplayRotation(int i) {
@@ -78,7 +78,7 @@ public class AptSensorAdapter implements SensorEventListener {
         }
         float f = mPosX;
         float f2 = mPosY;
-        if (d >= ((double) ((f * f) + (f2 * f2)))) {
+        if (d >= ( ((f * f) + (f2 * f2)))) {
             return true;
         }
         return false;
@@ -106,7 +106,7 @@ public class AptSensorAdapter implements SensorEventListener {
         while (true) {
             if (i >= 3) {
                 break;
-            } else if (((double) Math.abs(sensorEvent.values[i])) > mReferenceAccelaration) {
+            } else if (( Math.abs(sensorEvent.values[i])) > mReferenceAccelaration) {
                 mLastOverTime = System.currentTimeMillis();
                 break;
             } else {
@@ -144,7 +144,7 @@ public class AptSensorAdapter implements SensorEventListener {
         mPreD0 = f;
         mPreD1 = f2;
         mPreD2 = f3;
-        if (((float) (Math.pow((double) (mPreD0 - f), 2.0d) + Math.pow((double) (mPreD1 - f2), 2.0d) + Math.pow((double) (mPreD2 - f3), 2.0d))) > m2BaseValue) {
+        if (((float) (Math.pow( (mPreD0 - f), 2.0d) + Math.pow( (mPreD1 - f2), 2.0d) + Math.pow( (mPreD2 - f3), 2.0d))) > m2BaseValue) {
             mLastOverTime2 = System.currentTimeMillis();
         }
     }

+ 1 - 1
app/src/main/java/com/epson/cameracopy/device/CameraPreviewControl.java

@@ -148,6 +148,6 @@ public class CameraPreviewControl {
     }
 
     public static String getPictureSizeString(int i, int i2) {
-        return String.format(Locale.US, "%4.1fM %dx%d", new Object[]{Double.valueOf(((double) (i2 * i)) / 1000000.0d), Integer.valueOf(i), Integer.valueOf(i2)});
+        return String.format(Locale.US, "%4.1fM %dx%d", new Object[]{Double.valueOf(( (i2 * i)) / 1000000.0d), Integer.valueOf(i), Integer.valueOf(i2)});
     }
 }

+ 1 - 1
app/src/main/java/com/epson/cameracopy/device/PaperContourDetector.java

@@ -58,7 +58,7 @@ public class PaperContourDetector {
         MatOfPoint2f matOfPoint2f = new MatOfPoint2f(matOfPoint.toArray());
         MatOfPoint2f matOfPoint2f2 = new MatOfPoint2f();
         for (int i = 300; i >= 100; i -= 100) {
-            Imgproc.approxPolyDP(matOfPoint2f, matOfPoint2f2, (double) i, true);
+            Imgproc.approxPolyDP(matOfPoint2f, matOfPoint2f2,  i, true);
             if (matOfPoint2f2.rows() * matOfPoint2f2.cols() >= 4) {
                 break;
             }

+ 10 - 10
app/src/main/java/com/epson/cameracopy/device/PortraitCameraView.java

@@ -66,8 +66,8 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
         Camera.Size size = null;
         double d2 = 0.0d;
         for (Camera.Size next : list) {
-            if (Math.abs((((double) next.width) / ((double) next.height)) - d) < 0.05d) {
-                double d3 = ((double) (next.width * next.height)) / 307200.0d;
+            if (Math.abs((( next.width) / ( next.height)) - d) < 0.05d) {
+                double d3 = ( (next.width * next.height)) / 307200.0d;
                 if (d3 > 1.0d) {
                     d3 = 1.0d / d3;
                 }
@@ -82,7 +82,7 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
 
     protected boolean setPreviewSize(List<Camera.Size> list, Camera.Parameters parameters) {
         Point screenSize = getScreenSize();
-        Camera.Size selectPreviewSize = selectPreviewSize(list, ((double) screenSize.y) / ((double) screenSize.x));
+        Camera.Size selectPreviewSize = selectPreviewSize(list, ( screenSize.y) / ( screenSize.x));
         if (selectPreviewSize == null) {
             return false;
         }
@@ -216,7 +216,7 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
         }
         Point point = new Point();
         for (Camera.Size next : list) {
-            if (next.height * next.width >= 76800 && Math.abs((((double) next.width) / ((double) next.height)) - d) < 0.05d && next.width > point.x) {
+            if (next.height * next.width >= 76800 && Math.abs((( next.width) / ( next.height)) - d) < 0.05d && next.width > point.x) {
                 point.x = next.width;
                 point.y = next.height;
             }
@@ -231,7 +231,7 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
         double d2 = Double.MAX_VALUE;
         for (Camera.Size next2 : list) {
             if (next2.height > 0) {
-                double abs = Math.abs((((double) next2.width) / ((double) next2.height)) - d);
+                double abs = Math.abs((( next2.width) / ( next2.height)) - d);
                 if (d2 > abs + 0.05d) {
                     i2 = next2.width * next2.height;
                     point.x = next2.width;
@@ -272,7 +272,7 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
             return false;
         }
         parameters.setPictureSize(pictureSize.x, pictureSize.y);
-        SizeWrapper selectPreviewSizeFromPictureSize = selectPreviewSizeFromPictureSize(((double) pictureSize.x) / ((double) pictureSize.y), parameters.getSupportedPreviewSizes());
+        SizeWrapper selectPreviewSizeFromPictureSize = selectPreviewSizeFromPictureSize(( pictureSize.x) / ( pictureSize.y), parameters.getSupportedPreviewSizes());
         if (selectPreviewSizeFromPictureSize != null) {
             parameters.setPreviewSize(selectPreviewSizeFromPictureSize.getWidth(), selectPreviewSizeFromPictureSize.getHeight());
         }
@@ -280,7 +280,7 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
     }
 
     static void setPictureSize(Camera.Size size, Camera.Parameters parameters) {
-        Camera.Size pictureSize01 = setPictureSize01(parameters.getSupportedPictureSizes(), ((double) size.width) / ((double) size.height));
+        Camera.Size pictureSize01 = setPictureSize01(parameters.getSupportedPictureSizes(), ( size.width) / ( size.height));
         if (pictureSize01 != null) {
             parameters.setPictureSize(pictureSize01.width, pictureSize01.height);
         } else {
@@ -292,7 +292,7 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
         int i = 0;
         Camera.Size size = null;
         for (Camera.Size next : list) {
-            if (Math.abs((((double) next.width) / ((double) next.height)) - d) < 0.05d && i < next.width) {
+            if (Math.abs((( next.width) / ( next.height)) - d) < 0.05d && i < next.width) {
                 i = next.width;
                 size = next;
             }
@@ -313,14 +313,14 @@ public class PortraitCameraView extends CameraBridgeViewBase implements Camera.P
     }
 
     static Point selectSize(Point point, List<Point> list) {
-        double d = ((double) point.x) / ((double) point.y);
+        double d = ( point.x) / ( point.y);
         if (list == null) {
             return null;
         }
         double[] dArr = new double[list.size()];
         for (int i = 0; i < list.size(); i++) {
             Point point2 = list.get(i);
-            dArr[i] = ((double) point2.x) * ((double) point2.y) * getRate(d, ((double) point2.x) / ((double) point2.y));
+            dArr[i] = ( point2.x) * ( point2.y) * getRate(d, ( point2.x) / ( point2.y));
         }
         int maxIndex = getMaxIndex(dArr);
         if (maxIndex < 0 || maxIndex >= dArr.length) {

+ 2 - 2
app/src/main/java/com/epson/cameracopy/device/PreviewResolutionSelector.java

@@ -15,7 +15,7 @@ public class PreviewResolutionSelector {
         for (SizeWrapper next : iterable) {
             int width = next.getWidth();
             int height = next.getHeight();
-            if (width <= i && height > 0 && Math.abs((((double) width) / ((double) height)) - d) < 0.05d && i3 < (score01 = getScore01(height, i2))) {
+            if (width <= i && height > 0 && Math.abs((( width) / ( height)) - d) < 0.05d && i3 < (score01 = getScore01(height, i2))) {
                 simpleSize = next;
                 i3 = score01;
             }
@@ -62,7 +62,7 @@ public class PreviewResolutionSelector {
         if (score02 <= 0) {
             return 0.0d;
         }
-        return ((double) score02) * getAspectScore(((double) i) / ((double) i2), d);
+        return ( score02) * getAspectScore(( i) / ( i2), d);
     }
 
     static int getScore02(int i, int i2) {

+ 2 - 2
app/src/main/java/com/epson/cameracopy/printlayout/CustomManuscriptSize.java

@@ -42,9 +42,9 @@ class CustomManuscriptSize implements ManuscriptSize.ManuscriptTypeAdapter {
     protected int lengthToPixel(double d, int i) {
         switch (mDocumentSizeInfo.getScaleId()) {
             case 1:
-                return (int) (((d * ((double) i)) / 25.4d) + 0.5d);
+                return  (((d * ( i)) / 25.4d) + 0.5d);
             case 2:
-                return (int) ((d * ((double) i)) + 0.5d);
+                return  ((d * ( i)) + 0.5d);
             default:
                 return 0;
         }

+ 3 - 3
app/src/main/java/com/epson/cameracopy/printlayout/IdManuscriptSize.java

@@ -36,9 +36,9 @@ class IdManuscriptSize implements ManuscriptSize.ManuscriptTypeAdapter {
         if (i2 == 360 || i2 == 0) {
             return point;
         }
-        double d = (double) i2;
-        point.x = (int) (((((double) point.x) * d) / 360.0d) + 0.5d);
-        point.y = (int) (((((double) point.y) * d) / 360.0d) + 0.5d);
+        double d =  i2;
+        point.x =  (((( point.x) * d) / 360.0d) + 0.5d);
+        point.y =  (((( point.y) * d) / 360.0d) + 0.5d);
         return point;
     }
 

+ 14 - 14
app/src/main/java/com/epson/cameracopy/printlayout/ImageAndLayout.java

@@ -128,8 +128,8 @@ public class ImageAndLayout implements Parcelable {
         if (iArr == null || iArr.length < 2 || (i = mPrintableAreaWidth) <= 0 || (i2 = mPrintableAreaHeight) <= 0) {
             return dArr;
         }
-        dArr[0] = ((double) iArr[0]) / ((double) i);
-        dArr[1] = ((double) iArr[1]) / ((double) i2);
+        dArr[0] = ( iArr[0]) / ( i);
+        dArr[1] = ( iArr[1]) / ( i2);
         return dArr;
     }
 
@@ -236,17 +236,17 @@ public class ImageAndLayout implements Parcelable {
             d4 = size3.height / size4.width;
             d3 = d6;
         }
-        int i2 = (int) (d3 / 2.0d);
-        int i3 = (int) (d4 / 2.0d);
+        int i2 =  (d3 / 2.0d);
+        int i3 =  (d4 / 2.0d);
         switch (i & 3) {
             case 1:
-                return new3x2Mat(0.0d, -d3, ((d + size3.width) - ((double) i2)) - 1.0d, d4, 0.0d, d2 + ((double) i3));
+                return new3x2Mat(0.0d, -d3, ((d + size3.width) - ( i2)) - 1.0d, d4, 0.0d, d2 + ( i3));
             case 2:
-                return new3x2Mat(-d3, 0.0d, ((d + size3.width) - ((double) i2)) - 1.0d, 0.0d, -d4, ((d2 + size3.height) - ((double) i3)) - 1.0d);
+                return new3x2Mat(-d3, 0.0d, ((d + size3.width) - ( i2)) - 1.0d, 0.0d, -d4, ((d2 + size3.height) - ( i3)) - 1.0d);
             case 3:
-                return new3x2Mat(0.0d, d3, d + ((double) i2), -d4, 0.0d, ((d2 + size3.height) - ((double) i3)) - 1.0d);
+                return new3x2Mat(0.0d, d3, d + ( i2), -d4, 0.0d, ((d2 + size3.height) - ( i3)) - 1.0d);
             default:
-                return new3x2Mat(d3, 0.0d, d + ((double) i2), 0.0d, d4, d2 + ((double) i3));
+                return new3x2Mat(d3, 0.0d, d + ( i2), 0.0d, d4, d2 + ( i3));
         }
     }
 
@@ -260,7 +260,7 @@ public class ImageAndLayout implements Parcelable {
                 Mat mat2 = new Mat(2, 3, 6);
                 mat2.put(0, 0, mat.get(1, 0)[0] * -1.0d);
                 mat2.put(0, 1, mat.get(1, 1)[0] * -1.0d);
-                mat2.put(0, 2, (mat.get(1, 2)[0] * -1.0d) + ((double) iArr[0]));
+                mat2.put(0, 2, (mat.get(1, 2)[0] * -1.0d) + ( iArr[0]));
                 mat2.put(1, 0, mat.get(0, 0)[0]);
                 mat2.put(1, 1, mat.get(0, 1)[0]);
                 mat2.put(1, 2, mat.get(0, 2)[0]);
@@ -269,16 +269,16 @@ public class ImageAndLayout implements Parcelable {
                 Mat mat3 = null;
                 mat3.put(0, 0, mat.get(0, 0)[0] * -1.0d);
                 mat3.put(0, 1, mat.get(0, 1)[0] * -1.0d);
-                mat3.put(0, 2, (mat.get(0, 2)[0] * -1.0d) + ((double) iArr[0]));
+                mat3.put(0, 2, (mat.get(0, 2)[0] * -1.0d) + ( iArr[0]));
                 mat3.put(1, 0, mat.get(1, 0)[0] * -1.0d);
                 mat3.put(1, 1, mat.get(1, 1)[0] * -1.0d);
-                mat3.put(1, 2, (mat.get(1, 2)[0] * -1.0d) + ((double) iArr[1]));
+                mat3.put(1, 2, (mat.get(1, 2)[0] * -1.0d) + ( iArr[1]));
                 return mat3;
             case 3:
                 Mat mat4 = new Mat(2, 3, 6);
                 mat4.put(0, 0, mat.get(1, 0)[0]);
                 mat4.put(0, 1, mat.get(1, 1)[0]);
-                mat4.put(0, 2, mat.get(1, 2)[0] + ((double) iArr[0]));
+                mat4.put(0, 2, mat.get(1, 2)[0] + ( iArr[0]));
                 mat4.put(1, 0, mat.get(0, 0)[0] * -1.0d);
                 mat4.put(1, 1, mat.get(0, 1)[0] * -1.0d);
                 mat4.put(1, 2, mat.get(0, 2)[0] * -1.0d);
@@ -319,8 +319,8 @@ public class ImageAndLayout implements Parcelable {
     private boolean affineBand(Mat mat, Mat mat2, int i, int i2, int i3, File file) {
         Mat clone = mat2.clone();
         Mat mat3 = new Mat();
-        Size size = new Size((double) i, (double) i2);
-        clone.put(1, 2, clone.get(1, 2)[0] - ((double) i3));
+        Size size = new Size( i,  i2);
+        clone.put(1, 2, clone.get(1, 2)[0] - ( i3));
         Mat mat4 = null;
         try {
             Imgproc.warpAffine(mat, mat3, clone, size, mInterpolation, 0, new Scalar(255.0d, 255.0d, 255.0d, 255.0d));

+ 5 - 5
app/src/main/java/com/epson/cameracopy/printlayout/ManuscriptSize.java

@@ -28,7 +28,7 @@ public class ManuscriptSize {
     }
 
     public static double getPixelToPhysicalSizeScale(int i, int i2) {
-        return i2 == 2 ? 1.0d / ((double) i) : 25.4d / ((double) i);
+        return i2 == 2 ? 1.0d / ( i) : 25.4d / ( i);
     }
 
     public ManuscriptSize(DocumentSizeInfo documentSizeInfo, String str, int i) {
@@ -58,7 +58,7 @@ public class ManuscriptSize {
 
     public PointF getPhysicalSize(Context context) {
         double pixelToPhysicalSizeScale = getPixelToPhysicalSizeScale(mBaseDpi, mManuscriptTypeAdapter.getUnitType(context));
-        return new PointF((float) (((double) mManuscriptPixelSize.x) * pixelToPhysicalSizeScale), (float) (((double) mManuscriptPixelSize.y) * pixelToPhysicalSizeScale));
+        return new PointF((float) (( mManuscriptPixelSize.x) * pixelToPhysicalSizeScale), (float) (( mManuscriptPixelSize.y) * pixelToPhysicalSizeScale));
     }
 
     public PointF getDocumentSize(Context context) {
@@ -82,7 +82,7 @@ public class ManuscriptSize {
     }
 
     public static double calcRate(int i, int i2, int i3, int i4) {
-        return Math.min(((double) i) / ((double) i3), ((double) i2) / ((double) i4));
+        return Math.min(( i) / ( i3), ( i2) / ( i4));
     }
 
     public static ManuscriptSize load(Context context, String str) {
@@ -110,8 +110,8 @@ public class ManuscriptSize {
             }
             double calcRate = calcRate(basePixelSize.x, basePixelSize.y, i2, i);
             Point point = mManuscriptPixelSize;
-            point.x = (int) (((double) i2) * calcRate);
-            point.y = (int) (calcRate * ((double) i));
+            point.x =  (( i2) * calcRate);
+            point.y =  (calcRate * ( i));
         }
     }
 

+ 20 - 20
app/src/main/java/com/epson/cameracopy/printlayout/PreviewPosition.java

@@ -65,13 +65,13 @@ class PreviewPosition implements Serializable {
         if (mScreenWidth != i || mScreenHeight != i2) {
             mScreenWidth = i;
             mScreenHeight = i2;
-            double left = ((double) (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate;
-            double top = ((double) (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate;
+            double left = ( (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate;
+            double top = ( (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate;
             calcPreviewPaperSize();
             double d = mActualPreviewRate;
-            mPrtimagePreviewPosition.setX1Size((int) (((double) mPrtimageActualWidth) * d), (int) (((double) mPrtimageActualHeight) * d));
-            mPrtimagePreviewPosition.setLeft(mPreviewPaperRect.left + ((int) (left * mActualPreviewRate)));
-            mPrtimagePreviewPosition.setTop(mPreviewPaperRect.top + ((int) (top * mActualPreviewRate)));
+            mPrtimagePreviewPosition.setX1Size( (( mPrtimageActualWidth) * d),  (( mPrtimageActualHeight) * d));
+            mPrtimagePreviewPosition.setLeft(mPreviewPaperRect.left + ( (left * mActualPreviewRate)));
+            mPrtimagePreviewPosition.setTop(mPreviewPaperRect.top + ( (top * mActualPreviewRate)));
             setMovableArea();
         }
     }
@@ -91,7 +91,7 @@ class PreviewPosition implements Serializable {
 
     public int[] getPaperMaginAnd3mPrintableArea() {
         double d = mActualPreviewRate;
-        return new int[]{(int) (((double) mPaperTo3mActualLeftMargin) * d), (int) (((double) mPaperTo3mActualTopMargin) * d), (int) (((double) m3mPrintAreaActualWidth) * d), (int) (((double) m3mPrintAreaActualHeight) * d)};
+        return new int[]{ (( mPaperTo3mActualLeftMargin) * d),  (( mPaperTo3mActualTopMargin) * d),  (( m3mPrintAreaActualWidth) * d),  (( m3mPrintAreaActualHeight) * d)};
     }
 
     public void calcSizeAndPositionOnScreen() {
@@ -121,7 +121,7 @@ class PreviewPosition implements Serializable {
             mPrtimagePreviewPosition.setScale(1.0d);
             mPrtimagePreviewPosition.resetRotate();
             double d = mActualPreviewRate;
-            mPrtimagePreviewPosition.setX1Size((int) ((((double) mPrtimageActualWidth) * d) + 0.5d), (int) ((((double) mPrtimageActualHeight) * d) + 0.5d));
+            mPrtimagePreviewPosition.setX1Size( ((( mPrtimageActualWidth) * d) + 0.5d),  ((( mPrtimageActualHeight) * d) + 0.5d));
             mPrtimagePreviewPosition.setLeft(mPreviewPaperRect.left);
             mPrtimagePreviewPosition.setTop(mPreviewPaperRect.top);
         }
@@ -135,12 +135,12 @@ class PreviewPosition implements Serializable {
         if (i4 > 0 && (i = mScreenHeight) > 0 && (i2 = mPaperActualWidth) > 0 && (i3 = mPaperActualHeight) > 0) {
             mFitSizeMode = false;
             double d = mPreviewPaperRate;
-            mActualPreviewRate = Math.min((((double) i4) * d) / ((double) i2), (((double) i) * d) / ((double) i3));
+            mActualPreviewRate = Math.min((( i4) * d) / ( i2), (( i) * d) / ( i3));
             mPreviewPaperRect.setEmpty();
             Rect rect = mPreviewPaperRect;
             double d2 = mActualPreviewRate;
-            rect.right = (int) (((double) mPaperActualWidth) * d2);
-            rect.bottom = (int) (((double) mPaperActualHeight) * d2);
+            rect.right =  (( mPaperActualWidth) * d2);
+            rect.bottom =  (( mPaperActualHeight) * d2);
             mPreviewPaperRect.offsetTo((mScreenWidth - rect.right) / 2, (mScreenHeight - mPreviewPaperRect.bottom) / 2);
         }
     }
@@ -226,7 +226,7 @@ class PreviewPosition implements Serializable {
         if (mActualPreviewRate <= 0.0d) {
             return null;
         }
-        return new PreviewView.SizeAndPosition((int) (((double) mPrtimagePreviewPosition.getWidth()) / mActualPreviewRate), (int) (((double) mPrtimagePreviewPosition.getHeight()) / mActualPreviewRate), (int) (((double) (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate), (int) (((double) (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate), getPrtimageRotation());
+        return new PreviewView.SizeAndPosition( (( mPrtimagePreviewPosition.getWidth()) / mActualPreviewRate),  (( mPrtimagePreviewPosition.getHeight()) / mActualPreviewRate),  (( (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate),  (( (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate), getPrtimageRotation());
     }
 
     public ImageAndLayout getImageAndLayout(boolean z) {
@@ -238,14 +238,14 @@ class PreviewPosition implements Serializable {
         ImageAndLayout imageAndLayout = new ImageAndLayout();
         if (z) {
             imageAndLayout.setLayoutAreaSize(mBorderlessDataWidth, mBorderlessDataHeight);
-            d2 = (((double) (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate) + ((double) mBorderlessLeftMargin);
-            d = (((double) (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate) + ((double) mBorderlessTopMargin);
+            d2 = (( (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate) + ( mBorderlessLeftMargin);
+            d = (( (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate) + ( mBorderlessTopMargin);
         } else {
             imageAndLayout.setLayoutAreaSize(m3mPrintAreaActualWidth, m3mPrintAreaActualHeight);
-            d2 = (((double) (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate) - ((double) mPaperTo3mActualLeftMargin);
-            d = (((double) (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate) - ((double) mPaperTo3mActualTopMargin);
+            d2 = (( (mPrtimagePreviewPosition.getLeft() - mPreviewPaperRect.left)) / mActualPreviewRate) - ( mPaperTo3mActualLeftMargin);
+            d = (( (mPrtimagePreviewPosition.getTop() - mPreviewPaperRect.top)) / mActualPreviewRate) - ( mPaperTo3mActualTopMargin);
         }
-        imageAndLayout.setLayout(((double) mPrtimagePreviewPosition.getWidth()) / mActualPreviewRate, ((double) mPrtimagePreviewPosition.getHeight()) / mActualPreviewRate, d2, d, getPrtimageRotation());
+        imageAndLayout.setLayout(( mPrtimagePreviewPosition.getWidth()) / mActualPreviewRate, ( mPrtimagePreviewPosition.getHeight()) / mActualPreviewRate, d2, d, getPrtimageRotation());
         return imageAndLayout;
     }
 
@@ -258,8 +258,8 @@ class PreviewPosition implements Serializable {
                 i = i2;
                 i2 = i3;
             }
-            double d = ((double) mPaperActualWidth) / ((double) i2);
-            double d2 = ((double) mPaperActualHeight) / ((double) i);
+            double d = ( mPaperActualWidth) / ( i2);
+            double d2 = ( mPaperActualHeight) / ( i);
             if (d <= d2) {
                 d2 = d;
             }
@@ -372,8 +372,8 @@ class PreviewPosition implements Serializable {
 
         public void setScale(double d) {
             mScale = d;
-            mScaledWidth = (int) (((double) mX1Width) * d);
-            mScaledHeight = (int) (((double) mX1Height) * d);
+            mScaledWidth =  (( mX1Width) * d);
+            mScaledHeight =  (( mX1Height) * d);
             if ((mRotation & 1) != 0) {
                 int i = mScaledWidth;
                 mScaledWidth = mScaledHeight;

+ 6 - 6
app/src/main/java/com/epson/cameracopy/printlayout/PreviewView.java

@@ -126,11 +126,11 @@ public class PreviewView extends View {
             mMatrix.reset();
             mMatrix.setRotate(((float) prtimageRotation) * 90.0f);
             if ((prtimageRotation & 1) != 0) {
-                d2 = ((double) previewPrtimageRect.width()) / ((double) mBitmap.getHeight());
-                d = ((double) previewPrtimageRect.height()) / ((double) mBitmap.getWidth());
+                d2 = ( previewPrtimageRect.width()) / ( mBitmap.getHeight());
+                d = ( previewPrtimageRect.height()) / ( mBitmap.getWidth());
             } else {
-                d2 = ((double) previewPrtimageRect.width()) / ((double) mBitmap.getWidth());
-                d = ((double) previewPrtimageRect.height()) / ((double) mBitmap.getHeight());
+                d2 = ( previewPrtimageRect.width()) / ( mBitmap.getWidth());
+                d = ( previewPrtimageRect.height()) / ( mBitmap.getHeight());
             }
             mMatrix.postScale((float) d2, (float) d);
             switch (prtimageRotation) {
@@ -234,7 +234,7 @@ public class PreviewView extends View {
 
         public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
             mPreviewView.setMoving(true);
-            mPreviewView.mPreviewPosition.move(-((int) f), -((int) f2));
+            mPreviewView.mPreviewPosition.move(-( f), -( f2));
             mPreviewView.invalidate();
             return true;
         }
@@ -273,7 +273,7 @@ public class PreviewView extends View {
         }
 
         public boolean onScale(ScaleGestureDetector scaleGestureDetector) {
-            mPreviewView.mPreviewPosition.setScaleFactor(((double) scaleGestureDetector.getScaleFactor()) * mBaseFactor);
+            mPreviewView.mPreviewPosition.setScaleFactor(( scaleGestureDetector.getScaleFactor()) * mBaseFactor);
             mPreviewView.updateScale();
             mPreviewView.invalidate();
             return super.onScale(scaleGestureDetector);

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

@@ -22,8 +22,8 @@ public class CameraPreviewActivity extends ActivityIACommon {
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_camera_preview);
-        setActionBar((int) R.string.capture_title, true);
+        setContentView( R.layout.activity_camera_preview);
+        setActionBar( R.string.capture_title, true);
         if (bundle == null) {
             if (ActivityRequestPermissions.isRuntimePermissionSupported()) {
                 String[] strArr = {"android.permission.CAMERA"};
@@ -41,7 +41,7 @@ public class CameraPreviewActivity extends ActivityIACommon {
         boolean booleanExtra = getIntent().getBooleanExtra(PARAM_APP_INIT, true);
         CameraPreviewFragment cameraPreviewFragment = new CameraPreviewFragment();
         cameraPreviewFragment.setAppInitFlag(booleanExtra);
-        getSupportFragmentManager().beginTransaction().add((int) R.id.container, (Fragment) cameraPreviewFragment).commit();
+        getSupportFragmentManager().beginTransaction().add( R.id.container, (Fragment) cameraPreviewFragment).commit();
     }
 
     protected void onActivityResult(int i, int i2, Intent intent) {

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

@@ -108,7 +108,7 @@ public class CameraPreviewFragment extends Fragment implements CameraBridgeViewB
                 SimpleMessageDialogFragment.newInstance(R.string.back_camera_not_exists_message).show(getFragmentManager(), "error-dialog");
             }
         }
-        mOpenCvCameraView.setVisibility(0);
+        mOpenCvCameraView.setVisibility(View.VISIBLE);
         mDisplayRotation = ((WindowManager) getActivity().getSystemService(Service.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
         mSensorEventListener.setDisplayRotation(mDisplayRotation);
         mSensorEventListener.setSensorManager((SensorManager) getActivity().getSystemService("sensor"));
@@ -194,13 +194,13 @@ public class CameraPreviewFragment extends Fragment implements CameraBridgeViewB
         int i;
         int height = mat.height();
         if (height > 0) {
-            double scale = (double) (1.0f / mOpenCvCameraView.getScale());
-            int height2 = (int) (((double) mFunctionBarView.getHeight()) * scale);
-            int height3 = (int) (((double) mOpenCvCameraView.getHeight()) * scale);
-            double d = (double) height;
+            double scale =  (1.0f / mOpenCvCameraView.getScale());
+            int height2 =  (( mFunctionBarView.getHeight()) * scale);
+            int height3 =  (( mOpenCvCameraView.getHeight()) * scale);
+            double d =  height;
             if (height2 + 0 + height > height3) {
-                i = (int) (((double) 0) - (((double) (height3 - height)) / 2.0d));
-                d = (double) ((height3 - 0) - height2);
+                i =  (( 0) - (( (height3 - height)) / 2.0d));
+                d =  ((height3 - 0) - height2);
             } else {
                 i = 0;
             }
@@ -208,7 +208,7 @@ public class CameraPreviewFragment extends Fragment implements CameraBridgeViewB
             double d2 = size.width / 2.0d;
             double d3 = d / 10.0d;
             double d4 = scale;
-            double d5 = (double) i;
+            double d5 =  i;
             Point point = new Point();
             double d6 = d / 2.0d;
             Point point2 = new Point();
@@ -290,11 +290,11 @@ public class CameraPreviewFragment extends Fragment implements CameraBridgeViewB
             point2.f433y = d29;
             Imgproc.line(mRgba, point, point2, mGridColor, 2);
             if (z) {
-                double posX = d12 - (((double) (mSensorEventListener.getPosX() * 0.05098581f)) * d12);
-                double posY = d6 + (((double) (mSensorEventListener.getPosY() * 0.05098581f)) * d6) + d20;
-                int i2 = (int) (d4 * 20.0d * ((double) mDisplayDensity));
+                double posX = d12 - (( (mSensorEventListener.getPosX() * 0.05098581f)) * d12);
+                double posY = d6 + (( (mSensorEventListener.getPosY() * 0.05098581f)) * d6) + d20;
+                int i2 =  (d4 * 20.0d * ( mDisplayDensity));
                 Imgproc.circle(mRgba, new Point(posX, posY), i2, mPositionCursorColor, 1);
-                double d33 = (double) i2;
+                double d33 =  i2;
                 Imgproc.line(mRgba, new Point(posX, posY - d33), new Point(posX, posY + d33), mPositionCursorColor);
                 Imgproc.line(mRgba, new Point(posX - d33, posY), new Point(posX + d33, posY), mPositionCursorColor);
             }
@@ -363,8 +363,8 @@ public class CameraPreviewFragment extends Fragment implements CameraBridgeViewB
         int i = mInitCount;
         if (i < 2) {
             mInitCount = i + 1;
-            mScreenSize.f432x = (double) mRgba.width();
-            mScreenSize.f433y = (double) mRgba.height();
+            mScreenSize.f432x =  mRgba.width();
+            mScreenSize.f433y =  mRgba.height();
             Imgproc.rectangle(mRgba, POSITION_0_0, mScreenSize, COLOR_BLACK, -1);
         }
         sensorAndCamera();

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

@@ -27,11 +27,11 @@ public class CameraPreviewOptionActivity extends ActivityIACommon implements Pic
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_camera_preview_option);
-        setActionBar((int) R.string.camera_option_title, true);
+        setContentView( R.layout.activity_camera_preview_option);
+        setActionBar( R.string.camera_option_title, true);
         if (bundle == null) {
             mFragment = new PlaceholderFragment();
-            getSupportFragmentManager().beginTransaction().add((int) R.id.container, (Fragment) mFragment).commit();
+            getSupportFragmentManager().beginTransaction().add( R.id.container, (Fragment) mFragment).commit();
         }
     }
 

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

@@ -859,7 +859,7 @@ public class CameraPrintProgress extends Activity implements CommonDefine {
         TextView textView3 = mPercent;
         textView3.setText(this.percentString + "         0%");
         mProgressPercent.setProgress(0);
-        findViewById(R.id.epsonColorImageView).setVisibility(8);
+        findViewById(R.id.epsonColorImageView).setVisibility(View.GONE);
         if (this.isRemotePrinter) {
             mHandler.sendEmptyMessage(2);
         } else {

+ 17 - 17
app/src/main/java/com/epson/cameracopy/ui/CameraPrintSettingActivity.java

@@ -256,8 +256,8 @@ public class CameraPrintSettingActivity extends ActivityIACommon implements View
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.setting_layout);
-        setActionBar((int) R.string.str_btn_printer_settings, true);
+        setContentView( R.layout.setting_layout);
+        setActionBar( R.string.str_btn_printer_settings, true);
         bindEpsonService();
         mContext = this;
         mRemoteSrcType = 2;
@@ -312,10 +312,10 @@ public class CameraPrintSettingActivity extends ActivityIACommon implements View
 
     private void updatePrinterIcon() {
         if (this.printerName.getText().equals(getString(R.string.str_lbl_title_scan))) {
-            ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(8);
+            ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(View.GONE);
             return;
         }
-        ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(0);
+        ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(View.VISIBLE);
         switch (this.printerLocation) {
             case 1:
                 ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setImageResource(R.C2136drawable.print_local);
@@ -1080,30 +1080,30 @@ public class CameraPrintSettingActivity extends ActivityIACommon implements View
         setVisibilityPageRange(false);
         int[] iArr = color_info;
         if (iArr == null) {
-            ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(8);
+            ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(View.GONE);
         } else if (iArr.length <= 1) {
-            ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(8);
+            ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(View.GONE);
         } else {
-            ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(0);
+            ((ImageView) findViewById(R.id.color_next_screen_imv)).setVisibility(View.VISIBLE);
         }
         int[] iArr2 = duplex_info;
-        findViewById(R.id.duplex_view).setVisibility(8);
-        ((LinearLayout) findViewById(R.id.duplex)).setVisibility(8);
+        findViewById(R.id.duplex_view).setVisibility(View.GONE);
+        ((LinearLayout) findViewById(R.id.duplex)).setVisibility(View.GONE);
         switch (this.lang) {
             case 2:
             case 3:
-                findViewById(R.id.feed_direction_view).setVisibility(0);
-                findViewById(R.id.feed_direction).setVisibility(0);
+                findViewById(R.id.feed_direction_view).setVisibility(View.VISIBLE);
+                findViewById(R.id.feed_direction).setVisibility(View.VISIBLE);
                 break;
             default:
-                findViewById(R.id.feed_direction_view).setVisibility(8);
-                findViewById(R.id.feed_direction).setVisibility(8);
+                findViewById(R.id.feed_direction_view).setVisibility(View.GONE);
+                findViewById(R.id.feed_direction).setVisibility(View.GONE);
                 break;
         }
         if (!this.isDocumentSetting) {
             int i = printerLocation;
         }
-        findViewById(R.id.printdate).setVisibility(8);
+        findViewById(R.id.printdate).setVisibility(View.GONE);
     }
 
     private int getPrinterLang() {
@@ -1160,7 +1160,7 @@ public class CameraPrintSettingActivity extends ActivityIACommon implements View
         duplex_info = null;
         autoConnectSsid = "";
         printerName.setText(getString(R.string.str_lbl_title_scan));
-        ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(8);
+        ((ImageView) findViewById(R.id.imageViewPrinterLocation)).setVisibility(View.GONE);
         updateSettingView();
         setScreenState(true);
     }
@@ -1184,9 +1184,9 @@ public class CameraPrintSettingActivity extends ActivityIACommon implements View
 
     private void setScreenState(Boolean bool) {
         if (bool.booleanValue()) {
-            progressGetOption.setVisibility(8);
+            progressGetOption.setVisibility(View.GONE);
         } else {
-            progressGetOption.setVisibility(0);
+            progressGetOption.setVisibility(View.VISIBLE);
         }
         findViewById(R.id.printer).setClickable(bool.booleanValue());
         findViewById(R.id.paper_size).setClickable(bool.booleanValue());

+ 31 - 31
app/src/main/java/com/epson/cameracopy/ui/CropImageActivity.java

@@ -210,14 +210,14 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_crop_image);
+        setContentView( R.layout.activity_crop_image);
         mModelDialog = (DialogProgressViewModel) ViewModelProviders.m2of((FragmentActivity) this).get(DialogProgressViewModel.class);
         mModelDialog.getDialogJob().observe(this, new Observer() {
             public final void onChanged(Object obj) {
                 CropImageActivity.lambda$onCreate$0(CropImageActivity.this, (Deque) obj);
             }
         });
-        setActionBar((int) R.string.crop_image_title, true);
+        setActionBar( R.string.crop_image_title, true);
         mActivity = new WeakReference<>(this);
         mCropImageActivity = (CropImageActivity) mActivity.get();
         mModelDialog.doShow(DIALOG_PROGRESS);
@@ -289,7 +289,7 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
         String stringExtra = getIntent().getStringExtra(IMAGE_FILE_NAME);
         mMetrics = new DisplayMetrics();
         getWindowManager().getDefaultDisplay().getMetrics(mMetrics);
-        mDeviceSize = new Size((double) mMetrics.widthPixels, (double) mMetrics.heightPixels);
+        mDeviceSize = new Size( mMetrics.widthPixels,  mMetrics.heightPixels);
         mCorrectionParamSet = new CorrectionParamSet();
         mCorrectionHistory = new ArrayList();
         mUserFolder = GetCacheFolder(false);
@@ -304,8 +304,8 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
         mCurrentPaperSize = new Size(3048.0d, 4321.0d);
         Info_paper infoPaper = Info_paper.getInfoPaper(this, mCurrentPaperId);
         if (infoPaper != null) {
-            mCurrentPaperSize.width = (double) infoPaper.getPaper_width();
-            mCurrentPaperSize.height = (double) infoPaper.getPaper_height();
+            mCurrentPaperSize.width =  infoPaper.getPaper_width();
+            mCurrentPaperSize.height =  infoPaper.getPaper_height();
         }
         mImageCollect = new ImageCollect(stringExtra, mMetrics.density, mCurrentPaperSize);
         mImageCollect.SetPath(mCacheFolder, mUserFolder, instance.getSaveDirecotry());
@@ -483,7 +483,7 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
                         z = true;
                     }
                     if (z) {
-                        MessageBox(101, -1, (int) R.string.finish_color_adjustment_message, (int) MSG_SDIC_BCSC_FIX_PROC, (int) MSG_SDIC_BCSC_FIX_CANCEL);
+                        MessageBox(101, -1,  R.string.finish_color_adjustment_message,  MSG_SDIC_BCSC_FIX_PROC,  MSG_SDIC_BCSC_FIX_CANCEL);
                         return;
                     }
                     activityModeChange(1);
@@ -956,8 +956,8 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
             mInfoPaper = Info_paper.getInfoPaper(this, mDocumentSizeInfo.getPaperId());
             Info_paper info_paper = mInfoPaper;
             if (info_paper != null) {
-                mPaperSize.width = (double) info_paper.getPaper_width();
-                mPaperSize.height = (double) mInfoPaper.getPaper_height();
+                mPaperSize.width =  info_paper.getPaper_width();
+                mPaperSize.height =  mInfoPaper.getPaper_height();
             }
         } else if (paperId < -1) {
             double width = mDocumentSizeInfo.getWidth();
@@ -1003,11 +1003,11 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
 
     private void palletShow() {
         if (mImageCollectPalletLayout.getVisibility() == 0) {
-            mImageCollectPalletLayout.setVisibility(8);
+            mImageCollectPalletLayout.setVisibility(View.GONE);
             mImageCollectPalletButton.setText("▲");
             return;
         }
-        mImageCollectPalletLayout.setVisibility(0);
+        mImageCollectPalletLayout.setVisibility(View.VISIBLE);
         mImageCollectPalletButton.setText("▼");
     }
 
@@ -1093,15 +1093,15 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
 
     private void activityModeChange(int i) {
         if (i == 0) {
-            mImageCollectPreviewLayout.setVisibility(0);
-            mImageCollectPaperSizeInfo.setVisibility(0);
+            mImageCollectPreviewLayout.setVisibility(View.VISIBLE);
+            mImageCollectPaperSizeInfo.setVisibility(View.VISIBLE);
             mImageCollectPalletButton.setVisibility(4);
-            mImageCollectSwitchLayout.setVisibility(8);
-            mImageCollectPalletLayout.setVisibility(8);
+            mImageCollectSwitchLayout.setVisibility(View.GONE);
+            mImageCollectPalletLayout.setVisibility(View.GONE);
             setTitle(R.string.crop_image_title);
-            mToolbarCropImage.setVisibility(0);
-            mToolbarEnhanceText.setVisibility(8);
-            mToolbarColorAdjustment.setVisibility(8);
+            mToolbarCropImage.setVisibility(View.VISIBLE);
+            mToolbarEnhanceText.setVisibility(View.GONE);
+            mToolbarColorAdjustment.setVisibility(View.GONE);
             mButtonDocSize = (Button) mToolbarCropImage.findViewById(R.id.document_size_button);
             mButtonDocSize.setOnClickListener(this);
             mButtonExecute = (Button) mToolbarCropImage.findViewById(R.id.execute_button);
@@ -1115,15 +1115,15 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
             zArr[3] = true;
             zArr[4] = true;
         } else if (i == 1) {
-            mImageCollectPreviewLayout.setVisibility(0);
+            mImageCollectPreviewLayout.setVisibility(View.VISIBLE);
             mImageCollectPaperSizeInfo.setVisibility(4);
             mImageCollectPalletButton.setVisibility(4);
-            mImageCollectSwitchLayout.setVisibility(0);
-            mImageCollectPalletLayout.setVisibility(8);
+            mImageCollectSwitchLayout.setVisibility(View.VISIBLE);
+            mImageCollectPalletLayout.setVisibility(View.GONE);
             setTitle(R.string.enhance_text_title);
-            mToolbarCropImage.setVisibility(8);
-            mToolbarEnhanceText.setVisibility(0);
-            mToolbarColorAdjustment.setVisibility(8);
+            mToolbarCropImage.setVisibility(View.GONE);
+            mToolbarEnhanceText.setVisibility(View.VISIBLE);
+            mToolbarColorAdjustment.setVisibility(View.GONE);
             mButtonSave = (Button) mToolbarEnhanceText.findViewById(R.id.save_button);
             mButtonSave.setOnClickListener(this);
             mButtonColorAdjustment = (Button) mToolbarEnhanceText.findViewById(R.id.color_adjustment_button);
@@ -1133,16 +1133,16 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
             mButtonExecute.setOnClickListener(this);
             mImageCollectView.SetViewMode(1);
         } else if (i == 2) {
-            mImageCollectPreviewLayout.setVisibility(0);
+            mImageCollectPreviewLayout.setVisibility(View.VISIBLE);
             mImageCollectPaperSizeInfo.setVisibility(4);
-            mImageCollectPalletButton.setVisibility(0);
+            mImageCollectPalletButton.setVisibility(View.VISIBLE);
             mImageCollectPalletButton.setText("▼");
-            mImageCollectSwitchLayout.setVisibility(8);
-            mImageCollectPalletLayout.setVisibility(0);
+            mImageCollectSwitchLayout.setVisibility(View.GONE);
+            mImageCollectPalletLayout.setVisibility(View.VISIBLE);
             setTitle(R.string.color_adjustment_title);
-            mToolbarCropImage.setVisibility(8);
-            mToolbarEnhanceText.setVisibility(8);
-            mToolbarColorAdjustment.setVisibility(0);
+            mToolbarCropImage.setVisibility(View.GONE);
+            mToolbarEnhanceText.setVisibility(View.GONE);
+            mToolbarColorAdjustment.setVisibility(View.VISIBLE);
             mButtonReset = (Button) mToolbarColorAdjustment.findViewById(R.id.reset_button);
             mButtonReset.setOnClickListener(this);
             UiCommon.setButtonEnabled(mButtonReset, false);
@@ -1253,7 +1253,7 @@ public class CropImageActivity extends ActivityIACommon implements View.OnClickL
 
         public void SetHandler(Handler handler) {
             mHandlerAvtivity = handler;
-            setVisibility(0);
+            setVisibility(View.VISIBLE);
         }
 
         private void Init() {

+ 2 - 2
app/src/main/java/com/epson/cameracopy/ui/CurrentFolderName.java

@@ -27,9 +27,9 @@ class CurrentFolderName {
 
     public void Show(boolean z) {
         if (z) {
-            mFolderSelectCurrent.setVisibility(0);
+            mFolderSelectCurrent.setVisibility(View.VISIBLE);
         } else {
-            mFolderSelectCurrent.setVisibility(8);
+            mFolderSelectCurrent.setVisibility(View.GONE);
         }
     }
 

+ 16 - 16
app/src/main/java/com/epson/cameracopy/ui/DocumentSizeEditActivity.java

@@ -40,8 +40,8 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_document_size_edit);
-        setActionBar((int) R.string.document_size_edit_title, true);
+        setContentView( R.layout.activity_document_size_edit);
+        setActionBar( R.string.document_size_edit_title, true);
         mScale = (RadioGroup) findViewById(R.id.document_size_scale);
         mScale.setOnCheckedChangeListener(this);
         mWidthText = (TextView) findViewById(R.id.width);
@@ -120,10 +120,10 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
         mScale.check(R.id.mm_button);
         mWidth = mDocumentSizeInfo.getWidth();
         TextView textView3 = mWidthText;
-        textView3.setText(String.valueOf((int) getRoundDownValue(mWidth, 0)) + " mm");
+        textView3.setText(String.valueOf( getRoundDownValue(mWidth, 0)) + " mm");
         mHeight = mDocumentSizeInfo.getHeight();
         TextView textView4 = mHeightText;
-        textView4.setText(String.valueOf((int) getRoundDownValue(mHeight, 0)) + " mm");
+        textView4.setText(String.valueOf( getRoundDownValue(mHeight, 0)) + " mm");
     }
 
     private void decWidth() {
@@ -142,10 +142,10 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
         if (mWidth < 1.0d) {
             mWidth = 1.0d;
         }
-        int roundDownValue2 = (int) getRoundDownValue(mWidth, 0);
+        int roundDownValue2 =  getRoundDownValue(mWidth, 0);
         TextView textView2 = mWidthText;
         textView2.setText(String.valueOf(roundDownValue2) + " mm");
-        mWidth = (double) roundDownValue2;
+        mWidth =  roundDownValue2;
     }
 
     private void incWidth() {
@@ -164,10 +164,10 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
         if (mWidth > 1000.0d) {
             mWidth = 1000.0d;
         }
-        int roundDownValue2 = (int) getRoundDownValue(mWidth, 0);
+        int roundDownValue2 =  getRoundDownValue(mWidth, 0);
         TextView textView2 = mWidthText;
         textView2.setText(String.valueOf(roundDownValue2) + " mm");
-        mWidth = (double) roundDownValue2;
+        mWidth =  roundDownValue2;
     }
 
     private void decHeight() {
@@ -185,10 +185,10 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
         if (mHeight < 1.0d) {
             mHeight = 1.0d;
         }
-        int roundDownValue2 = (int) getRoundDownValue(mHeight, 0);
+        int roundDownValue2 =  getRoundDownValue(mHeight, 0);
         TextView textView2 = mHeightText;
         textView2.setText(String.valueOf(roundDownValue2) + " mm");
-        mHeight = (double) roundDownValue2;
+        mHeight =  roundDownValue2;
     }
 
     private void incHeight() {
@@ -207,10 +207,10 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
         if (mHeight > 1000.0d) {
             mHeight = 1000.0d;
         }
-        int roundDownValue2 = (int) getRoundDownValue(mHeight, 0);
+        int roundDownValue2 =  getRoundDownValue(mHeight, 0);
         TextView textView2 = mHeightText;
         textView2.setText(String.valueOf(roundDownValue2) + " mm");
-        mHeight = (double) roundDownValue2;
+        mHeight =  roundDownValue2;
     }
 
     private void convertDocumentSize() {
@@ -241,18 +241,18 @@ public class DocumentSizeEditActivity extends ActivityIACommon implements View.O
             d3 = 1000.0d;
         }
         mWidth = d3;
-        int roundDownValue3 = (int) getRoundDownValue(mWidth, 0);
+        int roundDownValue3 =  getRoundDownValue(mWidth, 0);
         mWidthText.setText(String.valueOf(roundDownValue3) + " mm");
-        mWidth = (double) roundDownValue3;
+        mWidth =  roundDownValue3;
         mHeight = mHeight * 25.4d;
         double d4 = mHeight;
         if (d4 > 1000.0d) {
             d4 = 1000.0d;
         }
         mHeight = d4;
-        int roundDownValue4 = (int) getRoundDownValue(mHeight, 0);
+        int roundDownValue4 =  getRoundDownValue(mHeight, 0);
         mHeightText.setText(String.valueOf(roundDownValue4) + " mm");
-        mHeight = (double) roundDownValue4;
+        mHeight =  roundDownValue4;
     }
 
     private double getRoundDownValue(double d, int i) {

+ 4 - 4
app/src/main/java/com/epson/cameracopy/ui/DocumentSizeSettingActivity.java

@@ -38,8 +38,8 @@ public class DocumentSizeSettingActivity extends ActivityIACommon implements Vie
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_document_size_setting);
-        setActionBar((int) R.string.document_size_title, true);
+        setContentView( R.layout.activity_document_size_setting);
+        setActionBar( R.string.document_size_title, true);
         mListView = (ListView) findViewById(R.id.docsize_list);
         mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
@@ -98,7 +98,7 @@ public class DocumentSizeSettingActivity extends ActivityIACommon implements Vie
                 z = false;
             }
             mDelete.setEnabled(z);
-            findViewById(R.id.document_size_menu).setVisibility(0);
+            findViewById(R.id.document_size_menu).setVisibility(View.VISIBLE);
             return;
         }
         findViewById(R.id.document_size_menu).setVisibility(4);
@@ -208,7 +208,7 @@ public class DocumentSizeSettingActivity extends ActivityIACommon implements Vie
             ((TextView) view.findViewById(R.id.docsize_name)).setText(item.getDocSizeName(DocumentSizeSettingActivity.this));
             ImageView imageView = (ImageView) view.findViewById(R.id.current_docsize_image);
             if (mRegistedDocumentSizeList.isSelected(item)) {
-                imageView.setVisibility(0);
+                imageView.setVisibility(View.VISIBLE);
             } else {
                 imageView.setVisibility(4);
             }

+ 2 - 2
app/src/main/java/com/epson/cameracopy/ui/FolderSelectActivity.java

@@ -59,8 +59,8 @@ public class FolderSelectActivity extends ActivityIACommon implements View.OnCli
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_folder_select);
-        setActionBar((int) R.string.folder_selector_title, true);
+        setContentView( R.layout.activity_folder_select);
+        setActionBar( R.string.folder_selector_title, true);
         mActivity = new WeakReference<>(this);
         mFolderSelectActivity = (FolderSelectActivity) mActivity.get();
         mFolderSelectBase = (LinearLayout) findViewById(R.id.folder_select_base);

+ 5 - 5
app/src/main/java/com/epson/cameracopy/ui/ImageCollectView.java

@@ -967,7 +967,7 @@ public class ImageCollectView extends View {
             path.addCircle(mData.f133d[mOrient].dcm.mPointPreviewCrop[i].x, mData.f133d[mOrient].dcm.mPointPreviewCrop[i].y, mData.mRadiusCropCircle, Path.Direction.CW);
             path.computeBounds(rectF, true);
             Region region = new Region();
-            region.setPath(path, new Region((int) rectF.left, (int) rectF.top, (int) rectF.right, (int) rectF.bottom));
+            region.setPath(path, new Region( rectF.left,  rectF.top,  rectF.right,  rectF.bottom));
             boolean contains = region.contains(Math.round(f), Math.round(f2));
             if (!contains) {
                 if (z) {
@@ -1355,10 +1355,10 @@ public class ImageCollectView extends View {
             if (mPathEffectBlinkingTime == 0) {
                 mPathEffectBlinkingTime = currentTimeMillis;
                 if (rectF != null) {
-                    mRectDirty.left = (int) rectF.left;
-                    mRectDirty.top = (int) rectF.top;
-                    mRectDirty.right = (int) (rectF.right + 1.0f);
-                    mRectDirty.bottom = (int) (rectF.bottom + 1.0f);
+                    mRectDirty.left =  rectF.left;
+                    mRectDirty.top =  rectF.top;
+                    mRectDirty.right =  (rectF.right + 1.0f);
+                    mRectDirty.bottom =  (rectF.bottom + 1.0f);
                 } else {
                     mRectDirty.setEmpty();
                 }

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

@@ -57,8 +57,8 @@ public class ImagePreviewActivity extends ActivityIACommon {
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_picture_view);
-        setActionBar((int) R.string.image_preview_title, true);
+        setContentView( R.layout.activity_picture_view);
+        setActionBar( R.string.image_preview_title, true);
         if (bundle == null) {
             Intent intent = getIntent();
             if (intent == null) {
@@ -76,7 +76,7 @@ public class ImagePreviewActivity extends ActivityIACommon {
                 finish();
             } else if (cameraFile == null || new File(cameraFile.getValidFileName()).exists()) {
                 mFragment = PlaceholderFragment.getInstance(stringExtra, cameraFile);
-                getSupportFragmentManager().beginTransaction().add((int) R.id.container, (Fragment) mFragment).commit();
+                getSupportFragmentManager().beginTransaction().add( R.id.container, (Fragment) mFragment).commit();
             } else {
                 finish();
             }
@@ -236,11 +236,11 @@ public class ImagePreviewActivity extends ActivityIACommon {
                 }
             });
             if (mImagePreviewFile != null) {
-                mProgressBar.setVisibility(8);
+                mProgressBar.setVisibility(View.GONE);
                 setPreview();
                 UiCommon.setButtonEnabled(mSaveButton, mImagePreviewFile.needSaveButton());
             } else {
-                mProgressBar.setVisibility(0);
+                mProgressBar.setVisibility(View.VISIBLE);
                 observeImageConvertFromArgument();
             }
             return inflate;
@@ -286,7 +286,7 @@ public class ImagePreviewActivity extends ActivityIACommon {
         }
 
         private void localFolderFileViewModelPrepared(@Nullable ImageFolderFile imageFolderFile) {
-            mProgressBar.setVisibility(8);
+            mProgressBar.setVisibility(View.GONE);
             mImagePreviewFile = imageFolderFile;
             UiCommon.setButtonEnabled(mSaveButton, mImagePreviewFile.needSaveButton());
             restorePreview();

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

@@ -117,7 +117,7 @@ public class PictureResolutionDialogFragment extends DialogFragment {
             if (i != mSelectNumber) {
                 imageView.setVisibility(4);
             } else {
-                imageView.setVisibility(0);
+                imageView.setVisibility(View.VISIBLE);
             }
             return view;
         }

+ 5 - 5
app/src/main/java/com/epson/cameracopy/ui/PrintPreviewActivity.java

@@ -168,7 +168,7 @@ public class PrintPreviewActivity extends ActivityIACommon implements CommonDefi
                                 Toast.makeText(printPreviewActivity, printPreviewActivity.getString(R.string.file_size_notsupport), 1).show();
                                 break;
                             case 8:
-                                PrintPreviewActivity.this.updateManuscriptScaleText(((Double) message.obj).doubleValue());
+                                PrintPreviewActivity.this.updateManuscriptScaleText(( message.obj).doubleValue());
                                 return true;
                         }
                 }
@@ -199,7 +199,7 @@ public class PrintPreviewActivity extends ActivityIACommon implements CommonDefi
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_camera_print_preview);
+        setContentView( R.layout.activity_camera_print_preview);
         mModelDialog = (DialogProgressViewModel) ViewModelProviders.m2of((FragmentActivity) this).get(DialogProgressViewModel.class);
         mModelDialog.getDialogJob().observe(this, new Observer() {
             public final void onChanged(Object obj) {
@@ -214,7 +214,7 @@ public class PrintPreviewActivity extends ActivityIACommon implements CommonDefi
                 }
             }
         });
-        setActionBar((int) R.string.print_title, true);
+        setActionBar( R.string.print_title, true);
         ExternalFileUtils.getInstance(this).initPrintDir();
         getImageListFromIntent();
         EPImageList ePImageList = mImageList;
@@ -336,7 +336,7 @@ public class PrintPreviewActivity extends ActivityIACommon implements CommonDefi
 
     private void updateManuscriptScaleText(double d) {
         PointF physicalSize = mManuscriptSize.getPhysicalSize(this);
-        mScaleText.setText(String.format(Locale.US, mManuscriptSize.getUnitType(this) == 2 ? "%s: %.0f%% (%.1f x %.1f %s)" : "%s: %.0f%% (%.0f x %.0f %s)", new Object[]{getString(R.string.magnification), Double.valueOf(100.0d * d), Double.valueOf(((double) physicalSize.x) * d), Double.valueOf(((double) physicalSize.y) * d), mManuscriptSize.getUnitStr(this)}));
+        mScaleText.setText(String.format(Locale.US, mManuscriptSize.getUnitType(this) == 2 ? "%s: %.0f%% (%.1f x %.1f %s)" : "%s: %.0f%% (%.0f x %.0f %s)", new Object[]{getString(R.string.magnification), Double.valueOf(100.0d * d), Double.valueOf(( physicalSize.x) * d), Double.valueOf(( physicalSize.y) * d), mManuscriptSize.getUnitStr(this)}));
     }
 
     private void loadPrinterSettingAndChangeView(boolean z) {
@@ -577,7 +577,7 @@ public class PrintPreviewActivity extends ActivityIACommon implements CommonDefi
             PrintSetting printSetting = new PrintSetting(this, PrintSetting.Kind.cameracopy);
             printSetting.loadSettings();
             if (this.paperSourceInfo.checkPaperMissmatch(printSetting, aPaperSourceSetting)) {
-                paperMissmath.setVisibility(0);
+                paperMissmath.setVisibility(View.VISIBLE);
             } else {
                 paperMissmath.setVisibility(4);
             }

+ 3 - 3
app/src/main/java/com/epson/lib/escani2/ScanSize.java

@@ -223,10 +223,10 @@ public class ScanSize implements Serializable {
             iArr[1] = i3;
         }
         if (i != 300) {
-            iArr[0] = (int) ((((double) iArr[0]) * ((double) i)) / ((double) 300));
+            iArr[0] =  ((( iArr[0]) * ( i)) / ( 300));
         }
         if (i2 != 300) {
-            iArr[1] = (int) ((((double) iArr[1]) * ((double) i2)) / ((double) 300));
+            iArr[1] =  ((( iArr[1]) * ( i2)) / ( 300));
         }
         return iArr;
     }
@@ -238,7 +238,7 @@ public class ScanSize implements Serializable {
             return new int[]{0, 0};
         } else {
             int[] iArr = {0, 0};
-            iArr[0] = calcOffset(scannerI2Info.getAlignment(inputUnit), getPixel(scannerI2Info, inputUnit, i, i2)[0], (int) Math.round((((double) scannerI2Info.getSensorSize(inputUnit)[0]) * ((double) i)) / ((double) scannerI2Info.getSensorSizeBaseResolution())));
+            iArr[0] = calcOffset(scannerI2Info.getAlignment(inputUnit), getPixel(scannerI2Info, inputUnit, i, i2)[0],  Math.round((( scannerI2Info.getSensorSize(inputUnit)[0]) * ( i)) / ( scannerI2Info.getSensorSizeBaseResolution())));
             return iArr;
         }
     }

+ 2 - 2
app/src/main/java/com/epson/lib/escani2/ScannerI2Info.java

@@ -44,10 +44,10 @@ public class ScannerI2Info implements Serializable {
         int[] sensorSize = getSensorSize(inputUnit);
         int sensorSizeBaseResolution = getSensorSizeBaseResolution();
         if (i != sensorSizeBaseResolution) {
-            sensorSize[0] = (int) ((((double) sensorSize[0]) * ((double) i)) / ((double) sensorSizeBaseResolution));
+            sensorSize[0] =  ((( sensorSize[0]) * ( i)) / ( sensorSizeBaseResolution));
         }
         if (i2 != sensorSizeBaseResolution) {
-            sensorSize[1] = (int) ((((double) sensorSize[1]) * ((double) i2)) / ((double) sensorSizeBaseResolution));
+            sensorSize[1] =  ((( sensorSize[1]) * ( i2)) / ( sensorSizeBaseResolution));
         }
         return sensorSize;
     }

+ 1 - 1
app/src/main/java/com/epson/memcardacc/AltViewImageAdapter.java

@@ -107,7 +107,7 @@ public class AltViewImageAdapter extends BaseAdapter implements CommonDefine {
                     }
                     relativeLayout.addView(imageView3, 1);
                 } else {
-                    imageView2.setVisibility(0);
+                    imageView2.setVisibility(View.VISIBLE);
                 }
             } else if (imageView2 != null) {
                 imageView2.setVisibility(4);

+ 3 - 3
app/src/main/java/com/epson/memcardacc/ConfirmReadMemcard.java

@@ -67,14 +67,14 @@ public class ConfirmReadMemcard extends ActivityIACommon implements DialogProgre
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_confirm_read_memcard);
+        setContentView( R.layout.activity_confirm_read_memcard);
         mModelDialog = (DialogProgressViewModel) ViewModelProviders.m2of((FragmentActivity) this).get(DialogProgressViewModel.class);
         mModelDialog.getDialogJob().observe(this, new Observer() {
             public final void onChanged(Object obj) {
                 ConfirmReadMemcard.lambda$onCreate$0(ConfirmReadMemcard.this, (Deque) obj);
             }
         });
-        setActionBar((int) R.string.memcard_title_copy_confirm, true);
+        setActionBar( R.string.memcard_title_copy_confirm, true);
         mFileNumText = (TextView) findViewById(R.id.textFileNumber);
         mFileSizeText = (TextView) findViewById(R.id.textFileSize);
         mFileSizeText.setText(CommonDefine.QUESTION_MARK);
@@ -198,7 +198,7 @@ public class ConfirmReadMemcard extends ActivityIACommon implements DialogProgre
 
     public void updateFileSize(long j) {
         mTotalFileSize = j;
-        mFileSizeText.setText(String.format(getResources().getString(R.string.memcard_total_file_size_format), new Object[]{Double.valueOf(((double) mTotalFileSize) / 1000000.0d)}));
+        mFileSizeText.setText(String.format(getResources().getString(R.string.memcard_total_file_size_format), new Object[]{Double.valueOf(( mTotalFileSize) / 1000000.0d)}));
     }
 
     private void startCopyActivity() {

+ 3 - 3
app/src/main/java/com/epson/memcardacc/ConfirmWriteMemcard.java

@@ -77,14 +77,14 @@ public class ConfirmWriteMemcard extends ActivityIACommon implements DialogProgr
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_confirm_write_memcard);
+        setContentView( R.layout.activity_confirm_write_memcard);
         mModelDialog = (DialogProgressViewModel) ViewModelProviders.m2of((FragmentActivity) this).get(DialogProgressViewModel.class);
         mModelDialog.getDialogJob().observe(this, new Observer() {
             public final void onChanged(Object obj) {
                 ConfirmWriteMemcard.lambda$onCreate$0(ConfirmWriteMemcard.this, (Deque) obj);
             }
         });
-        setActionBar((int) R.string.memcard_title_copy_confirm, true);
+        setActionBar( R.string.memcard_title_copy_confirm, true);
         mFileNumText = (TextView) findViewById(R.id.textFileNumber);
         mFileSizeText = (TextView) findViewById(R.id.textFileSize);
         mCopyTargetPrinter = (TextView) findViewById(R.id.textWritePrt);
@@ -155,7 +155,7 @@ public class ConfirmWriteMemcard extends ActivityIACommon implements DialogProgr
 
     private void updateFileInfo(@Nullable ArrayList<String> arrayList) {
         mFileNumText.setText(String.format(getResources().getString(R.string.memcard_file_num_format), new Object[]{Integer.valueOf(arrayList != null ? arrayList.size() : 0)}));
-        mFileSizeText.setText(String.format(getResources().getString(R.string.memcard_total_file_size_format), new Object[]{Double.valueOf(((double) mTotalFileSize) / 1000000.0d)}));
+        mFileSizeText.setText(String.format(getResources().getString(R.string.memcard_total_file_size_format), new Object[]{Double.valueOf(( mTotalFileSize) / 1000000.0d)}));
     }
 
     protected void onResume() {

+ 1 - 1
app/src/main/java/com/epson/memcardacc/CopyTask.java

@@ -280,7 +280,7 @@ class CopyTask extends AsyncTaskExecutor<Void, Integer, Integer> {
         L_0x0080:
             r10 = -1203(0xfffffffffffffb4d, float:NaN)
             com.epson.memcardacc.CifsAccess r11 = r13.mCifsAccess     // Catch:{ UnsupportedEncodingException -> 0x00a7 }
-            int r9 = (int) r8     // Catch:{ UnsupportedEncodingException -> 0x00a7 }
+            int r9 =  r8     // Catch:{ UnsupportedEncodingException -> 0x00a7 }
             int r8 = r11.writeToPrinterMemcard(r3, r5, r9)     // Catch:{ UnsupportedEncodingException -> 0x00a7 }
             java.util.ArrayList<java.lang.String> r11 = r13.mWriteFileList     // Catch:{ UnsupportedEncodingException -> 0x00a5 }
             if (r11 == 0) goto L_0x00ac

+ 3 - 3
app/src/main/java/com/epson/memcardacc/ImageFileListAdapter.java

@@ -68,16 +68,16 @@ public class ImageFileListAdapter extends BaseAdapter implements Serializable {
                 imageView.setImageResource(R.C2136drawable.folder);
                 textView.setText(fileInfoWithCheck.getFileName());
             }
-            textView.setVisibility(0);
+            textView.setVisibility(View.VISIBLE);
         } else {
             imageView.setImageResource(R.C2136drawable.image);
             textView.setVisibility(4);
         }
         ImageView imageView2 = (ImageView) view.findViewById(R.id.checkImage);
         if (fileInfoWithCheck.mChecked != 0) {
-            imageView2.setVisibility(0);
+            imageView2.setVisibility(View.VISIBLE);
         } else {
-            imageView2.setVisibility(8);
+            imageView2.setVisibility(View.GONE);
         }
         return view;
     }

+ 1 - 1
app/src/main/java/com/epson/memcardacc/ImageUtil.java

@@ -14,7 +14,7 @@ public class ImageUtil {
 
     public static int getSampleSize(WidthHeight widthHeight, WidthHeight widthHeight2) {
         if (widthHeight.mWidth >= widthHeight2.mWidth || widthHeight.mHeight >= widthHeight2.mHeight) {
-            return (int) Math.floor((double) Math.min(((float) widthHeight.mWidth) / ((float) widthHeight2.mWidth), ((float) widthHeight.mHeight) / ((float) widthHeight2.mHeight)));
+            return  Math.floor( Math.min(((float) widthHeight.mWidth) / ((float) widthHeight2.mWidth), ((float) widthHeight.mHeight) / ((float) widthHeight2.mHeight)));
         }
         return 1;
     }

+ 1 - 1
app/src/main/java/com/epson/memcardacc/MemcardImageGrid.java

@@ -124,7 +124,7 @@ public class MemcardImageGrid extends ActivityIACommon implements DialogProgress
         mImageFileListAdapter = new ImageFileListAdapter();
         mImageFileListAdapter.setLayoutInflater(getLayoutInflater());
         mImageFileListAdapter.setUpFolderString(getResources().getString(R.string.memcard_folder_up));
-        setContentView((int) R.layout.activity_memcard_image_grid);
+        setContentView( R.layout.activity_memcard_image_grid);
         setActionBar("", true);
         mGridView = (GridView) findViewById(R.id.gridView1);
         mGridView.setAdapter(mImageFileListAdapter);

+ 2 - 2
app/src/main/java/com/epson/memcardacc/MemcardPhotocopyTop.java

@@ -29,8 +29,8 @@ public class MemcardPhotocopyTop extends MemcardTopSuper {
             CifsAccess.clearSmbAuthInfo();
         }
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_mcphotocopy_top);
-        setActionBar((int) R.string.FunctionName_iPrint_PhotoTransfer, true);
+        setContentView( R.layout.activity_mcphotocopy_top);
+        setActionBar( R.string.FunctionName_iPrint_PhotoTransfer, true);
         mLaunchType = 0;
         findViewById(R.id.photocopy_button).setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {

+ 2 - 2
app/src/main/java/com/epson/memcardacc/MemcardReadProgress.java

@@ -48,9 +48,9 @@ public class MemcardReadProgress extends Activity {
         mTargetFolderName = intent.getStringExtra("target_folder_name");
         mMemcardStorageType = intent.getIntExtra("memcard_storage_type", 1);
         mTotalProgress = (ProgressBar) findViewById(R.id.progress_percent);
-        mTotalProgress.setVisibility(0);
+        mTotalProgress.setVisibility(View.VISIBLE);
         mEachProgress = (ProgressBar) findViewById(R.id.progress_copies);
-        mEachProgress.setVisibility(8);
+        mEachProgress.setVisibility(View.GONE);
         mTextView = (TextView) findViewById(R.id.percent);
         ((TextView) findViewById(R.id.copyingMessageText)).setText(getResources().getString(R.string.memcard_file_reading_message));
         Intent intent2 = getIntent();

+ 2 - 2
app/src/main/java/com/epson/memcardacc/MemcardTop.java

@@ -29,8 +29,8 @@ public class MemcardTop extends MemcardTopSuper {
             CifsAccess.clearSmbAuthInfo();
         }
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_memcard_top);
-        setActionBar((int) R.string.FunctionName_iPrint_MemoryCard, true);
+        setContentView( R.layout.activity_memcard_top);
+        setActionBar( R.string.FunctionName_iPrint_MemoryCard, true);
         mLaunchType = 0;
     }
 

+ 5 - 5
app/src/main/java/com/epson/mobilephone/common/EpLog.java

@@ -216,23 +216,23 @@ public final class EpLog {
             stringBuffer.append(Long.toString(Debug.getNativeHeapFreeSize() / PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID));
             stringBuffer.append("kb");
             stringBuffer.append(", Allocated=");
-            stringBuffer.append(decimalFormat.format((((double) Debug.getNativeHeapAllocatedSize()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Debug.getNativeHeapAllocatedSize()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(", Size=");
-            stringBuffer.append(decimalFormat.format((((double) Debug.getNativeHeapSize()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Debug.getNativeHeapSize()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(System.getProperty("line.separator"));
             stringBuffer.append("Dalvik heap : Free=");
             stringBuffer.append(Long.toString(Runtime.getRuntime().freeMemory() / PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID));
             stringBuffer.append("kb");
             stringBuffer.append(", Total=");
-            stringBuffer.append(decimalFormat.format((((double) Runtime.getRuntime().totalMemory()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Runtime.getRuntime().totalMemory()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(", Now Size=");
-            stringBuffer.append(decimalFormat.format((((double) (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(", MAX Size=");
-            stringBuffer.append(decimalFormat.format((((double) Runtime.getRuntime().maxMemory()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Runtime.getRuntime().maxMemory()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             Log.i(str, new String(stringBuffer));
         }

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

@@ -80,9 +80,9 @@ public class BleWorkActivity extends ActivityIACommon {
         EpLog.m76i();
         super.onCreate(bundle);
         requestWindowFeature(5);
-        setContentView((int) R.layout.activity_scan);
-        setActionBar((int) R.string.BLE_select_unconfigured_printer_title, true);
-        findViewById(R.id.progress_bar).setVisibility(8);
+        setContentView( R.layout.activity_scan);
+        setActionBar( R.string.BLE_select_unconfigured_printer_title, true);
+        findViewById(R.id.progress_bar).setVisibility(View.GONE);
         mContext = this;
         callBackFuncs();
         getWindow().addFlags(128);
@@ -334,10 +334,10 @@ public class BleWorkActivity extends ActivityIACommon {
         View inflate = LayoutInflater.from(mContext).inflate(R.layout.ble_progress_layout, (ViewGroup) null);
         mAlertDialog.setView(inflate);
         mProgressPercent = (ProgressBar) inflate.findViewById(R.id.progress_percent);
-        mProgressPercent.setVisibility(0);
+        mProgressPercent.setVisibility(View.VISIBLE);
         mPercentView = (TextView) inflate.findViewById(R.id.percent);
-        mPercentView.setVisibility(0);
-        inflate.findViewById(R.id.space_upper).setVisibility(0);
+        mPercentView.setVisibility(View.VISIBLE);
+        inflate.findViewById(R.id.space_upper).setVisibility(View.VISIBLE);
         mProgressPercent.setProgress(0);
         mProgressPercent.setMax(100);
         mPercentView.setText("0%");
@@ -374,7 +374,7 @@ public class BleWorkActivity extends ActivityIACommon {
                     if (BleWorkActivity.this.count <= BleWorkActivity.TOTAL_PROGRESS_SEC) {
                         i3 = BleWorkActivity.this.count;
                     }
-                    i = (int) ((((double) (i3 - 90)) / 12.0d) + 90.0d);
+                    i =  ((( (i3 - 90)) / 12.0d) + 90.0d);
                 }
                 EpLog.m77i(BleWorkActivity.this.count + "::" + i + " %");
                 BleWorkActivity.this.updateProgress(i);

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

@@ -43,8 +43,8 @@ public class DeviceAdapter extends ArrayAdapter<ScannedDevice> {
             textView2.setText(PREFIX_RSSI + Integer.toString(scannedDevice.getRssi()));
             textView2.setTextColor(-3355444);
         } else {
-            view.findViewById(R.id.device_address).setVisibility(8);
-            view.findViewById(R.id.device_rssi).setVisibility(8);
+            view.findViewById(R.id.device_address).setVisibility(View.GONE);
+            view.findViewById(R.id.device_rssi).setVisibility(View.GONE);
             textView.setPadding(0, 20, 0, 20);
         }
         ((ImageView) view.findViewById(R.id.signal)).setImageDrawable(getThresholdIcon(scannedDevice.getRssi()));

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

@@ -8,7 +8,7 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.webkit.WebView;
 import android.widget.FrameLayout;
-import com.epson.guidelib.C0907R;
+import com.epson.guidelib.R;
 
 public class GuideWebviewFragment extends Fragment {
     private static final String ARG_PARAM1 = "html_file_path";
@@ -37,9 +37,9 @@ public class GuideWebviewFragment extends Fragment {
     }
 
     public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
-        View inflate = layoutInflater.inflate(C0907R.layout.fragment_guide_webview, viewGroup, false);
-        mWebView = (WebView) inflate.findViewById(C0907R.C0909id.guideWebview);
-        mWebViewFrame = (FrameLayout) inflate.findViewById(C0907R.C0909id.guideWebViewFrame);
+        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();
         ViewGroup.MarginLayoutParams marginLayoutParams2 = (ViewGroup.MarginLayoutParams) mWebViewFrame.getLayoutParams();
         mWebView.getSettings().setBuiltInZoomControls(false);
@@ -48,13 +48,13 @@ public class GuideWebviewFragment extends Fragment {
         mWebView.setInitialScale(1);
         mWebView.loadUrl(mHtmlPath);
         int webViewDP = Utils.getWebViewDP(getActivity(), getContext());
-        marginLayoutParams.height = (int) Utils.dptopx(webViewDP, getContext());
-        marginLayoutParams.width = (int) Utils.dptopx(webViewDP, getContext());
-        marginLayoutParams2.height = (int) Utils.dptopx(Utils.LAYOUT_MEARGIN + webViewDP, getContext());
-        marginLayoutParams2.width = (int) Utils.dptopx(webViewDP + Utils.LAYOUT_MEARGIN, getContext());
+        marginLayoutParams.height =  Utils.dptopx(webViewDP, getContext());
+        marginLayoutParams.width =  Utils.dptopx(webViewDP, getContext());
+        marginLayoutParams2.height =  Utils.dptopx(Utils.LAYOUT_MEARGIN + webViewDP, getContext());
+        marginLayoutParams2.width =  Utils.dptopx(webViewDP + Utils.LAYOUT_MEARGIN, getContext());
         mWebView.setLayoutParams(marginLayoutParams);
         mWebViewFrame.setLayoutParams(marginLayoutParams2);
-        inflate.findViewById(C0907R.C0909id.closeImage).setOnClickListener(new View.OnClickListener() {
+        inflate.findViewById(R.id.closeImage).setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {
                 if (GuideWebviewFragment.mClickListerner != null) {
                     GuideWebviewFragment.mClickListerner.onClickClose();

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

@@ -16,7 +16,7 @@ import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
-import com.epson.guidelib.C0907R;
+import com.epson.guidelib.R;
 import com.epson.mobilephone.common.guide.GuideWebviewFragment;
 import java.util.ArrayList;
 import java.util.Locale;
@@ -56,7 +56,7 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
     protected void onCreate(Bundle bundle) {
         String str;
         super.onCreate(bundle);
-        setContentView(C0907R.layout.activity_notice_guide);
+        setContentView(R.layout.activity_notice_guide);
         Intent intent = getIntent();
         if (intent != null) {
             htmlpath = intent.getStringArrayListExtra(KEY_HTML_PATH);
@@ -81,7 +81,7 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
         }
         final MyPageAdapter myPageAdapter = new MyPageAdapter();
         mAdapter = new MyFragmentStatePagerAdapter(getSupportFragmentManager(), htmlpath);
-        mViewPager = (MyViewPager) findViewById(C0907R.C0909id.guideViewPager);
+        mViewPager = (MyViewPager) findViewById(R.id.guideViewPager);
         mViewPager.setAdapter(mAdapter);
         mViewPager.setOffscreenPageLimit(2);
         mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@@ -95,20 +95,20 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
                 myPageAdapter.changePage(i);
             }
         });
-        mPageDisplayView = (LinearLayout) findViewById(C0907R.C0909id.pageDisplayViewGroup);
+        mPageDisplayView = (LinearLayout) findViewById(R.id.pageDisplayViewGroup);
         myPageAdapter.setPageSize(mPageDisplayView, mAdapter.getCount());
         myPageAdapter.changePage(mViewPager.getCurrentItem());
-        mGuideDialogView = (LinearLayout) findViewById(C0907R.C0909id.guide_dialog_layout);
-        mGrayLine_Hor = findViewById(C0907R.C0909id.guide_dialog_horizon_gray_line);
-        mDialogText = (TextView) findViewById(C0907R.C0909id.guide_dialog_message);
+        mGuideDialogView = (LinearLayout) findViewById(R.id.guide_dialog_layout);
+        mGrayLine_Hor = findViewById(R.id.guide_dialog_horizon_gray_line);
+        mDialogText = (TextView) findViewById(R.id.guide_dialog_message);
         int i = dialog_mode;
         if (i == DIALOG_MODE_ON || i == DIALOG_MODE_ONLY_BUTTON) {
-            mGuideDialogView.setVisibility(0);
+            mGuideDialogView.setVisibility(View.VISIBLE);
             ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) mGuideDialogView.getLayoutParams();
-            marginLayoutParams.width = (int) Utils.dptopx(Utils.getWebViewDP(this, getApplicationContext()) + Utils.LAYOUT_MEARGIN, getApplicationContext());
+            marginLayoutParams.width =  Utils.dptopx(Utils.getWebViewDP(this, getApplicationContext()) + Utils.LAYOUT_MEARGIN, getApplicationContext());
             mGuideDialogView.setLayoutParams(marginLayoutParams);
-            mOK = (Button) findViewById(C0907R.C0909id.ok_button);
-            mCancel = (Button) findViewById(C0907R.C0909id.cancel_btn);
+            mOK = (Button) findViewById(R.id.ok_button);
+            mCancel = (Button) findViewById(R.id.cancel_btn);
             String str2 = mDialogButtonYes;
             if (str2 != null) {
                 mOK.setText(str2);
@@ -133,10 +133,10 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
                 mDialogText.setText(str);
             }
             if (this.dialog_mode == DIALOG_MODE_ONLY_BUTTON) {
-                mGrayLine_Hor.setVisibility(8);
-                mDialogText.setVisibility(8);
-                mOK.setBackground(getResources().getDrawable(C0907R.C0908drawable.rectangle_left_button));
-                mCancel.setBackground(getResources().getDrawable(C0907R.C0908drawable.rectangle_right_button));
+                mGrayLine_Hor.setVisibility(View.GONE);
+                mDialogText.setVisibility(View.GONE);
+                mOK.setBackground(getResources().getDrawable(R.drawable.rectangle_left_button));
+                mCancel.setBackground(getResources().getDrawable(R.drawable.rectangle_right_button));
             }
         }
     }
@@ -156,13 +156,13 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
         switch (configuration.orientation) {
             case 1:
                 if (this.dialog_mode == DIALOG_MODE_ON) {
-                    mGuideDialogView.setVisibility(0);
+                    mGuideDialogView.setVisibility(View.VISIBLE);
                     break;
                 }
                 break;
             case 2:
                 if (this.dialog_mode == DIALOG_MODE_ON) {
-                    mGuideDialogView.setVisibility(8);
+                    mGuideDialogView.setVisibility(View.GONE);
                     break;
                 }
                 break;
@@ -202,7 +202,7 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
             int i2 = 0;
             while (i2 < i) {
                 ImageView imageView = new ImageView(NoticeGuideActivity.this.getApplicationContext());
-                imageView.setImageResource(C0907R.C0908drawable.cycle02);
+                imageView.setImageResource(R.drawable.cycle02);
                 int i3 = i2 + 1;
                 viewGroup.addView(imageView, i3);
                 mPagePosition[i2] = imageView;
@@ -217,9 +217,9 @@ public class NoticeGuideActivity extends AppCompatActivity implements GuideWebvi
                 if (i2 < imageViewArr.length) {
                     if (imageViewArr[i2] != null) {
                         if (i == i2) {
-                            imageViewArr[i2].setImageResource(C0907R.C0908drawable.cycle03);
+                            imageViewArr[i2].setImageResource(R.drawable.cycle03);
                         } else {
-                            imageViewArr[i2].setImageResource(C0907R.C0908drawable.cycle02);
+                            imageViewArr[i2].setImageResource(R.drawable.cycle02);
                         }
                     }
                     i2++;

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

@@ -18,11 +18,11 @@ public class Utils {
             return WEBVIEW_300DP_SIZE;
         }
         if (pxtodp2 < pxtodp) {
-            int i = (int) (((double) pxtodp2) * 0.7d);
+            int i =  (( pxtodp2) * 0.7d);
             int i2 = WEBVIEW_500DP_SIZE;
             return i < LAYOUT_MEARGIN + i2 ? i : i2;
         }
-        int i3 = (int) (((double) pxtodp) * 0.7d);
+        int i3 =  (( pxtodp) * 0.7d);
         int i4 = WEBVIEW_500DP_SIZE;
         return i3 < LAYOUT_MEARGIN + i4 ? i3 : i4;
     }

+ 2 - 2
app/src/main/java/com/epson/mobilephone/common/usb/UsbPrinter.java

@@ -87,7 +87,7 @@ public class UsbPrinter {
         EpLog.m78i(TAG, "bulkTransfer length=" + i);
         int bulkTransfer = usbPrinter.bulkTransfer(this.endPointIn, bArr, i, Constants.EDAM_BUSINESS_NOTEBOOKS_MAX);
         EpLog.m78i(TAG, "bulkTransfer readByte=" + bulkTransfer);
-        if (bulkTransfer < 0 && ((double) getElapsedTime()) >= 4500.0d) {
+        if (bulkTransfer < 0 && ( getElapsedTime()) >= 4500.0d) {
             bulkTransfer = 0;
             EpLog.m78i(TAG, "bulkTransfer timeout occurred");
         }
@@ -106,7 +106,7 @@ public class UsbPrinter {
         EpLog.m78i(TAG, "bulkTransfer length=" + i);
         int bulkTransfer = usbPrinter.bulkTransfer(this.endPointOut, bArr, i, Constants.EDAM_BUSINESS_NOTEBOOKS_MAX);
         EpLog.m78i(TAG, "bulkTransfer writtenByte=" + bulkTransfer);
-        if (bulkTransfer < 0 && ((double) getElapsedTime()) >= 4500.0d) {
+        if (bulkTransfer < 0 && ( getElapsedTime()) >= 4500.0d) {
             bulkTransfer = 0;
             EpLog.m78i(TAG, "bulkTransfer timeout occurred");
         }

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

@@ -18,7 +18,7 @@ public abstract class ActivityWiFiDirectBase extends ActivityIACommon {
     }
 
     private void setupCommonHeaderControl(boolean z, boolean z2) {
-        setActionBar((int) R.string.str_wifidirect_settings, z);
+        setActionBar( R.string.str_wifidirect_settings, z);
         bDisplayHomeAsUpEnabled = z;
         bSupportCancel = z2;
     }

+ 4 - 4
app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityWiFiDirectManual.java

@@ -112,8 +112,8 @@ public class ActivityWiFiDirectManual extends ActivityWiFiDirectBase {
 
     private void updateGuidance(boolean z) {
         if (z) {
-            mWithLcdGuidanceView.setVisibility(8);
-            mNoLcdGuidanceWebView.setVisibility(0);
+            mWithLcdGuidanceView.setVisibility(View.GONE);
+            mNoLcdGuidanceWebView.setVisibility(View.VISIBLE);
             String string = getString(R.string.path_wifidirect_guide_panelless);
             if (string == null) {
                 finish();
@@ -121,8 +121,8 @@ public class ActivityWiFiDirectManual extends ActivityWiFiDirectBase {
                 mNoLcdGuidanceWebView.loadUrl(string);
             }
         } else {
-            mNoLcdGuidanceWebView.setVisibility(8);
-            mWithLcdGuidanceView.setVisibility(0);
+            mNoLcdGuidanceWebView.setVisibility(View.GONE);
+            mWithLcdGuidanceView.setVisibility(View.VISIBLE);
         }
     }
 

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

@@ -12,7 +12,7 @@ public class ActivityWiFiDirectStart extends ActivityWiFiDirectBase {
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.wifidirect_start);
+        setContentView( R.layout.wifidirect_start);
         setupCommonHeaderControl(false, true);
         viewiPrintConnect = ((ViewGroup) findViewById(R.id.wifi_start_top)).findViewById(R.id.iprint_connect);
         viewiPrintConnect.setOnClickListener(new View.OnClickListener() {

+ 7 - 7
app/src/main/java/com/epson/mobilephone/common/wifidirect/ActivityiPrintConnect.java

@@ -115,7 +115,7 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
         switch (this.status) {
             case IDLE:
                 setDisplayMenu(false);
-                toolbar.setVisibility(8);
+                toolbar.setVisibility(View.GONE);
                 status = Status.CONNECTING_TEMPAP;
                 startConnectTempAp();
                 return;
@@ -208,8 +208,8 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
 
     private void onConnectSimpleAP() {
         EPLog.m86d(TAG, "onConnectSimpleAP()");
-        toolbar.setVisibility(0);
-        progress.setVisibility(8);
+        toolbar.setVisibility(View.VISIBLE);
+        progress.setVisibility(View.GONE);
         setDisplayMenu(true);
         textView1.setText(getResources().getString(R.string.str_connected_printer1));
         TextView textView = textView2;
@@ -221,8 +221,8 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
 
     private void onConnectOtherAP() {
         EPLog.m86d(TAG, "onConnectOtherAP()");
-        toolbar.setVisibility(8);
-        progress.setVisibility(8);
+        toolbar.setVisibility(View.GONE);
+        progress.setVisibility(View.GONE);
         setDisplayMenu(true);
         textView1.setText(getResources().getString(R.string.str_connected_otherAP1));
         textView2.setText(getResources().getString(R.string.str_connected_otherAP2));
@@ -231,8 +231,8 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
 
     private void onConnectError() {
         EPLog.m86d(TAG, "onConnectError()");
-        toolbar.setVisibility(8);
-        progress.setVisibility(8);
+        toolbar.setVisibility(View.GONE);
+        progress.setVisibility(View.GONE);
         setDisplayMenu(true);
         textView1.setText(getResources().getString(R.string.str_connect_error1));
         textView2.setText(getResources().getString(R.string.str_connect_error2));

+ 5 - 5
app/src/main/java/com/epson/mobilephone/common/wifidirect/DialogProgressWiFiDirect.java

@@ -120,17 +120,17 @@ public class DialogProgressWiFiDirect extends DialogFragment {
             progressBar.setLayoutParams(layoutParams);
             TextView textView = (TextView) inflate.findViewById(C1113R.C1115id.dialog_progress_text_bottom);
             textView.setText(string);
-            progressBar.setVisibility(0);
-            textView.setVisibility(0);
+            progressBar.setVisibility(View.VISIBLE);
+            textView.setVisibility(View.VISIBLE);
         } else if (i == 0) {
             TextView textView2 = (TextView) inflate.findViewById(C1113R.C1115id.dialog_progress_text_right);
             textView2.setText(string);
-            progressBar.setVisibility(0);
-            textView2.setVisibility(0);
+            progressBar.setVisibility(View.VISIBLE);
+            textView2.setVisibility(View.VISIBLE);
         } else {
             TextView textView3 = (TextView) inflate.findViewById(C1113R.C1115id.dialog_progress_text_right);
             textView3.setText(string);
-            textView3.setVisibility(0);
+            textView3.setVisibility(View.VISIBLE);
         }
         builder.setView(inflate);
         return builder.create();

+ 2 - 2
app/src/main/java/com/epson/mobilephone/common/wifidirect/NfcTagParser.java

@@ -41,7 +41,7 @@ public class NfcTagParser {
     }
 
     public String getMacAddress() {
-        return NfcMacAddrUtils.getMacAdressStr(ArrayUtils.subarray(this.tagData, 115, (int) Imgproc.COLOR_YUV2RGBA_YVYU));
+        return NfcMacAddrUtils.getMacAdressStr(ArrayUtils.subarray(this.tagData, 115,  Imgproc.COLOR_YUV2RGBA_YVYU));
     }
 
     public String getSSID() {
@@ -59,7 +59,7 @@ public class NfcTagParser {
     }
 
     public String getIPAddressV4() {
-        return formatIPAddressV4(ArrayUtils.subarray(this.tagData, (int) OFFSET_IPADDRESSV4, 150));
+        return formatIPAddressV4(ArrayUtils.subarray(this.tagData,  OFFSET_IPADDRESSV4, 150));
     }
 
     public String getIPAddressV4SimpleAP() {

+ 37 - 37
app/src/main/java/epson/colorcorrection/ImageCollect.java

@@ -403,9 +403,9 @@ public class ImageCollect {
             org.opencv.core.Mat r13 = new org.opencv.core.Mat
             r14 = 5
             r15 = 2
-            r13.<init>((int) r12, (int) r15, (int) r14)
+            r13.<init>( r12,  r15,  r14)
             org.opencv.core.Mat r9 = new org.opencv.core.Mat
-            r9.<init>((int) r12, (int) r15, (int) r14)
+            r9.<init>( r12,  r15,  r14)
             r2 = 8
             float[] r3 = new float[r2]
             float[] r7 = new float[r2]
@@ -514,7 +514,7 @@ public class ImageCollect {
             r3[r12] = r0
             r5 = r18
         L_0x00d7:
-            r5.put((int) r8, (int) r8, (float[]) r3)
+            r5.put( r8,  r8, (float[]) r3)
             if (r1 == 0) goto L_0x0127
             if (r11 == 0) goto L_0x011e
             double r2 = r11.width
@@ -567,9 +567,9 @@ public class ImageCollect {
             r12 = 0
             r14 = 0
             float r0 = r28.width()
-            double r5 = (double) r0
+            double r5 =  r0
             float r0 = r28.height()
-            double r7 = (double) r0
+            double r7 =  r0
             r21 = 4645040803167600640(0x4076800000000000, double:360.0)
             if (r11 == 0) goto L_0x018d
             double r0 = r11.width
@@ -663,16 +663,16 @@ public class ImageCollect {
             r0 = 7
             r13[r0] = r12
             r0 = r24
-            r0.put((int) r14, (int) r14, (float[]) r13)
+            r0.put( r14,  r14, (float[]) r13)
             r2 = r23
             org.opencv.core.Mat r11 = org.opencv.imgproc.Imgproc.getPerspectiveTransform(r2, r0)
             org.opencv.core.Mat r12 = new org.opencv.core.Mat
             float r3 = r1.height()
-            int r3 = (int) r3
+            int r3 =  r3
             float r1 = r1.width()
-            int r1 = (int) r1
+            int r1 =  r1
             int r4 = r26.type()
-            r12.<init>((int) r3, (int) r1, (int) r4)
+            r12.<init>( r3,  r1,  r4)
             org.opencv.core.Size r6 = r12.size()
             r7 = 1
             r8 = 0
@@ -808,7 +808,7 @@ public class ImageCollect {
             org.opencv.core.Mat r4 = new org.opencv.core.Mat
             int r6 = r13.rows()
             int r7 = r13.cols()
-            r4.<init>((int) r6, (int) r7, (int) r2)
+            r4.<init>( r6,  r7,  r2)
             r6 = 4643176031446892544(0x406fe00000000000, double:255.0)
             org.opencv.core.Scalar r6 = org.opencv.core.Scalar.all(r6)
             r4.setTo((org.opencv.core.Scalar) r6)
@@ -884,7 +884,7 @@ public class ImageCollect {
             r2 = 1094713344(0x41400000, float:12.0)
             epson.colorcorrection.SDIC_MAT_PTR r4 = new epson.colorcorrection.SDIC_MAT_PTR
             r4.<init>()
-            int r2 = (int) r2
+            int r2 =  r2
             epson.colorcorrection.SDIC_BCSC.MakeMask(r1, r4, r2)
             r1.release()
             org.opencv.core.Mat r4 = r4.getMat()
@@ -897,8 +897,8 @@ public class ImageCollect {
             if (r2 == r7) goto L_0x010e
         L_0x00f8:
             org.opencv.core.Size r6 = new org.opencv.core.Size
-            double r7 = (double) r1
-            double r1 = (double) r2
+            double r7 =  r1
+            double r1 =  r2
             r6.<init>(r7, r1)
             r19 = 0
             r21 = 0
@@ -914,11 +914,11 @@ public class ImageCollect {
             epson.colorcorrection.SDIC_MAT_PTR r2 = new epson.colorcorrection.SDIC_MAT_PTR
             r2.<init>()
             float r4 = r5.GetBcscBValue()
-            double r7 = (double) r4
+            double r7 =  r4
             float r4 = r5.GetBcscCValue()
-            double r9 = (double) r4
+            double r9 =  r4
             float r4 = r5.GetBcscSValue()
-            double r11 = (double) r4
+            double r11 =  r4
             r4 = r13
             r5 = r1
             r6 = r2
@@ -980,13 +980,13 @@ public class ImageCollect {
                     if (mat != null) {
                         float f8 = 12.0f / mDensity;
                         SDIC_MAT_PTR sdic_mat_ptr = new SDIC_MAT_PTR();
-                        SDIC_BCSC.MakeMask(mat, sdic_mat_ptr, (int) f8);
+                        SDIC_BCSC.MakeMask(mat, sdic_mat_ptr,  f8);
                         mat.release();
                         mMatPreview[9] = sdic_mat_ptr.getMat();
                     }
                     SDIC_MAT_PTR sdic_mat_ptr2 = new SDIC_MAT_PTR();
                     Mat[] matArr3 = mMatPreview;
-                    if (SDIC_BCSC.BCSCorrection(matArr3[5], matArr3[9], sdic_mat_ptr2, (double) f5, (double) f6, (double) f7) == 0) {
+                    if (SDIC_BCSC.BCSCorrection(matArr3[5], matArr3[9], sdic_mat_ptr2,  f5,  f6,  f7) == 0) {
                         Mat[] matArr4 = mMatPreview;
                         if (z) {
                             c = 6;
@@ -1000,7 +1000,7 @@ public class ImageCollect {
             }
             SDIC_MAT_PTR sdic_mat_ptr3 = new SDIC_MAT_PTR();
             Mat[] matArr5 = mMatPreview;
-            if (SDIC_BCSC.BCSCorrection(matArr5[5], matArr5[7], sdic_mat_ptr3, (double) f5, (double) f6, (double) f7) == 0) {
+            if (SDIC_BCSC.BCSCorrection(matArr5[5], matArr5[7], sdic_mat_ptr3,  f5,  f6,  f7) == 0) {
                 Mat[] matArr6 = mMatPreview;
                 if (z) {
                     c = 6;
@@ -1035,7 +1035,7 @@ public class ImageCollect {
     private Mat ResizeMatSmallPreviewSize(int i) {
         Mat mat = new Mat();
         Mat[] matArr = mMatPreview;
-        Imgproc.resize(matArr[i], mat, new Size((double) (((float) matArr[i].width()) / mSmallPreviewRate), (double) (((float) mMatPreview[i].height()) / mSmallPreviewRate)), 0.0d, 0.0d, 3);
+        Imgproc.resize(matArr[i], mat, new Size( (((float) matArr[i].width()) / mSmallPreviewRate),  (((float) mMatPreview[i].height()) / mSmallPreviewRate)), 0.0d, 0.0d, 3);
         return mat;
     }
 
@@ -1064,7 +1064,7 @@ public class ImageCollect {
         if (matArr[5].width() != mMatPreview[8].width() || mMatPreview[5].height() != mMatPreview[8].height()) {
             Mat mat = new Mat();
             Mat[] matArr2 = mMatPreview;
-            Imgproc.resize(matArr2[8], mat, new Size((double) matArr2[5].width(), (double) mMatPreview[5].height()), 0.0d, 0.0d, 2);
+            Imgproc.resize(matArr2[8], mat, new Size( matArr2[5].width(),  mMatPreview[5].height()), 0.0d, 0.0d, 2);
             mMatPreview[8].release();
             mMatPreview[8] = mat;
         }
@@ -1078,7 +1078,7 @@ public class ImageCollect {
         if (i == 6 && !(matArr[6].width() == mMatPreview[1].width() && mMatPreview[6].height() == mMatPreview[1].height())) {
             Mat mat = new Mat();
             Mat[] matArr2 = mMatPreview;
-            Imgproc.resize(matArr2[6], mat, new Size((double) matArr2[1].width(), (double) mMatPreview[1].height()), 0.0d, 0.0d, 2);
+            Imgproc.resize(matArr2[6], mat, new Size( matArr2[1].width(),  mMatPreview[1].height()), 0.0d, 0.0d, 2);
             mMatPreview[6].release();
             mMatPreview[6] = mat;
         }
@@ -1144,16 +1144,16 @@ public class ImageCollect {
                                 int i5 = 0;
                                 i2 = 0;
                                 while (i5 < 4) {
-                                    double d = (double) i3;
+                                    double d =  i3;
                                     if (d >= array[i5].f433y) {
                                         d = array[i5].f433y;
                                     }
-                                    i3 = (int) d;
-                                    double d2 = (double) i2;
+                                    i3 =  d;
+                                    double d2 =  i2;
                                     if (d2 <= array[i5].f433y) {
                                         d2 = array[i5].f433y;
                                     }
-                                    i2 = (int) d2;
+                                    i2 =  d2;
                                     i5++;
                                 }
                                 z = false;
@@ -1168,20 +1168,20 @@ public class ImageCollect {
                                     if (i7 >= 4) {
                                         z = false;
                                         break;
-                                    } else if (pointArr[i7].f432x <= 0.0d || pointArr[i7].f433y <= 0.0d || pointArr[i7].f432x >= ((double) ResizeMat.cols()) || pointArr[i7].f433y >= ((double) ResizeMat.rows())) {
+                                    } else if (pointArr[i7].f432x <= 0.0d || pointArr[i7].f433y <= 0.0d || pointArr[i7].f432x >= ( ResizeMat.cols()) || pointArr[i7].f433y >= ( ResizeMat.rows())) {
                                         z = true;
                                     } else {
                                         list.set(i7, pointArr[i7]);
-                                        double d3 = (double) i3;
+                                        double d3 =  i3;
                                         if (d3 >= list.get(i7).f433y) {
                                             d3 = list.get(i7).f433y;
                                         }
-                                        i6 = (int) d3;
-                                        double d4 = (double) i2;
+                                        i6 =  d3;
+                                        double d4 =  i2;
                                         if (d4 <= list.get(i7).f433y) {
                                             d4 = list.get(i7).f433y;
                                         }
-                                        i8 = (int) d4;
+                                        i8 =  d4;
                                         i7++;
                                     }
                                 }
@@ -1268,7 +1268,7 @@ public class ImageCollect {
 
     private MatOfPoint2f DetectEdge(Mat mat, int i) {
         Mat mat2 = new Mat(mat.rows(), mat.cols(), mat.type());
-        Imgproc.Canny(mat, mat2, 1.0d, (double) i);
+        Imgproc.Canny(mat, mat2, 1.0d,  i);
         Mat mat3 = new Mat(3, 3, 0, Scalar.all(255.0d));
         Imgproc.morphologyEx(mat2, mat2, 4, mat3, new org.opencv.core.Point(-1.0d, -1.0d), 1);
         Mat mat4 = new Mat();
@@ -1301,7 +1301,7 @@ public class ImageCollect {
         MatOfPoint2f matOfPoint2f = new MatOfPoint2f(list.get(i2).toArray());
         MatOfPoint2f matOfPoint2f2 = new MatOfPoint2f();
         for (int i4 = 400; i4 >= 50; i4 -= 50) {
-            Imgproc.approxPolyDP(matOfPoint2f, matOfPoint2f2, (double) i4, true);
+            Imgproc.approxPolyDP(matOfPoint2f, matOfPoint2f2,  i4, true);
             if (matOfPoint2f2.rows() >= 4) {
                 break;
             }
@@ -1383,9 +1383,9 @@ public class ImageCollect {
                         e.printStackTrace();
                     }
                 }
-                double d = (double) f;
+                double d =  f;
                 if (d == 90.0d) {
-                    Size size = new Size((double) mMatPrint[0].rows(), (double) mMatPrint[0].cols());
+                    Size size = new Size( mMatPrint[0].rows(),  mMatPrint[0].cols());
                     Mat mat6 = new Mat(size, CvType.CV_8UC3);
                     Core.transpose(mMatPrint[0], mat6);
                     mMatPrint[0].release();
@@ -1398,7 +1398,7 @@ public class ImageCollect {
                     Mat[] matArr2 = mMatPrint;
                     Core.flip(matArr2[0], matArr2[0], -1);
                 } else if (d == 270.0d) {
-                    Size size2 = new Size((double) mMatPrint[0].rows(), (double) mMatPrint[0].cols());
+                    Size size2 = new Size( mMatPrint[0].rows(),  mMatPrint[0].cols());
                     Mat mat7 = new Mat(size2, CvType.CV_8UC3);
                     Core.transpose(mMatPrint[0], mat7);
                     mMatPrint[0].release();
@@ -1414,7 +1414,7 @@ public class ImageCollect {
     }
 
     private Mat ResizeMat(Mat mat, double d, double d2) {
-        Size CalcResizeSize = CalcResizeSize((double) mat.cols(), (double) mat.rows(), d, d2, true);
+        Size CalcResizeSize = CalcResizeSize( mat.cols(),  mat.rows(), d, d2, true);
         Mat mat2 = new Mat();
         Imgproc.resize(mat, mat2, CalcResizeSize, 0.0d, 0.0d, 3);
         return mat2;

+ 32 - 32
app/src/main/java/epson/colorcorrection/SDIC_BCSC.java

@@ -44,12 +44,12 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
         if (f3 > 2.0f) {
             f2 = f3;
         }
-        int i2 = (int) ((f2 * 1048576.0f) / ((float) (cols * channels)));
+        int i2 =  ((f2 * 1048576.0f) / ((float) (cols * channels)));
         if (i2 >= mat.rows()) {
             i2 = mat.rows();
         }
         Rect rect = new Rect(0, 0, cols, i2);
-        int ceil = (int) Math.ceil(((double) rows) / ((double) i2));
+        int ceil =  Math.ceil(( rows) / ( i2));
         LogMemory(String.format("BCSC S - [%d] w:%d h:%d c:%d m:%.2fMB use:%.2fMB", new Object[]{Integer.valueOf(ceil), Integer.valueOf(cols), Integer.valueOf(rows), Integer.valueOf(channels), Float.valueOf(((float) ((cols * rows) * channels)) / 1048576.0f), Float.valueOf(f2)}));
         int i3 = 0;
         int i4 = 0;
@@ -324,12 +324,12 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
             r12.release()     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
             org.opencv.core.Size r12 = r19.size()     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
             double r12 = r12.width     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
-            int r12 = (int) r12     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
+            int r12 =  r12     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
             int r12 = r12 + r0
             int r12 = r12 - r6
             org.opencv.core.Size r10 = r19.size()     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
             double r13 = r10.height     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
-            int r10 = (int) r13     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
+            int r10 =  r13     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
             int r10 = r10 + r0
             int r10 = r10 - r6
             int r6 = r11.size()     // Catch:{ SDIC_Exception -> 0x01b9, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x019c }
@@ -350,26 +350,26 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
             r16 = r15
             double r14 = r4.f432x     // Catch:{ SDIC_Exception -> 0x0139, CvException -> 0x01ae, Exception -> 0x01a0, all -> 0x0132 }
             r17 = r2
-            double r1 = (double) r0
+            double r1 =  r0
             int r18 = (r14 > r1 ? 1 : (r14 == r1 ? 0 : -1))
             if (r18 == 0) goto L_0x0112
             double r14 = r4.f433y     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             int r18 = (r14 > r1 ? 1 : (r14 == r1 ? 0 : -1))
             if (r18 == 0) goto L_0x0112
             double r1 = r4.f432x     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
-            double r14 = (double) r12     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
+            double r14 =  r12     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             int r18 = (r1 > r14 ? 1 : (r1 == r14 ? 0 : -1))
             if (r18 == 0) goto L_0x0112
             double r1 = r4.f433y     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
-            double r14 = (double) r10     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
+            double r14 =  r10     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             int r18 = (r1 > r14 ? 1 : (r1 == r14 ? 0 : -1))
             if (r18 == 0) goto L_0x0112
             org.opencv.core.Rect r1 = new org.opencv.core.Rect     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             double r14 = r4.f432x     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
-            int r2 = (int) r14     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
+            int r2 =  r14     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             int r2 = r2 - r0
             double r14 = r4.f433y     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
-            int r4 = (int) r14     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
+            int r4 =  r14     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             int r4 = r4 - r0
             r1.<init>(r2, r4, r7, r7)     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
             org.opencv.core.Mat r1 = r5.submat(r1)     // Catch:{ SDIC_Exception -> 0x010e, CvException -> 0x01b0, Exception -> 0x01a2, all -> 0x010a }
@@ -570,13 +570,13 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
         byte[] GetPixcelData2 = GetPixcelData(mat);
         byte[] GetPixcelData3 = GetPixcelData(mat);
         int channels = mat.channels();
-        int i = ((int) mat.total()) * channels;
+        int i = ( mat.total()) * channels;
         int i2 = 0;
         int i3 = 0;
         while (i2 < i) {
             byte b = GetPixcelData[i3] & UnsignedBytes.MAX_VALUE;
             if (b > 0) {
-                int i4 = (int) (((double) b) * d);
+                int i4 =  (( b) * d);
                 for (int i5 = 0; i5 < 3; i5++) {
                     int i6 = i2 + i5;
                     int i7 = (GetPixcelData2[i6] & UnsignedBytes.MAX_VALUE) + i4;
@@ -637,7 +637,7 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
             if (i2 >= i) {
                 break;
             }
-            dArr[i2] = 1.0d / (Math.exp((((double) (b3 - i2)) * d3) / 255.0d) + 1.0d);
+            dArr[i2] = 1.0d / (Math.exp((( (b3 - i2)) * d3) / 255.0d) + 1.0d);
             i2++;
             b3 = b3;
             i = 256;
@@ -645,29 +645,29 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
         double d4 = dArr[0];
         double d5 = dArr[255] - d4;
         for (int i3 = 0; i3 < 256; i3++) {
-            iArr[i3] = ((int) ((((dArr[i3] - d4) / d5) * 255.0d) + 0.5d)) & 255;
+            iArr[i3] = ( ((((dArr[i3] - d4) / d5) * 255.0d) + 0.5d)) & 255;
         }
         byte[] GetPixcelData = GetPixcelData(mat2);
         byte[] GetPixcelData2 = GetPixcelData(mat);
         byte[] GetPixcelData3 = GetPixcelData(mat);
         int channels = mat.channels();
-        int i4 = ((int) mat.total()) * channels;
+        int i4 = ( mat.total()) * channels;
         int i5 = 0;
         int i6 = 0;
         while (i5 < i4) {
             byte b4 = GetPixcelData[i6] & b2;
             if (b4 > 0) {
-                double d6 = ((double) b4) / d2;
+                double d6 = ( b4) / d2;
                 int i7 = 0;
                 while (i7 < 3) {
                     int i8 = i5 + i7;
                     byte b5 = GetPixcelData2[i8] & b2;
                     int i9 = iArr[b5] - b5;
                     int[] iArr2 = iArr;
-                    double d7 = (double) b5;
+                    double d7 =  b5;
                     byte[] bArr = GetPixcelData;
                     byte[] bArr2 = GetPixcelData2;
-                    int i10 = (int) (d7 + (((double) i9) * d6));
+                    int i10 =  (d7 + (( i9) * d6));
                     int i11 = i10 > 255 ? 255 : i10;
                     if (i11 < 0) {
                         i11 = 0;
@@ -750,7 +750,7 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
             long r10 = r21.total()     // Catch:{ SDIC_Exception -> 0x002b, CvException -> 0x0028, Exception -> 0x0025 }
             r12 = 3
             long r10 = r10 * r12
-            int r4 = (int) r10     // Catch:{ SDIC_Exception -> 0x002b, CvException -> 0x0028, Exception -> 0x0025 }
+            int r4 =  r10     // Catch:{ SDIC_Exception -> 0x002b, CvException -> 0x0028, Exception -> 0x0025 }
             r10 = 4643176031446892544(0x406fe00000000000, double:255.0)
             double r12 = r24 / r10
             byte[] r7 = GetPixcelData(r22)     // Catch:{ SDIC_Exception -> 0x002b, CvException -> 0x0028, Exception -> 0x0025 }
@@ -771,18 +771,18 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
             int r18 = r9 + 1
             byte r8 = r14[r18]     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
             r8 = r8 & r2
-            double r10 = (double) r6     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
+            double r10 =  r6     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
             double r10 = r10 * r12
-            double r0 = (double) r5     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
+            double r0 =  r5     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
             int r5 = 255 - r5
             int r6 = 255 - r8
             int r5 = r5 * r6
-            double r5 = (double) r5     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
+            double r5 =  r5     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
             double r5 = r5 * r10
             r10 = 4643176031446892544(0x406fe00000000000, double:255.0)
             double r5 = r5 / r10
             double r0 = r0 + r5
-            int r0 = (int) r0     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
+            int r0 =  r0     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
             if (r0 <= r2) goto L_0x00ab
             r6 = 255(0xff, float:3.57E-43)
             goto L_0x00ac
@@ -818,13 +818,13 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
             int r6 = r9 + 1
             byte r8 = r14[r6]     // Catch:{ SDIC_Exception -> 0x0114, CvException -> 0x0112, Exception -> 0x0110 }
             r8 = r8 & r2
-            double r10 = (double) r1
+            double r10 =  r1
             double r10 = r10 * r12
             r1 = r3
-            double r2 = (double) r5
+            double r2 =  r5
             double r19 = r2 * r10
             double r2 = r2 + r19
-            int r2 = (int) r2
+            int r2 =  r2
             r3 = 255(0xff, float:3.57E-43)
             if (r2 <= r3) goto L_0x00e0
             r2 = 255(0xff, float:3.57E-43)
@@ -834,15 +834,15 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
         L_0x00e3:
             byte r2 = (byte) r2
             r14[r9] = r2     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
-            double r2 = (double) r8     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
+            double r2 =  r8     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
             int r5 = r5 * r8
             r8 = r4
-            double r4 = (double) r5     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
+            double r4 =  r5     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
             r19 = 4647679631074263040(0x407fe00000000000, double:510.0)
             double r4 = r4 / r19
             double r4 = r4 * r10
             double r2 = r2 + r4
-            int r2 = (int) r2     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
+            int r2 =  r2     // Catch:{ SDIC_Exception -> 0x0153, CvException -> 0x0151, Exception -> 0x014f }
             r3 = 255(0xff, float:3.57E-43)
             if (r2 <= r3) goto L_0x00fc
             r2 = 255(0xff, float:3.57E-43)
@@ -980,16 +980,16 @@ public class SDIC_BCSC extends SDIC_Exception implements SDIC_CommonDefine {
 
     private static byte[] MakeBlurFilter(int i, int i2) {
         byte[] bArr = new byte[(i2 * i2)];
-        double d = (double) i;
+        double d =  i;
         Point point = new Point(d, d);
         for (int i3 = 0; i3 < i2; i3++) {
             for (int i4 = 0; i4 < i2; i4++) {
-                double LengthBw2Point = LengthBw2Point(new Point((double) i4, (double) i3), point);
-                double d2 = (double) i2;
+                double LengthBw2Point = LengthBw2Point(new Point( i4,  i3), point);
+                double d2 =  i2;
                 if (LengthBw2Point > d2) {
                     LengthBw2Point = d2;
                 }
-                bArr[(i3 * i2) + i4] = (byte) (((int) (((LengthBw2Point / d2) * 255.0d) + 0.5d)) & 255);
+                bArr[(i3 * i2) + i4] = (byte) (( (((LengthBw2Point / d2) * 255.0d) + 0.5d)) & 255);
             }
         }
         return bArr;

+ 1 - 1
app/src/main/java/epson/colorcorrection/SDIC_MAT_PTR.java

@@ -35,7 +35,7 @@ public class SDIC_MAT_PTR {
             Core.flip(mat2, mat2, 1);
             return;
         }
-        double d = (double) f;
+        double d =  f;
         if (d == 180.0d) {
             Core.flip(mat, mat, -1);
         } else if (d == 270.0d) {

+ 11 - 11
app/src/main/java/epson/colorcorrection/SDIC_PWC.java

@@ -36,12 +36,12 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
         if (f3 > 2.0f) {
             f2 = f3;
         }
-        int i = (int) ((f2 * 1048576.0f) / ((float) (cols * channels)));
+        int i =  ((f2 * 1048576.0f) / ((float) (cols * channels)));
         if (i >= mat.rows()) {
             i = mat.rows();
         }
         Rect rect = new Rect(0, 0, cols, i);
-        int ceil = (int) Math.ceil(((double) rows) / ((double) i));
+        int ceil =  Math.ceil(( rows) / ( i));
         LogMemory(String.format("PWC S - [%d] w:%d h:%d c:%d m:%.2fMB use:%.2fMB", new Object[]{Integer.valueOf(ceil), Integer.valueOf(cols), Integer.valueOf(rows), Integer.valueOf(channels), Float.valueOf(((float) ((cols * rows) * channels)) / 1048576.0f), Float.valueOf(f2)}));
         int i2 = 0;
         int i3 = 0;
@@ -131,7 +131,7 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
     private static int Sharpness(Mat mat, SDIC_MAT_PTR sdic_mat_ptr, float f) {
         Mat mat2 = sdic_mat_ptr.getMat();
         Mat mat3 = new Mat(3, 3, 5);
-        mat3.setTo(Scalar.all((double) ((-1.0f * f) / 9.0f)));
+        mat3.setTo(Scalar.all( ((-1.0f * f) / 9.0f)));
         float f2 = ((f * 8.0f) / 9.0f) + 1.0f;
         int channels = mat3.channels();
         float[] fArr = new float[channels];
@@ -151,21 +151,21 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
 
     private static int Multiply(Mat mat, Mat mat2, Mat mat3) {
         int channels = mat.channels();
-        int i = (int) (mat.total() * ((long) channels));
+        int i =  (mat.total() * ((long) channels));
         byte[] GetPixcelData = SDIC_BCSC.GetPixcelData(mat);
         byte[] GetPixcelData2 = SDIC_BCSC.GetPixcelData(mat2);
         byte[] GetPixcelData3 = SDIC_BCSC.GetPixcelData(mat);
         for (int i2 = 0; i2 < i; i2 += channels) {
             for (int i3 = 0; i3 < 3; i3++) {
                 int i4 = i2 + i3;
-                double d = ((double) ((GetPixcelData[i4] & UnsignedBytes.MAX_VALUE) * (GetPixcelData2[i4] & UnsignedBytes.MAX_VALUE))) * 0.00392156862745098d;
+                double d = ( ((GetPixcelData[i4] & UnsignedBytes.MAX_VALUE) * (GetPixcelData2[i4] & UnsignedBytes.MAX_VALUE))) * 0.00392156862745098d;
                 if (d > 255.0d) {
                     d = 255.0d;
                 }
                 if (d < 0.0d) {
                     d = 0.0d;
                 }
-                GetPixcelData3[i4] = (byte) ((int) d);
+                GetPixcelData3[i4] = (byte) ( d);
             }
         }
         mat3.put(0, 0, GetPixcelData3);
@@ -174,7 +174,7 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
 
     private static int ColorDodge(Mat mat, Mat mat2, SDIC_MAT_PTR sdic_mat_ptr) {
         int channels = mat.channels();
-        int i = (int) (mat.total() * ((long) channels));
+        int i =  (mat.total() * ((long) channels));
         byte[] GetPixcelData = SDIC_BCSC.GetPixcelData(mat);
         byte[] GetPixcelData2 = SDIC_BCSC.GetPixcelData(mat2);
         byte[] MakePixcelData = SDIC_BCSC.MakePixcelData(mat);
@@ -185,7 +185,7 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
                 if (b <= 0) {
                     b = 1;
                 }
-                int i5 = (int) (((double) ((GetPixcelData[i4] & UnsignedBytes.MAX_VALUE) * UnsignedBytes.MAX_VALUE)) / ((double) b));
+                int i5 =  (( ((GetPixcelData[i4] & UnsignedBytes.MAX_VALUE) * UnsignedBytes.MAX_VALUE)) / ( b));
                 if (i5 > 255) {
                     i5 = 255;
                 }
@@ -295,13 +295,13 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
             org.opencv.core.Size r0 = r2.size()     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             double r4 = r0.height     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             double r4 = r4 * r17
-            int r0 = (int) r4     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
+            int r0 =  r4     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             goto L_0x0068
         L_0x005f:
             org.opencv.core.Size r0 = r2.size()     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             double r4 = r0.width     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             double r4 = r4 * r17
-            int r0 = (int) r4     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
+            int r0 =  r4     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
         L_0x0068:
             int r4 = r0 % 2
             if (r4 != 0) goto L_0x006e
@@ -310,7 +310,7 @@ public class SDIC_PWC extends SDIC_Exception implements SDIC_CommonDefine {
             org.opencv.core.Mat r4 = new org.opencv.core.Mat     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             r4.<init>()     // Catch:{ SDIC_Exception -> 0x00c3, CvException -> 0x00c0, Exception -> 0x00bd, all -> 0x00bb }
             org.opencv.core.Size r10 = new org.opencv.core.Size     // Catch:{ SDIC_Exception -> 0x00a8, CvException -> 0x00a4, Exception -> 0x00a0, all -> 0x009d }
-            double r0 = (double) r0     // Catch:{ SDIC_Exception -> 0x00a8, CvException -> 0x00a4, Exception -> 0x00a0, all -> 0x009d }
+            double r0 =  r0     // Catch:{ SDIC_Exception -> 0x00a8, CvException -> 0x00a4, Exception -> 0x00a0, all -> 0x009d }
             r10.<init>(r0, r0)     // Catch:{ SDIC_Exception -> 0x00a8, CvException -> 0x00a4, Exception -> 0x00a0, all -> 0x009d }
             r11 = 0
             r13 = 0

+ 5 - 5
app/src/main/java/epson/common/DialogProgress.java

@@ -112,17 +112,17 @@ public class DialogProgress extends DialogFragment {
             progressBar.setLayoutParams(layoutParams);
             TextView textView = (TextView) inflate.findViewById(R.id.dialog_progress_text_bottom);
             textView.setText(string);
-            progressBar.setVisibility(0);
-            textView.setVisibility(0);
+            progressBar.setVisibility(View.VISIBLE);
+            textView.setVisibility(View.VISIBLE);
         } else if (i == 0) {
             TextView textView2 = (TextView) inflate.findViewById(R.id.dialog_progress_text_right);
             textView2.setText(string);
-            progressBar.setVisibility(0);
-            textView2.setVisibility(0);
+            progressBar.setVisibility(View.VISIBLE);
+            textView2.setVisibility(View.VISIBLE);
         } else {
             TextView textView3 = (TextView) inflate.findViewById(R.id.dialog_progress_text_right);
             textView3.setText(string);
-            textView3.setVisibility(0);
+            textView3.setVisibility(View.VISIBLE);
         }
         builder.setView(inflate);
         return builder.create();

+ 5 - 5
app/src/main/java/epson/common/EpLog.java

@@ -216,23 +216,23 @@ public final class EpLog {
             stringBuffer.append(Long.toString(Debug.getNativeHeapFreeSize() / PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID));
             stringBuffer.append("kb");
             stringBuffer.append(", Allocated=");
-            stringBuffer.append(decimalFormat.format((((double) Debug.getNativeHeapAllocatedSize()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Debug.getNativeHeapAllocatedSize()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(", Size=");
-            stringBuffer.append(decimalFormat.format((((double) Debug.getNativeHeapSize()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Debug.getNativeHeapSize()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(System.getProperty("line.separator"));
             stringBuffer.append("Dalvik heap : Free=");
             stringBuffer.append(Long.toString(Runtime.getRuntime().freeMemory() / PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID));
             stringBuffer.append("kb");
             stringBuffer.append(", Total=");
-            stringBuffer.append(decimalFormat.format((((double) Runtime.getRuntime().totalMemory()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Runtime.getRuntime().totalMemory()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(", Now Size=");
-            stringBuffer.append(decimalFormat.format((((double) (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             stringBuffer.append(", MAX Size=");
-            stringBuffer.append(decimalFormat.format((((double) Runtime.getRuntime().maxMemory()) / 1024.0d) / 1024.0d));
+            stringBuffer.append(decimalFormat.format((( Runtime.getRuntime().maxMemory()) / 1024.0d) / 1024.0d));
             stringBuffer.append("MB");
             Log.i(str, new String(stringBuffer));
         }

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

@@ -168,7 +168,7 @@ public class ScalableImageView extends View {
             canvasRect.right = canvas.getWidth();
             canvasRect.bottom = canvas.getHeight();
             float min = Math.min(((float) canvasRect.width()) / ((float) f332bm.getWidth()), ((float) canvasRect.height()) / ((float) f332bm.getHeight()));
-            Rect rect = new Rect((int) ((((float) canvasRect.width()) / 2.0f) - ((((float) f332bm.getWidth()) * min) / 2.0f)), (int) ((((float) canvasRect.height()) / 2.0f) - ((((float) f332bm.getHeight()) * min) / 2.0f)), (int) ((((float) canvasRect.width()) / 2.0f) + ((((float) f332bm.getWidth()) * min) / 2.0f)), (int) ((((float) canvasRect.height()) / 2.0f) + ((((float) f332bm.getHeight()) * min) / 2.0f)));
+            Rect rect = new Rect( ((((float) canvasRect.width()) / 2.0f) - ((((float) f332bm.getWidth()) * min) / 2.0f)),  ((((float) canvasRect.height()) / 2.0f) - ((((float) f332bm.getHeight()) * min) / 2.0f)),  ((((float) canvasRect.width()) / 2.0f) + ((((float) f332bm.getWidth()) * min) / 2.0f)),  ((((float) canvasRect.height()) / 2.0f) + ((((float) f332bm.getHeight()) * min) / 2.0f)));
             canvas.save();
             canvas.translate(mOffsetX, mOffsetY);
             float f = mScaleFactor;

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

@@ -491,7 +491,7 @@ public class Utils {
 
     public static void setDrawble2TextView(Context context, TextView textView, int i) {
         Drawable drawable = context.getResources().getDrawable(i);
-        int textSize = (int) (textView.getTextSize() * 1.5f);
+        int textSize =  (textView.getTextSize() * 1.5f);
         drawable.setBounds(0, 0, textSize, textSize);
         textView.setCompoundDrawables(drawable, (Drawable) null, (Drawable) null, (Drawable) null);
     }

+ 0 - 330
app/src/main/java/epson/common/ble/BleAsyncTask.java

@@ -1,330 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.os.AsyncTask;
-import android.os.Handler;
-import android.os.HandlerThread;
-import com.epson.mobilephone.common.EpLog;
-import com.epson.mobilephone.common.ble.util.BLEUtility;
-import com.epson.mobilephone.common.ble.util.ScannedDevice;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-public class BleAsyncTask extends AsyncTask<Void, Void, Boolean> {
-    private static AlertDialog dialog = null;
-    private static HandlerThread handlerThread = null;
-    private static boolean mStop = false;
-    private static BleAsyncTask mTask;
-    private static Runnable mTimeOutTask;
-    private BleScanWork mBleWork = null;
-    private BLEUtility.BleWorkCallback mCallBack = null;
-    private List<ScannedDevice> mDevicelist = null;
-    private Boolean mFind = false;
-    private long mTimeOut = -1;
-    private long mTimeOutScan = -1;
-    private Activity m_Activity;
-
-    public static void setStop(boolean z) {
-        EpLog.m69d("mStop   " + z);
-        mStop = z;
-        if (z) {
-            EpLog.m69d("★ stopScan");
-            BleScanWork.getInstace().stopScan();
-            if (mTimeOutTask != null) {
-                mTimeOutTask = null;
-                BleAsyncTask bleAsyncTask = mTask;
-                if (bleAsyncTask != null) {
-                    bleAsyncTask.cancel(true);
-                }
-            }
-        }
-    }
-
-    public BleAsyncTask(Activity activity) {
-        mTimeOutTask = new Runnable() {
-            public void run() {
-                try {
-                    BleAsyncTask.this.get(BleAsyncTask.mTimeOut, TimeUnit.MILLISECONDS);
-                } catch (InterruptedException unused) {
-                    EpLog.m71e("InterruptedException");
-                } catch (ExecutionException unused2) {
-                    EpLog.m71e("ExecutionException");
-                } catch (TimeoutException unused3) {
-                    EpLog.m77i("Running task has timed out!!");
-                    if (BleAsyncTask.mBleWork != null) {
-                        BleAsyncTask.mBleWork.stopScan();
-                    }
-                    BleAsyncTask.mTask.cancel(true);
-                } catch (CancellationException unused4) {
-                    EpLog.m71e("CancellationException");
-                }
-            }
-        };
-        m_Activity = activity;
-        mTimeOut = (long) (BleWork.getScanAdvertisingPacketTimeout() + 2000);
-        mTimeOutScan = -1;
-    }
-
-    public BleAsyncTask(Activity activity, BLEUtility.BleWorkCallback bleWorkCallback, int i) {
-        mTimeOutTask = new Runnable() {
-            public void run() {
-                try {
-                    BleAsyncTask.this.get(BleAsyncTask.mTimeOut, TimeUnit.MILLISECONDS);
-                } catch (InterruptedException unused) {
-                    EpLog.m71e("InterruptedException");
-                } catch (ExecutionException unused2) {
-                    EpLog.m71e("ExecutionException");
-                } catch (TimeoutException unused3) {
-                    EpLog.m77i("Running task has timed out!!");
-                    if (BleAsyncTask.mBleWork != null) {
-                        BleAsyncTask.mBleWork.stopScan();
-                    }
-                    BleAsyncTask.mTask.cancel(true);
-                } catch (CancellationException unused4) {
-                    EpLog.m71e("CancellationException");
-                }
-            }
-        };
-        m_Activity = activity;
-        mTimeOut = (long) (i + 2000);
-        mTimeOutScan = (long) i;
-        mCallBack = bleWorkCallback;
-    }
-
-    protected void onPreExecute() {
-        super.onPreExecute();
-        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.m77i(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.m77i(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.m77i(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.m69d(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.m71e((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.m69d(r5)
-            java.lang.String r5 = "★ stopScan"
-            com.epson.mobilephone.common.EpLog.m69d(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.m69d(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");
-    }
-
-    protected void onPostExecute(Boolean bool) {
-        super.onPostExecute(bool);
-        EpLog.m69d("" + bool);
-    }
-
-    private void showAdvanceToSettingDialog() {
-        if (mCallBack != null) {
-            mDevicelist = mBleWork.getScannedDeviceList();
-            ArrayList arrayList = new ArrayList();
-            for (ScannedDevice next : mDevicelist) {
-                arrayList.add(new ScannedDevice(next.getDevice(), next.getRssi(), next.getDisplayName(), next.getHardwareType()));
-            }
-            EpLog.m69d(" ★ mDevicelist " + arrayList.size());
-            mCallBack.call(arrayList);
-            return;
-        }
-        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.m69d("★ stopScan");
-                BleAsyncTask.mBleWork.stopScan();
-                BleAsyncTask bleAsyncTask = BleAsyncTask.this;
-                List unused = bleAsyncTask.mDevicelist = bleAsyncTask.mBleWork.getScannedDeviceList();
-                ArrayList arrayList = new ArrayList();
-                for (ScannedDevice scannedDevice : BleAsyncTask.mDevicelist) {
-                    arrayList.add(new ScannedDevice(scannedDevice.getDevice(), scannedDevice.getRssi(), scannedDevice.getDisplayName(), scannedDevice.getHardwareType()));
-                }
-                Intent intent = new Intent(BleAsyncTask.m_Activity.getApplicationContext(), BleWorkActivity.class);
-                intent.putParcelableArrayListExtra(ScannedDevice.TYPE, arrayList);
-                BleAsyncTask.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.m69d("★ stopScan");
-                BleAsyncTask.mBleWork.stopScan();
-                BleAsyncTask.setStop(true);
-            }
-        }).create();
-        dialog.show();
-    }
-
-    protected void onCancelled(Boolean bool) {
-        super.onCancelled(bool);
-        EpLog.m69d("死にました。  " + bool);
-    }
-
-    protected void onCancelled() {
-        super.onCancelled();
-    }
-
-    public BleAsyncTask setTimeOut(long j) {
-        mTimeOut = j;
-        return this;
-    }
-
-    public static void blePrinterCheck(Context context) {
-        setStop(false);
-        EpLog.m76i();
-        AlertDialog alertDialog = dialog;
-        if (alertDialog == null || !alertDialog.isShowing()) {
-            final Activity activity = (Activity) context;
-            if (BLEUtility.isThreadAlive("bleCheck")) {
-                EpLog.m69d("isAlive bleCheck");
-            } else if (handlerThread != null) {
-                EpLog.m71e("handlerThread != null   ");
-            } else {
-                EpLog.m77i("★     handlerThread start   ");
-                handlerThread = new HandlerThread("bleCheck");
-                handlerThread.start();
-                new Handler(handlerThread.getLooper()).postDelayed(new Runnable() {
-                    public void run() {
-                        EpLog.m77i(" 0 handlerThread run !!!!");
-                        BleAsyncTask.handlerThread.quitSafely();
-                        new BleAsyncTask(activity).execute(new Void[0]);
-                    }
-                }, 500);
-            }
-        }
-    }
-
-    public static void blePrinterCheck(Context context, final BLEUtility.BleWorkCallback bleWorkCallback) {
-        setStop(false);
-        EpLog.m76i();
-        final Activity activity = (Activity) context;
-        if (BLEUtility.isThreadAlive("bleCheck")) {
-            EpLog.m69d("   ‼ isAlive bleCheck");
-            return;
-        }
-        EpLog.m77i("handlerThread");
-        handlerThread = new HandlerThread("bleCheck");
-        handlerThread.start();
-        new Handler(handlerThread.getLooper()).postDelayed(new Runnable() {
-            public void run() {
-                EpLog.m77i(" handlerThread run !!!!");
-                BleAsyncTask.handlerThread.quitSafely();
-                new BleAsyncTask(activity, bleWorkCallback, BleWork.getScanAdvertisingPacketTimeout()).execute(new Void[0]);
-            }
-        }, 1000);
-    }
-
-    public static void blePrinterCheckStop() {
-        EpLog.m76i();
-        if (handlerThread != null) {
-            setStop(true);
-            handlerThread.quitSafely();
-            handlerThread = null;
-            AlertDialog alertDialog = dialog;
-            if (alertDialog != null && alertDialog.isShowing()) {
-                dialog.dismiss();
-            }
-            Thread thread = BLEUtility.getThread("bleCheck");
-            if (thread != null && thread.isAlive()) {
-                EpLog.m77i("interrupt");
-                thread.interrupt();
-                try {
-                    EpLog.m77i("join");
-                    thread.join(50);
-                } catch (InterruptedException e) {
-                    EpLog.m71e(e.getMessage());
-                }
-            }
-        } else {
-            EpLog.m77i("handlerThread NULL return !!");
-        }
-    }
-}

+ 0 - 11
app/src/main/java/epson/common/ble/BleException.java

@@ -1,11 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-public class BleException extends Exception {
-    public static final int GET_CHARACTERISTIC = 1;
-    private int code;
-
-    public BleException(int i, String str) {
-        super(str);
-        code = i;
-    }
-}

+ 0 - 237
app/src/main/java/epson/common/ble/BleScanWork.java

@@ -1,237 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothManager;
-import android.bluetooth.le.BluetoothLeScanner;
-import android.bluetooth.le.ScanCallback;
-import android.bluetooth.le.ScanFilter;
-import android.bluetooth.le.ScanRecord;
-import android.bluetooth.le.ScanResult;
-import android.bluetooth.le.ScanSettings;
-import android.content.Context;
-import android.os.Build;
-import android.os.ParcelUuid;
-
-
-import android.support.annotation.RequiresApi;
-import android.util.SparseArray;
-import com.epson.mobilephone.common.EpLog;
-import com.epson.mobilephone.common.ble.util.BLEUtility;
-import com.epson.mobilephone.common.ble.util.BLEUuid;
-import com.epson.mobilephone.common.ble.util.ScannedDevice;
-import com.google.common.primitives.UnsignedBytes;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-public class BleScanWork {
-    private static final int COMPANY_IDENTIFIER_EPSON = 64;
-    private BluetoothAdapter mBTAdapter;
-    private BluetoothLeScanner mBluetoothLeScanner;
-    @Nullable
-    private BLEUtility.BleWorkCallback mFailed;
-    private boolean mIsFiltering;
-    private boolean mIsScanning;
-    @NonNull
-    private BluetoothAdapter.LeScanCallback mLeScanCallback;
-    @Nullable
-    private ScanCallback mScanCallback;
-    /* access modifiers changed from: private */
-    @NonNull
-    public List<ScannedDevice> mScannedDeviceList;
-    /* access modifiers changed from: private */
-    @Nullable
-    public BLEUtility.BleWorkCallback mSuccess;
-
-    @NonNull
-    public static BleScanWork getInstace() {
-        return SingletonHolder.INSTANCE;
-    }
-
-    private static class SingletonHolder {
-        private static final BleScanWork INSTANCE = new BleScanWork();
-
-        private SingletonHolder() {
-        }
-    }
-
-    private BleScanWork() {
-        mSuccess = null;
-        mFailed = null;
-        mScannedDeviceList = new CopyOnWriteArrayList();
-        if (Build.VERSION.SDK_INT >= 21) {
-            mScanCallback = new ScanCallback() {
-                @RequiresApi(api = 21)
-                public void onScanResult(int i, @NonNull ScanResult scanResult) {
-                    ScanRecord scanRecord = scanResult.getScanRecord();
-                    if (scanRecord == null) {
-                        EpLog.m71e("scanRecord is NULL !!");
-                        return;
-                    }
-                    SparseArray<byte[]> manufacturerSpecificData = scanRecord.getManufacturerSpecificData();
-                    StringBuilder sb = new StringBuilder();
-                    for (int i2 = 0; i2 < manufacturerSpecificData.size(); i2++) {
-                        if (manufacturerSpecificData.keyAt(i2) == 64) {
-                            byte[] valueAt = manufacturerSpecificData.valueAt(i2);
-                            for (byte b : valueAt) {
-                                sb.append(BLEUtility.IntToHex2(b & UnsignedBytes.MAX_VALUE));
-                            }
-                            String deviceName = getDeviceName(scanResult);
-                            if (deviceName != null && !deviceName.isEmpty() && scanResult.getRssi() >= -75 && scanResult.getRssi() < 127 && BleScanWork.this.update(scanResult.getDevice(), scanResult.getRssi(), deviceName, valueAt) && BleScanWork.mScannedDeviceList.size() > 0 && BleScanWork.mSuccess != null) {
-                                EpLog.m71e("mScannedDeviceList --- " + BleScanWork.mScannedDeviceList.size());
-                                BleScanWork.mSuccess.call(BleScanWork.mScannedDeviceList);
-                                return;
-                            }
-                            return;
-                        }
-                    }
-                }
-
-                public void onScanFailed(int i) {
-                    EpLog.m71e("onScanFailed " + i);
-                }
-
-                @Nullable
-                @RequiresApi(api = 21)
-                private String getDeviceName(ScanResult scanResult) {
-                    String deviceName = scanResult.getScanRecord() != null ? scanResult.getScanRecord().getDeviceName() : null;
-                    return (deviceName == null || deviceName.isEmpty()) ? scanResult.getDevice().getName() : deviceName;
-                }
-            };
-        }
-        mLeScanCallback = new BluetoothAdapter.LeScanCallback() {
-            public void onLeScan(BluetoothDevice bluetoothDevice, int i, @NonNull byte[] bArr) {
-                StringBuilder sb = new StringBuilder();
-                StringBuilder sb2 = new StringBuilder();
-                StringBuilder sb3 = new StringBuilder();
-                if (bArr.length >= 43) {
-                    for (int i2 = 27; i2 >= 12; i2--) {
-                        sb.append(BLEUtility.IntToHex2(bArr[i2] & UnsignedBytes.MAX_VALUE));
-                    }
-                    for (int i3 = 6; i3 >= 5; i3--) {
-                        sb2.append(BLEUtility.IntToHex2(bArr[i3] & UnsignedBytes.MAX_VALUE));
-                    }
-                    for (int i4 = 7; i4 <= 9; i4++) {
-                        sb3.append(BLEUtility.IntToHex2(bArr[i4] & UnsignedBytes.MAX_VALUE));
-                    }
-                }
-                if (BleScanWork.mIsFiltering && BLEUuid.SERVICE_SNMP.replace("-", "").equalsIgnoreCase(sb.toString()) && i >= -75 && i < 127) {
-                    String name = bluetoothDevice.getName();
-                    byte[] bArr2 = new byte[3];
-                    System.arraycopy(bArr, 7, bArr2, 0, bArr2.length);
-                    EpLog.m69d(name + " Company information = " + sb2 + " getManufacturerSpecificData = " + sb3);
-                    if (BleScanWork.this.update(bluetoothDevice, i, name, bArr2) && BleScanWork.mSuccess != null && name != null) {
-                        EpLog.m71e("mScannedDeviceList --- " + BleScanWork.mScannedDeviceList.size());
-                        BleScanWork.mSuccess.call(BleScanWork.mScannedDeviceList);
-                    }
-                }
-            }
-        };
-    }
-
-    @NonNull
-    public ArrayList<ScannedDevice> getScannedDeviceList() {
-        return new ArrayList<>(mScannedDeviceList);
-    }
-
-    private void search(BLEUtility.BleWorkCallback bleWorkCallback, BLEUtility.BleWorkCallback bleWorkCallback2) {
-        mSuccess = bleWorkCallback;
-        mFailed = bleWorkCallback2;
-        startScan(true);
-    }
-
-    public boolean update(@Nullable BluetoothDevice bluetoothDevice, int i, String str, byte[] bArr) {
-        boolean z;
-        if (bluetoothDevice == null || bluetoothDevice.getAddress() == null) {
-            return false;
-        }
-        Iterator<ScannedDevice> it = mScannedDeviceList.iterator();
-        while (true) {
-            if (!it.hasNext()) {
-                z = false;
-                break;
-            }
-            ScannedDevice next = it.next();
-            if (bluetoothDevice.getAddress().equals(next.getDevice().getAddress())) {
-                next.setRssi(i);
-                z = true;
-                break;
-            }
-        }
-        if (z) {
-            return false;
-        }
-        mScannedDeviceList.add(new ScannedDevice(bluetoothDevice, i, str, bArr));
-        EpLog.m77i("☆☆ = " + str + ":" + i);
-        return true;
-    }
-
-    public boolean init_scan(@NonNull Context context) {
-        if (!BLEUtility.isBLESupported(context)) {
-            return false;
-        }
-        BluetoothManager manager = BLEUtility.getManager(context);
-        if (manager != null) {
-            mBTAdapter = manager.getAdapter();
-        }
-        BluetoothAdapter bluetoothAdapter = mBTAdapter;
-        if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {
-            return false;
-        }
-        if (Build.VERSION.SDK_INT >= 21) {
-            mBluetoothLeScanner = mBTAdapter.getBluetoothLeScanner();
-            if (mBluetoothLeScanner == null) {
-                return false;
-            }
-        }
-        stopScan();
-        EpLog.m69d("★ stopScan");
-        return true;
-    }
-
-    private void startScan(boolean z) {
-        ScanSettings scanSettings;
-        EpLog.m77i("☆startScan☆");
-        mScannedDeviceList.clear();
-        mIsFiltering = z;
-        if (mBTAdapter != null && !mIsScanning) {
-            if (Build.VERSION.SDK_INT < 21) {
-                mBTAdapter.startLeScan(mLeScanCallback);
-            } else if (Build.VERSION.SDK_INT >= 21) {
-                ArrayList arrayList = new ArrayList();
-                if (mIsFiltering) {
-                    arrayList.add(new ScanFilter.Builder().setServiceUuid(ParcelUuid.fromString(BLEUuid.SERVICE_SNMP)).build());
-                    scanSettings = new ScanSettings.Builder().setScanMode(2).setReportDelay(0).build();
-                } else {
-                    scanSettings = new ScanSettings.Builder().setScanMode(2).build();
-                }
-                BluetoothLeScanner bluetoothLeScanner = mBluetoothLeScanner;
-                if (bluetoothLeScanner != null) {
-                    bluetoothLeScanner.startScan(arrayList, scanSettings, mScanCallback);
-                    mIsScanning = true;
-                }
-            }
-        }
-    }
-
-    public void stopScan() {
-        EpLog.m77i("stopScan");
-        if (mBTAdapter == null) {
-            return;
-        }
-        if (Build.VERSION.SDK_INT < 21) {
-            mBTAdapter.stopLeScan(mLeScanCallback);
-            EpLog.m77i("mLeScanCallback");
-            mIsScanning = false;
-            return;
-        }
-        BluetoothLeScanner bluetoothLeScanner = mBluetoothLeScanner;
-        if (bluetoothLeScanner != null) {
-            bluetoothLeScanner.stopScan(mScanCallback);
-            EpLog.m77i("mScanCallback");
-            mIsScanning = false;
-        }
-    }
-}

+ 0 - 1331
app/src/main/java/epson/common/ble/BleWork.java

@@ -1,1331 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-import android.app.Activity;
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothGatt;
-import android.bluetooth.BluetoothGattCallback;
-import android.bluetooth.BluetoothGattCharacteristic;
-import android.bluetooth.BluetoothGattDescriptor;
-import android.bluetooth.BluetoothGattService;
-import android.bluetooth.BluetoothManager;
-import android.content.Context;
-import android.os.AsyncTask;
-import android.os.Build;
-import android.os.Handler;
-
-
-import com.epson.mobilephone.common.EpLog;
-import com.epson.mobilephone.common.ble.util.BLEUtility;
-import com.epson.mobilephone.common.ble.util.BLEUuid;
-import com.epson.mobilephone.common.ble.util.ScannedDevice;
-import com.epson.mobilephone.common.escpr.EscprLib;
-import com.epson.mobilephone.common.escpr.MIBCommand;
-import com.epson.mobilephone.common.wifidirect.ActivityRequestLocationPermission;
-import com.epson.mobilephone.common.wifidirect.WiFiDirectManager;
-import com.epson.mobilephone.common.wifidirect.WiFiNetworkManager;
-import com.evernote.edam.limits.Constants;
-import epson.print.IprintApplication;
-import epson.print.MyPrinter;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-public class BleWork {
-    private static final int EPS_COMM_BID = 2;
-    private static final int GATT_DELAY = 0;
-    private static final int GATT_DELAY2 = 500;
-    private static final int RETRY_NUMS = 3;
-    private static final int SCAN_ADVERTISING_PACKET_TIMEOUT = 10000;
-    Handler handlerRead;
-    Handler handlerWrite;
-    private BluetoothAdapter mBTAdapter;
-    /* access modifiers changed from: private */
-    @Nullable
-    public BluetoothGatt mConnGatt;
-    private Context mContext;
-    private BluetoothDevice mDevice;
-    private String mDeviceMacAddress;
-    private String mDevicePassword;
-    private final byte[] mEngineID;
-    private EscprLib mEscprlib;
-    /* access modifiers changed from: private */
-    @Nullable
-    public BLEUtility.BleWorkCallback mFailed;
-    private BluetoothGattCallback mGattcallback;
-    private boolean mInSequence;
-    private byte mIndex;
-    /* access modifiers changed from: private */
-    @NonNull
-    public MIBCommand mMibCommand;
-    private boolean mReconnect;
-    /* access modifiers changed from: private */
-    @Nullable
-    public BLEUtility.BleWorkCallback mResposne;
-    private int mRetry;
-    private String mSSID;
-    private String mSSIDPassword;
-    private short mSecurityType;
-    private ScannedDevice mSelectItem;
-    public jobSequence mSequence;
-    @Nullable
-    private BLEUtility.BleWorkCallback mSequenceCallbackFailed;
-    /* access modifiers changed from: private */
-    @Nullable
-    public BLEUtility.BleWorkCallback mSequenceCallbackSuccess;
-    /* access modifiers changed from: private */
-    @NonNull
-    public List<String> mSsidLis;
-    public int mStatus;
-    /* access modifiers changed from: private */
-    @Nullable
-    public BLEUtility.BleWorkCallback mSuccess;
-    private long mTimeOut;
-
-    public enum jobSequence {
-        UNINITIALIZED,
-        DISCONNECTED,
-        FAILED,
-        INITIALIZE,
-        GET_VERSION,
-        CHECK_SSID,
-        SET_PASSWORD,
-        MIB_GET_MACADDRESS,
-        MIB_GET_SSID_LIST,
-        MIB_SET_SSID,
-        MIB_SET_SECURITY_TYPE,
-        MIB_SEC_LOGIN,
-        MIB_SEC_SET_PASS,
-        MIB_SEC_LOGOUT,
-        MIB_REBOOT_NW,
-        COMPLETION,
-        MIB_SEC_SKIP,
-        AFTER_SETTING_PASSWORD,
-        BEFORE_CHECK_SSID
-    }
-
-    public static int getScanAdvertisingPacketTimeout() {
-        return 10000;
-    }
-
-    private void showStatus(String str, int i) {
-    }
-
-    static /* synthetic */ int access$508(BleWork bleWork) {
-        int i = bleWork.mRetry;
-        bleWork.mRetry = i + 1;
-        return i;
-    }
-
-    @NonNull
-    public List<String> getSsidLis() {
-        return mSsidLis;
-    }
-
-    public void setSSID(String str) {
-        mSSID = str;
-    }
-
-    public void setRetryFinish() {
-        mRetry = 3;
-    }
-
-    public String getSSID() {
-        return mSSID;
-    }
-
-    public synchronized void setSecurityType(short s) {
-        mSecurityType = s;
-    }
-
-    public synchronized short getSecurityType() {
-        return mSecurityType;
-    }
-
-    public void setSSIDPassword(String str) {
-        mSSIDPassword = str;
-    }
-
-    public String getSSIDPassword() {
-        String str = mSSIDPassword;
-        return str != null ? str : "";
-    }
-
-    public void setTimeOut(long j) {
-        mTimeOut = j;
-    }
-
-    public String getDeviceMacAddress() {
-        String str = mDeviceMacAddress;
-        if (str == null) {
-            return "";
-        }
-        return str.replace("\"", "");
-    }
-
-    public String getDeviceName() {
-        return mSelectItem.getDisplayName();
-    }
-
-    private BleWork() {
-        mSuccess = null;
-        mFailed = null;
-        mSequenceCallbackSuccess = null;
-        mSequenceCallbackFailed = null;
-        mResposne = null;
-        mSsidLis = new ArrayList();
-        mTimeOut = -1;
-        mEscprlib = EscprLib.getInstance();
-        mMibCommand = new MIBCommand();
-        mIndex = 0;
-        mInSequence = false;
-        mEngineID = mEscprlib.getEngineId(IprintApplication.getInstance());
-        mReconnect = false;
-        mSequence = jobSequence.UNINITIALIZED;
-        mGattcallback = null;
-        if (mGattcallback != null) {
-            EpLog.m71e("mGattcallback != null");
-        }
-        mGattcallback = new BluetoothGattCallback() {
-            public void onMtuChanged(BluetoothGatt bluetoothGatt, int i, int i2) {
-                super.onMtuChanged(bluetoothGatt, i, i2);
-                EpLog.m77i("onMtuChanged " + i);
-            }
-
-            public void onDescriptorWrite(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor bluetoothGattDescriptor, int i) {
-                super.onDescriptorWrite(bluetoothGatt, bluetoothGattDescriptor, i);
-                BleWork.this.showStatus("DescriptorWrite", i);
-                if (i != 0) {
-                    BleWork.this.sequenceError();
-                } else if (BleWork.mResposne != null) {
-                    BleWork.mResposne.call(bluetoothGattDescriptor);
-                }
-            }
-
-            public void onConnectionStateChange(BluetoothGatt bluetoothGatt, int i, int i2) {
-                EpLog.m77i("status = " + i + "  newState = " + i2);
-                if (i == 0 && i2 == 2) {
-                    EpLog.m77i("STATE_CONNECTED  -- " + BleWork.mSequence);
-                    BleWork bleWork = BleWork.this;
-                    bleWork.mStatus = i2;
-                    if (bleWork.mConnGatt == null) {
-                        EpLog.m71e("mConnGatt  NULL !");
-                    }
-                    if (bluetoothGatt == null) {
-                        EpLog.m71e("gatt  NULL !");
-                    }
-                    BluetoothGatt unused = BleWork.mConnGatt = bluetoothGatt;
-                    BleWork.this.handlerWrite.removeCallbacks((Runnable) null);
-                    BleWork.this.handlerWrite.postDelayed(new Runnable() {
-                        public void run() {
-                            EpLog.m77i("discoverServices");
-                            try {
-                                if (!((BluetoothGatt) Objects.requireNonNull(BleWork.mConnGatt)).discoverServices()) {
-                                    EpLog.m71e("discoverServices error");
-                                }
-                            } catch (NullPointerException unused) {
-                                EpLog.m71e("mConnGatt NULL !");
-                            }
-                        }
-                    }, 500);
-                } else if (i != 0 || i2 == 0) {
-                    EpLog.m77i("STATE_DISCONNECTED " + BleWork.mSequence + " mReconnect = " + BleWork.mReconnect + " mRetry  " + BleWork.mRetry);
-                    if (!BleWork.mReconnect && BleWork.mSequence == jobSequence.UNINITIALIZED) {
-                        BleWork.this.failedProcessing();
-                    } else if (BleWork.mReconnect || BleWork.mSequence == jobSequence.UNINITIALIZED || BleWork.mSequence == jobSequence.MIB_REBOOT_NW || BleWork.mSequence == jobSequence.DISCONNECTED || BleWork.mSequence == jobSequence.MIB_SET_SSID || BleWork.mSequence == jobSequence.AFTER_SETTING_PASSWORD) {
-                        EpLog.m69d("★ stopScan");
-                        BleScanWork.getInstace().stopScan();
-                        BleWork bleWork2 = BleWork.this;
-                        bleWork2.mStatus = i2;
-                        if ((bleWork2.mSequence == jobSequence.AFTER_SETTING_PASSWORD || BleWork.mSequence == jobSequence.BEFORE_CHECK_SSID || BleWork.mSequence == jobSequence.MIB_SET_SSID || BleWork.mSequence == jobSequence.MIB_REBOOT_NW) && !BleWork.mReconnect) {
-                            if (BleWork.mSequence == jobSequence.MIB_REBOOT_NW) {
-                                BleWork.this.gattClose();
-                            }
-                            EpLog.m77i(" BREAK ★ mSequence " + BleWork.mSequence);
-                            return;
-                        }
-                        BleWork.this.gattClose();
-                        if (BleWork.mSequence != jobSequence.UNINITIALIZED && !BleWork.mReconnect) {
-                            return;
-                        }
-                        if (BleWork.mRetry < 3) {
-                            try {
-                                TimeUnit.SECONDS.sleep(5);
-                            } catch (InterruptedException e) {
-                                e.printStackTrace();
-                            }
-                            EpLog.m82w("retry " + BleWork.mRetry);
-                            BleWork.access$508(BleWork.this);
-                            EpLog.m71e("init");
-                            boolean unused2 = BleWork.this.init();
-                            return;
-                        }
-                        BleWork.this.failedProcessing();
-                    } else {
-                        BleWork.this.failedProcessing();
-                    }
-                } else if (i2 == 1) {
-                    EpLog.m77i("STATE_CONNECTING");
-                } else if (i2 == 3) {
-                    EpLog.m77i("STATE_DISCONNECTING");
-                }
-            }
-
-            public void onServicesDiscovered(BluetoothGatt bluetoothGatt, int i) {
-                EpLog.m76i();
-                try {
-                    for (BluetoothGattService next : bluetoothGatt.getServices()) {
-                        if (next != null) {
-                            if (next.getUuid() != null) {
-                                if (BLEUuid.SERVICE_SNMP.equalsIgnoreCase(next.getUuid().toString())) {
-                                    EpLog.m77i("発見!! EPSON SNMP サービス");
-                                    for (Map.Entry next2 : BLEUuid.GattCharsMap.entrySet()) {
-                                        next2.setValue(next.getCharacteristic(UUID.fromString((String) next2.getKey())));
-                                    }
-                                    if (!BLEUuid.GattCharsMap.containsValue((Object) null)) {
-                                        boolean unused = BleWork.mReconnect = false;
-                                        BleWork.mSequenceCallbackSuccess.call(BleWork.mSequence);
-                                        new NotifySetThread().execute(new Void[0]);
-                                    } else {
-                                        throw new BleException(1, "getCharacteristic Error !");
-                                    }
-                                } else {
-                                    continue;
-                                }
-                            }
-                        }
-                    }
-                } catch (BleException e) {
-                    EpLog.m71e(e.getMessage());
-                    e.printStackTrace();
-                    BleWork.this.failedProcessing();
-                }
-            }
-
-            public void onCharacteristicChanged(BluetoothGatt bluetoothGatt, @NonNull BluetoothGattCharacteristic bluetoothGattCharacteristic) {
-                super.onCharacteristicChanged(bluetoothGatt, bluetoothGattCharacteristic);
-                EpLog.m69d("onCharacteristicChanged");
-                if (BLEUuid.CHAR_SNMP_STATUS_STRING.equals(bluetoothGattCharacteristic.getUuid().toString())) {
-                    Short valueOf = Short.valueOf(bluetoothGattCharacteristic.getIntValue(17, 0).shortValue());
-                    String sh = valueOf.toString();
-                    if (valueOf.shortValue() == 0) {
-                        EpLog.m77i("[Notify]SNMP Status" + sh);
-                        BleWork.this.characteristicRead();
-                        return;
-                    }
-                    EpLog.m71e("[Notify]SNMP Status" + sh);
-                    BleWork.this.failedProcessing();
-                } else if (BLEUuid.CHAR_SECURITY_TYPE_STRING.equals(bluetoothGattCharacteristic.getUuid().toString())) {
-                    Short valueOf2 = Short.valueOf(bluetoothGattCharacteristic.getIntValue(17, 0).shortValue());
-                    BleWork.this.setSecurityType(valueOf2.shortValue());
-                    String sh2 = valueOf2.toString();
-                    EpLog.m77i("[Notify]Security Type " + sh2);
-                    if (valueOf2.shortValue() <= 0) {
-                        BleWork.mSsidLis.clear();
-                        BleWork.this.getSSIDList();
-                    } else if (BleWork.mSequenceCallbackSuccess != null) {
-                        BleWork.mSequenceCallbackSuccess.call(BleWork.mSequence);
-                    }
-                } else {
-                    String sh3 = Short.valueOf(bluetoothGattCharacteristic.getIntValue(17, 0).shortValue()).toString();
-                    EpLog.m71e("[Notify]unKnown type" + sh3);
-                }
-            }
-
-            public void onCharacteristicRead(BluetoothGatt bluetoothGatt, @NonNull BluetoothGattCharacteristic bluetoothGattCharacteristic, int i) {
-                BleWork.this.showStatus("Read", i);
-                if (i == 0) {
-                    readCharacteristicData(bluetoothGattCharacteristic);
-                } else {
-                    byte unused = BleWork.mIndex = (byte) 0;
-                }
-            }
-
-            /* JADX WARNING: Can't fix incorrect switch cases order */
-            /* Code decompiled incorrectly, please refer to instructions dump. */
-            private void readCharacteristicData(@android.support.annotation.NonNull android.bluetooth.BluetoothGattCharacteristic r7) {
-                /*
-                    r6 = this;
-                    java.util.UUID r0 = r7.getUuid()
-                    java.lang.String r0 = r0.toString()
-                    if (r0 != 0) goto L_0x0011
-                    java.lang.String r7 = "characteristic NULL !!"
-                    com.epson.mobilephone.common.EpLog.m71e((java.lang.String) r7)
-                    goto L_0x03a1
-                L_0x0011:
-                    java.lang.String r0 = r0.toLowerCase()
-                    int r1 = r0.hashCode()
-                    r2 = -1
-                    r3 = 1
-                    r4 = 0
-                    switch(r1) {
-                        case -929193779: goto L_0x0048;
-                        case -881344628: goto L_0x003e;
-                        case 593366729: goto L_0x0034;
-                        case 641215880: goto L_0x002a;
-                        case 1286468426: goto L_0x0020;
-                        default: goto L_0x001f;
-                    }
-                L_0x001f:
-                    goto L_0x0052
-                L_0x0020:
-                    java.lang.String r1 = "802a0002-4ef4-4e59-b573-2bed4a4ac158"
-                    boolean r0 = r0.equals(r1)
-                    if (r0 == 0) goto L_0x0052
-                    r0 = 3
-                    goto L_0x0053
-                L_0x002a:
-                    java.lang.String r1 = "00002a25-0000-1000-8000-00805f9b34fb"
-                    boolean r0 = r0.equals(r1)
-                    if (r0 == 0) goto L_0x0052
-                    r0 = 1
-                    goto L_0x0053
-                L_0x0034:
-                    java.lang.String r1 = "802a0001-4ef4-4e59-b573-2bed4a4ac158"
-                    boolean r0 = r0.equals(r1)
-                    if (r0 == 0) goto L_0x0052
-                    r0 = 2
-                    goto L_0x0053
-                L_0x003e:
-                    java.lang.String r1 = "00002a29-0000-1000-8000-00805f9b34fb"
-                    boolean r0 = r0.equals(r1)
-                    if (r0 == 0) goto L_0x0052
-                    r0 = 0
-                    goto L_0x0053
-                L_0x0048:
-                    java.lang.String r1 = "802a0005-4ef4-4e59-b573-2bed4a4ac158"
-                    boolean r0 = r0.equals(r1)
-                    if (r0 == 0) goto L_0x0052
-                    r0 = 4
-                    goto L_0x0053
-                L_0x0052:
-                    r0 = -1
-                L_0x0053:
-                    r1 = 18
-                    switch(r0) {
-                        case 0: goto L_0x0389;
-                        case 1: goto L_0x0370;
-                        case 2: goto L_0x032e;
-                        case 3: goto L_0x02bd;
-                        case 4: goto L_0x005a;
-                        default: goto L_0x0058;
-                    }
-                L_0x0058:
-                    goto L_0x03a1
-                L_0x005a:
-                    byte[] r7 = r7.getValue()
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r0 = r0.mMibCommand
-                    com.epson.mobilephone.common.escpr.MIBDataBlock r0 = r0.commandBlock
-                    int r1 = r7.length
-                    r0.bufSize = r1
-                    r0 = 0
-                L_0x006a:
-                    com.epson.mobilephone.common.ble.BleWork r1 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r1 = r1.mMibCommand
-                    com.epson.mobilephone.common.escpr.MIBDataBlock r1 = r1.commandBlock
-                    int r1 = r1.bufSize
-                    if (r0 >= r1) goto L_0x0087
-                    com.epson.mobilephone.common.ble.BleWork r1 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r1 = r1.mMibCommand
-                    com.epson.mobilephone.common.escpr.MIBDataBlock r1 = r1.commandBlock
-                    byte[] r1 = r1.buf
-                    byte r5 = r7[r0]
-                    r1[r0] = r5
-                    int r0 = r0 + 1
-                    goto L_0x006a
-                L_0x0087:
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    boolean r7 = r7.mInSequence
-                    if (r7 == 0) goto L_0x00e7
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.EscprLib r7 = r7.mEscprlib
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r0 = r0.mMibCommand
-                    java.lang.String r7 = r7.mibParseResponseAsStr(r0)
-                    boolean r0 = r7.isEmpty()
-                    if (r0 == 0) goto L_0x00c3
-                    java.lang.String r7 = "[Read]SNMP Response :end!"
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    boolean unused = r7.mInSequence = r4
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    byte unused = r7.mIndex = r4
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.util.BLEUtility$BleWorkCallback r7 = r7.mSequenceCallbackSuccess
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = r0.mSequence
-                    r7.call(r0)
-                    goto L_0x03a1
-                L_0x00c3:
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "[Read]SNMP Response :"
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r0 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r0)
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    java.util.List r0 = r0.mSsidLis
-                    r0.add(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.getSSIDList()
-                    goto L_0x03a1
-                L_0x00e7:
-                    java.lang.StringBuilder r7 = new java.lang.StringBuilder
-                    r7.<init>()
-                    java.lang.String r0 = "mSequence   "
-                    r7.append(r0)
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = r0.mSequence
-                    r7.append(r0)
-                    java.lang.String r7 = r7.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    int[] r7 = com.epson.mobilephone.common.ble.BleWork.C10195.$SwitchMap$com$epson$mobilephone$common$ble$BleWork$jobSequence
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = r0.mSequence
-                    int r0 = r0.ordinal()
-                    r7 = r7[r0]
-                    switch(r7) {
-                        case 1: goto L_0x026e;
-                        case 2: goto L_0x0226;
-                        case 3: goto L_0x019f;
-                        case 4: goto L_0x019f;
-                        case 5: goto L_0x019f;
-                        case 6: goto L_0x0110;
-                        case 7: goto L_0x0110;
-                        case 8: goto L_0x0110;
-                        default: goto L_0x010e;
-                    }
-                L_0x010e:
-                    goto L_0x03a1
-                L_0x0110:
-                    int[] r7 = new int[r3]
-                    r7[r4] = r2
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.EscprLib r0 = r0.mEscprlib
-                    com.epson.mobilephone.common.ble.BleWork r1 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r1 = r1.mMibCommand
-                    int r0 = r0.mibParseResponseAsInt(r1, r7)
-                    if (r0 != 0) goto L_0x0198
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "[Read]SNMP Response :sucess mSequence   "
-                    r0.append(r1)
-                    com.epson.mobilephone.common.ble.BleWork r1 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r1 = r1.mSequence
-                    r0.append(r1)
-                    java.lang.String r1 = " val:"
-                    r0.append(r1)
-                    r7 = r7[r4]
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r7 = r7.mSequence
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = com.epson.mobilephone.common.ble.BleWork.jobSequence.MIB_SEC_SKIP
-                    if (r7 != r0) goto L_0x0157
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = com.epson.mobilephone.common.ble.BleWork.jobSequence.MIB_SEC_LOGOUT
-                    r7.mSequence = r0
-                    goto L_0x0166
-                L_0x0157:
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r7 = r7.mSequence
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = com.epson.mobilephone.common.ble.BleWork.jobSequence.MIB_REBOOT_NW
-                    if (r7 != r0) goto L_0x0166
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    boolean unused = r7.mReconnect = r4
-                    goto L_0x03a1
-                L_0x0166:
-                    r6.IncrementSequence()
-                    java.lang.StringBuilder r7 = new java.lang.StringBuilder
-                    r7.<init>()
-                    java.lang.String r0 = "mSequence   "
-                    r7.append(r0)
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = r0.mSequence
-                    r7.append(r0)
-                    java.lang.String r7 = r7.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r7 = r7.mSequence
-                    int r7 = r7.ordinal()
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = com.epson.mobilephone.common.ble.BleWork.jobSequence.MIB_REBOOT_NW
-                    int r0 = r0.ordinal()
-                    if (r7 > r0) goto L_0x03a1
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.setSSIDWork()
-                    goto L_0x03a1
-                L_0x0198:
-                    java.lang.String r7 = "[Read]SNMP Response :error "
-                    com.epson.mobilephone.common.EpLog.m71e((java.lang.String) r7)
-                    goto L_0x03a1
-                L_0x019f:
-                    java.lang.StringBuilder r7 = new java.lang.StringBuilder
-                    r7.<init>()
-                    java.lang.String r0 = "mibIdentifier   requestId =  "
-                    r7.append(r0)
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r0 = r0.mMibCommand
-                    com.epson.mobilephone.common.escpr.MIBIdentifier r0 = r0.mibIdentifier
-                    int r0 = r0.requestId
-                    r7.append(r0)
-                    java.lang.String r7 = r7.toString()
-                    com.epson.mobilephone.common.EpLog.m69d(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.EscprLib r7 = r7.mEscprlib
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r0 = r0.mMibCommand
-                    com.epson.mobilephone.common.ble.BleWork r1 = com.epson.mobilephone.common.ble.BleWork.this
-                    byte[] r1 = r1.mEngineID
-                    int r7 = r7.mibParseSecResponse(r0, r1)
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "mSequence   "
-                    r0.append(r1)
-                    com.epson.mobilephone.common.ble.BleWork r1 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r1 = r1.mSequence
-                    r0.append(r1)
-                    java.lang.String r1 = " ret = "
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r0 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r0)
-                    if (r7 == 0) goto L_0x01fc
-                    java.lang.String r7 = "[Read]SNMP Response :end!"
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    goto L_0x03a1
-                L_0x01fc:
-                    r6.IncrementSequence()
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "[Read]SNMP Response :"
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r7 = " mSequence   "
-                    r0.append(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r7 = r7.mSequence
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.setSSIDWork()
-                    goto L_0x03a1
-                L_0x0226:
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.EscprLib r7 = r7.mEscprlib
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r0 = r0.mMibCommand
-                    java.lang.String r7 = r7.mibParseResponseAsStr(r0)
-                    boolean r0 = r7.isEmpty()
-                    r0 = r0 ^ r3
-                    if (r0 != 0) goto L_0x0244
-                    java.lang.String r7 = "[Read]SNMP Response :end!"
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    goto L_0x03a1
-                L_0x0244:
-                    r6.IncrementSequence()
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "[Read]SNMP Response :"
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r7 = " mSequence   "
-                    r0.append(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r7 = r7.mSequence
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.setSSIDWork()
-                    goto L_0x03a1
-                L_0x026e:
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.EscprLib r7 = r7.mEscprlib
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.escpr.MIBCommand r0 = r0.mMibCommand
-                    java.lang.String r7 = r7.mibParseResponseAsMacaddress(r0)
-                    boolean r0 = r7.isEmpty()
-                    if (r0 != 0) goto L_0x02b6
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    java.lang.String unused = r0.mDeviceMacAddress = r7
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r1 = com.epson.mobilephone.common.ble.BleWork.jobSequence.MIB_SET_SSID
-                    r0.mSequence = r1
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "[Read]SNMP Response :sucess:MacAddress ★"
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r7 = "★ mSequence "
-                    r0.append(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r7 = r7.mSequence
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.setSSIDWork()
-                    goto L_0x03a1
-                L_0x02b6:
-                    java.lang.String r7 = "[Read]SNMP Response :failed"
-                    com.epson.mobilephone.common.EpLog.m71e((java.lang.String) r7)
-                    goto L_0x03a1
-                L_0x02bd:
-                    java.lang.Integer r7 = r7.getIntValue(r1, r4)
-                    java.lang.String r7 = r7.toString()
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "[Read]Version "
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    java.lang.String r7 = r7.mSSID
-                    if (r7 == 0) goto L_0x03a1
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    java.lang.String r7 = r7.mSSID
-                    boolean r7 = r7.isEmpty()
-                    if (r7 != 0) goto L_0x03a1
-                    r6.IncrementSequence()
-                    java.lang.String r7 = " @@  checkSSID  @@ "
-                    com.epson.mobilephone.common.EpLog.m69d(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    android.bluetooth.BluetoothGatt r7 = r7.mConnGatt
-                    if (r7 != 0) goto L_0x0302
-                    java.lang.String r7 = "mConnGatt  NULL !"
-                    com.epson.mobilephone.common.EpLog.m71e((java.lang.String) r7)
-                L_0x0302:
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    short r7 = r7.getSecurityType()
-                    r0 = 255(0xff, float:3.57E-43)
-                    if (r7 != r0) goto L_0x0328
-                    java.lang.String r7 = " skip  "
-                    com.epson.mobilephone.common.EpLog.m69d(r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.util.BLEUtility$BleWorkCallback r7 = r7.mSequenceCallbackSuccess
-                    if (r7 == 0) goto L_0x03a1
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.util.BLEUtility$BleWorkCallback r7 = r7.mSequenceCallbackSuccess
-                    com.epson.mobilephone.common.ble.BleWork r0 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = r0.mSequence
-                    r7.call(r0)
-                    goto L_0x03a1
-                L_0x0328:
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.checkSSID()
-                    goto L_0x03a1
-                L_0x032e:
-                    java.lang.Integer r7 = r7.getIntValue(r1, r4)
-                    short r7 = r7.shortValue()
-                    java.lang.Short r7 = java.lang.Short.valueOf(r7)
-                    java.lang.String r0 = r7.toString()
-                    java.lang.StringBuilder r1 = new java.lang.StringBuilder
-                    r1.<init>()
-                    java.lang.String r2 = "802a0001-4ef4-4e59-b573-2bed4a4ac158\n[Read]Password "
-                    r1.append(r2)
-                    r1.append(r0)
-                    java.lang.String r0 = r1.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r0)
-                    short r7 = r7.shortValue()
-                    r0 = 65535(0xffff, float:9.1834E-41)
-                    if (r7 != r0) goto L_0x0367
-                    java.lang.String r7 = "password error !"
-                    com.epson.mobilephone.common.EpLog.m71e((java.lang.String) r7)
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    com.epson.mobilephone.common.ble.BleWork$jobSequence r0 = com.epson.mobilephone.common.ble.BleWork.jobSequence.FAILED
-                    r7.mSequence = r0
-                    goto L_0x03a1
-                L_0x0367:
-                    r6.IncrementSequence()
-                    com.epson.mobilephone.common.ble.BleWork r7 = com.epson.mobilephone.common.ble.BleWork.this
-                    r7.checkVersion()
-                    goto L_0x03a1
-                L_0x0370:
-                    java.lang.String r7 = r7.getStringValue(r4)
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "00002a29-0000-1000-8000-00805f9b34fb\n[Read]Serial Number "
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                    goto L_0x03a1
-                L_0x0389:
-                    java.lang.String r7 = r7.getStringValue(r4)
-                    java.lang.StringBuilder r0 = new java.lang.StringBuilder
-                    r0.<init>()
-                    java.lang.String r1 = "00002a29-0000-1000-8000-00805f9b34fb\n[Read]Manufacturer Name "
-                    r0.append(r1)
-                    r0.append(r7)
-                    java.lang.String r7 = r0.toString()
-                    com.epson.mobilephone.common.EpLog.m77i(r7)
-                L_0x03a1:
-                    return
-                */
-                throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.ble.BleWork.C10141.readCharacteristicData(android.bluetooth.BluetoothGattCharacteristic):void");
-            }
-
-            private void IncrementSequence() {
-                int ordinal = BleWork.mSequence.ordinal();
-                jobSequence[] values = jobSequence.values();
-                BleWork.mSequence = values[ordinal + 1];
-                EpLog.m77i("ΔΔ mSequence = " + BleWork.mSequence);
-            }
-
-            public void onCharacteristicWrite(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, int i) {
-                BleWork.this.showStatus("Write", i);
-                if (i != 0) {
-                    byte unused = BleWork.mIndex = (byte) 0;
-                    if (BleWork.mSequence == jobSequence.INITIALIZE) {
-                        BleWork.this.failedProcessing();
-                    } else if (BleWork.mSequence == jobSequence.MIB_REBOOT_NW) {
-                        if (BleWork.mSuccess != null) {
-                            BleWork.mSuccess.call(BleWork.mSequence);
-                        }
-                    } else if (BleWork.mFailed != null) {
-                        BleWork.mFailed.call(BleWork.mSequence);
-                    }
-                } else if (BleWork.mSequence == jobSequence.INITIALIZE) {
-                    BleWork.this.characteristicRead();
-                } else if (BleWork.mSequence == jobSequence.MIB_REBOOT_NW && BleWork.mSuccess != null) {
-                    BleWork.mSuccess.call(BleWork.mSequence);
-                }
-            }
-
-            private void notifySet(@NonNull BluetoothGattCharacteristic bluetoothGattCharacteristic) {
-                if (!BleWork.mConnGatt.setCharacteristicNotification(bluetoothGattCharacteristic, true)) {
-                    EpLog.m71e("Notification set ERROR");
-                }
-                BluetoothGattDescriptor descriptor = bluetoothGattCharacteristic.getDescriptor(UUID.fromString(BLEUuid.CLIENT_CHARACTERISTIC_CONFIG));
-                descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
-                EpLog.m77i("notify set");
-                if (!BleWork.mConnGatt.writeDescriptor(descriptor)) {
-                    EpLog.m71e("Notification write ERROR");
-                }
-            }
-        };
-        handlerRead = new Handler();
-        handlerWrite = new Handler();
-    }
-
-    @NonNull
-    public static BleWork getInstace() {
-        return SingletonHolder.INSTANCE;
-    }
-
-    private static final class SingletonHolder {
-        private static final BleWork INSTANCE = new BleWork();
-
-        private SingletonHolder() {
-        }
-    }
-
-    public void resetSequence() {
-        mSequence = jobSequence.UNINITIALIZED;
-        mDevice = null;
-        mSSIDPassword = null;
-        mSsidLis.clear();
-        mReconnect = false;
-        mConnGatt = null;
-    }
-
-    @NonNull
-    public static String getSSID(@NonNull Context context) {
-        String curSSID = WiFiDirectManager.getCurSSID(context);
-        EpLog.m77i("" + curSSID);
-        return (curSSID == null || curSSID.equals("<unknown ssid>")) ? "" : curSSID;
-    }
-
-    public static boolean chechSSIDforBle(@NonNull Context context) {
-        if (Build.VERSION.SDK_INT <= 28 || ActivityRequestLocationPermission.canAccessWiFiInfo(context, 4)) {
-            return !getSSID(context).isEmpty() && !WiFiDirectManager.isSimpleAP(context);
-        }
-        return WiFiNetworkManager.getInsetance(context).isWiFiValidated();
-    }
-
-    public static boolean isStartBleProcess(@NonNull Context context, Boolean bool) {
-        BluetoothAdapter adapter;
-        BluetoothManager manager = BLEUtility.getManager(context);
-        if ((manager != null && ((adapter = manager.getAdapter()) == null || !adapter.isEnabled())) || !BLEUtility.isBLESupported(context)) {
-            return false;
-        }
-        if ((!bool.booleanValue() || MyPrinter.getCurPrinter(context).getName() == null) && chechSSIDforBle(context)) {
-            return true;
-        }
-        return false;
-    }
-
-    private void setSequenceCallback(BLEUtility.BleWorkCallback bleWorkCallback, BLEUtility.BleWorkCallback bleWorkCallback2) {
-        mSequenceCallbackSuccess = bleWorkCallback;
-        mSequenceCallbackFailed = bleWorkCallback2;
-    }
-
-    private void setNotifyCallback(BLEUtility.BleWorkCallback bleWorkCallback) {
-        mResposne = bleWorkCallback;
-    }
-
-    private void setSSID(BLEUtility.BleWorkCallback bleWorkCallback, BLEUtility.BleWorkCallback bleWorkCallback2) {
-        mSuccess = bleWorkCallback;
-        mFailed = bleWorkCallback2;
-        mSequence = jobSequence.MIB_GET_MACADDRESS;
-        setSSIDWork();
-    }
-
-    public void disconnect(boolean z) {
-        EpLog.m77i("mSequence == " + mSequence + ":: " + mStatus);
-        mSequence = z ? jobSequence.DISCONNECTED : mSequence;
-        if (mConnGatt != null) {
-            int i = mStatus;
-            if (!(i == 3 || i == 0)) {
-                EpLog.m69d(" !! mConnGatt disconnect");
-                mConnGatt.disconnect();
-            }
-            EpLog.m69d(" !! mConnGatt close " + mSequence + " " + mStatus);
-            mReconnect = false;
-            if (z) {
-                gattClose();
-            }
-        }
-    }
-
-    private void gattClose() {
-        EpLog.m69d(" !! mConnGatt close");
-        BluetoothGatt bluetoothGatt = mConnGatt;
-        if (bluetoothGatt != null) {
-            bluetoothGatt.close();
-            mConnGatt = null;
-        }
-    }
-
-    public void disconnect() {
-        disconnect(true);
-    }
-
-    public void connect() {
-        EpLog.m77i("再接続");
-        mReconnect = true;
-        mRetry = 0;
-        EpLog.m71e("init");
-        init();
-    }
-
-    private void setSSIDWork() {
-        ((Activity) mContext).runOnUiThread(new Runnable() {
-            public void run() {
-                BleWork.this.startSetSSID();
-            }
-        });
-    }
-
-    private void notifySet(@NonNull BluetoothGattCharacteristic bluetoothGattCharacteristic) {
-        if (!mConnGatt.setCharacteristicNotification(bluetoothGattCharacteristic, true)) {
-            EpLog.m71e("Notification set ERROR");
-        }
-        BluetoothGattDescriptor descriptor = bluetoothGattCharacteristic.getDescriptor(UUID.fromString(BLEUuid.CLIENT_CHARACTERISTIC_CONFIG));
-        descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
-        EpLog.m77i("notify set");
-        if (!mConnGatt.writeDescriptor(descriptor)) {
-            EpLog.m71e(" writeDescriptor ERROR");
-        }
-    }
-
-    public class NotifySetThread extends AsyncTask<Void, Void, Boolean> {
-        boolean stop;
-        boolean success;
-
-        private NotifySetThread() {
-            stop = false;
-            success = false;
-        }
-
-        protected void onPreExecute() {
-            super.onPreExecute();
-            EpLog.m76i();
-            try {
-                Thread.sleep(500);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            BleWork.this.setNotifyCallback(new BLEUtility.BleWorkCallback() {
-                public void call(@NonNull Object obj) {
-                    EpLog.m77i(" -- NotifySetThread call");
-                    BluetoothGattCharacteristic bluetoothGattCharacteristic = BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SECURITY_TYPE_STRING);
-                    BluetoothGattCharacteristic bluetoothGattCharacteristic2 = BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SNMP_STATUS_STRING);
-                    BluetoothGattDescriptor bluetoothGattDescriptor = (BluetoothGattDescriptor) obj;
-                    if (bluetoothGattCharacteristic == bluetoothGattDescriptor.getCharacteristic()) {
-                        BleWork.this.notifySet(bluetoothGattCharacteristic2);
-                    } else if (bluetoothGattCharacteristic2 == bluetoothGattDescriptor.getCharacteristic()) {
-                        NotifySetThread notifySetThread = NotifySetThread.this;
-                        notifySetThread.stop = true;
-                        notifySetThread.success = true;
-                    } else {
-                        NotifySetThread.this.stop = true;
-                    }
-                }
-            });
-        }
-
-        /* access modifiers changed from: protected */
-        @Nullable
-        public Boolean doInBackground(Void... voidArr) {
-            BleWork.this.notifySet(BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SECURITY_TYPE_STRING));
-            long currentTimeMillis = System.currentTimeMillis();
-            while (System.currentTimeMillis() - currentTimeMillis <= 30000) {
-                try {
-                    Thread.sleep(100);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                    if (!this.stop) {
-                    }
-                }
-                if (this.stop) {
-                    EpLog.m77i(" set ended ");
-                    EpLog.m76i();
-                    return Boolean.valueOf(this.success);
-                }
-            }
-            EpLog.m71e(" set failed! ");
-            return false;
-        }
-
-        protected void onPostExecute(Boolean bool) {
-            super.onPostExecute(bool);
-            if (bool.booleanValue()) {
-                try {
-                    TimeUnit.MILLISECONDS.sleep(500);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-                BleWork.mSequence = jobSequence.INITIALIZE;
-                BleWork.this.checkPassword();
-                return;
-            }
-            EpLog.m71e("setNotify");
-            BleWork.this.failedProcessing();
-        }
-    }
-
-    private void characteristicRead() {
-        EpLog.m77i("read " + mSequence);
-        if (mSequence != jobSequence.MIB_REBOOT_NW) {
-            final int[] iArr = {0};
-            handlerRead.postDelayed(new Runnable() {
-                public void run() {
-                    switch (C10195.$SwitchMap$com$epson$mobilephone$common$ble$BleWork$jobSequence[BleWork.mSequence.ordinal()]) {
-                        case 1:
-                        case 2:
-                        case 3:
-                        case 4:
-                        case 5:
-                        case 6:
-                        case 7:
-                        case 8:
-                        case 11:
-                            try {
-                                if (!((BluetoothGatt) Objects.requireNonNull(BleWork.mConnGatt)).readCharacteristic(BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SNMP_RESPONSE_STRING))) {
-                                    int[] iArr = iArr;
-                                    int i = iArr[0] + 1;
-                                    iArr[0] = i;
-                                    if (i < 3) {
-                                        EpLog.m71e("FALSE !! retry " + iArr[0]);
-                                        BleWork.this.handlerRead.removeCallbacks((Runnable) null);
-                                        BleWork.this.handlerRead.postDelayed(this, (long) (iArr[0] * 500));
-                                        return;
-                                    }
-                                    EpLog.m71e("FALSE !!!");
-                                    BleWork.this.sequenceError();
-                                    return;
-                                }
-                                return;
-                            } catch (NullPointerException unused) {
-                                EpLog.m71e("mConnGatt NULL !");
-                                return;
-                            }
-                        case 9:
-                            if (!BleWork.mConnGatt.readCharacteristic(BLEUuid.GattCharsMap.get(BLEUuid.CHAR_PASSWORD_STRING))) {
-                                EpLog.m71e("FALSE !! ");
-                                return;
-                            }
-                            return;
-                        case 10:
-                            if (!BleWork.mConnGatt.readCharacteristic(BLEUuid.GattCharsMap.get(BLEUuid.CHAR_VERSION_STRING))) {
-                                EpLog.m71e("FALSE !! ");
-                                return;
-                            }
-                            return;
-                        default:
-                            return;
-                    }
-                }
-            }, 0);
-        }
-    }
-
-    private boolean init() {
-        int i;
-        mEscprlib.epsWrapperInitDriver(mContext.getApplicationContext(), 2);
-        if (!BLEUtility.isBLESupported(mContext)) {
-            return false;
-        }
-        BluetoothManager manager = BLEUtility.getManager(mContext);
-        if (manager != null) {
-            mBTAdapter = manager.getAdapter();
-        }
-        if (mBTAdapter == null) {
-            return false;
-        }
-        if (mDevice == null) {
-            mDevice = mSelectItem.getDevice();
-            if (mDevice == null) {
-                EpLog.m71e("mDevice is null !!!");
-                return false;
-            }
-        }
-        byte[] hardwareType = mSelectItem.getHardwareType();
-        if (hardwareType.length >= 3) {
-            i = 4096 - ByteBuffer.wrap(new byte[]{0, 0, hardwareType[2], hardwareType[1]}).getInt();
-        } else {
-            i = Constants.EDAM_APPLICATIONDATA_ENTRY_LEN_MAX;
-        }
-        EpLog.m69d("password = " + i);
-        mDevicePassword = String.valueOf(i);
-        if (mConnGatt == null && mStatus == 0) {
-            EpLog.m77i("connectGatt");
-            mConnGatt = mDevice.connectGatt(mContext, false, mGattcallback);
-            mStatus = 1;
-            if (!mReconnect) {
-                mSequence = jobSequence.UNINITIALIZED;
-            }
-        } else if (mConnGatt != null) {
-            EpLog.m77i("re-connect and re-discover Services");
-            mConnGatt.close();
-            mConnGatt = mDevice.connectGatt(mContext, false, mGattcallback);
-            mConnGatt.connect();
-            mConnGatt.discoverServices();
-            if (!mReconnect) {
-                mSequence = jobSequence.INITIALIZE;
-            }
-        } else {
-            EpLog.m77i("  STATE_CONNECTING");
-            mConnGatt = mDevice.connectGatt(mContext, false, mGattcallback);
-            mStatus = 1;
-            if (!mReconnect) {
-                mSequence = jobSequence.DISCONNECTED;
-            }
-        }
-        return true;
-    }
-
-    public boolean init(@NonNull Context context, @NonNull ScannedDevice scannedDevice) {
-        mContext = context;
-        mSelectItem = scannedDevice;
-        mRetry = 0;
-        mSequence = jobSequence.UNINITIALIZED;
-        setSecurityType(0);
-        mReconnect = true;
-        mSSID = getSSID(mContext);
-        EpLog.m77i(mSSID);
-        EpLog.m71e("init");
-        return init();
-    }
-
-    public void checkPassword() {
-        EpLog.m76i();
-        String str = mDevicePassword;
-        if (!str.isEmpty()) {
-            BluetoothGattCharacteristic bluetoothGattCharacteristic = BLEUuid.GattCharsMap.get(BLEUuid.CHAR_PASSWORD_STRING);
-            bluetoothGattCharacteristic.setValue(Short.parseShort(str), 18, 0);
-            EpLog.m77i("Password write :" + str);
-            gattWriteCharacter(bluetoothGattCharacteristic);
-        }
-    }
-
-    private void gattWriteCharacter(final BluetoothGattCharacteristic bluetoothGattCharacteristic) {
-        final int[] iArr = {0};
-        handlerWrite.removeCallbacks((Runnable) null);
-        handlerWrite.postDelayed(new Runnable() {
-            public void run() {
-                if (BleWork.mConnGatt == null) {
-                    EpLog.m71e("mConnGatt  NULL !");
-                }
-                if (bluetoothGattCharacteristic == null) {
-                    EpLog.m71e("characteristic  NULL !");
-                }
-                try {
-                    if (!((BluetoothGatt) Objects.requireNonNull(BleWork.mConnGatt)).writeCharacteristic(bluetoothGattCharacteristic)) {
-                        int[] iArr = iArr;
-                        int i = iArr[0] + 1;
-                        iArr[0] = i;
-                        if (i <= 3) {
-                            EpLog.m71e("writeCharacteristic error ! retry " + iArr[0]);
-                            BleWork.this.handlerWrite.removeCallbacks((Runnable) null);
-                            BleWork.this.handlerWrite.postDelayed(this, (long) (iArr[0] * 500));
-                            return;
-                        }
-                        EpLog.m71e("writeCharacteristic error !! retry failed !!");
-                        BleWork.this.failedProcessing();
-                    }
-                } catch (NullPointerException unused) {
-                    EpLog.m71e("mConnGatt NULL !");
-                }
-            }
-        }, 0);
-    }
-
-    public void checkVersion() {
-        characteristicRead();
-    }
-
-    public void getSSIDList() {
-        mInSequence = true;
-        mSequence = jobSequence.MIB_GET_SSID_LIST;
-        EscprLib escprLib = mEscprlib;
-        MIBCommand mIBCommand = mMibCommand;
-        byte b = (byte) (mIndex + 1);
-        mIndex = b;
-        int mibGetESSIDList = escprLib.mibGetESSIDList(mIBCommand, b);
-        if (mibGetESSIDList != 0) {
-            EpLog.m71e("mibGetESSIDList ret = " + mibGetESSIDList);
-            return;
-        }
-        byte[] bArr = new byte[mMibCommand.commandBlock.bufSize];
-        System.arraycopy(mMibCommand.commandBlock.buf, 0, bArr, 0, mMibCommand.commandBlock.bufSize);
-        BluetoothGattCharacteristic bluetoothGattCharacteristic = BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SNMP_REQUEST_STRING);
-        bluetoothGattCharacteristic.setValue(bArr);
-        gattWriteCharacter(bluetoothGattCharacteristic);
-    }
-
-    private void checkSSID() {
-        try {
-            TimeUnit.SECONDS.sleep(1);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-        byte[] bytes = mSSID.getBytes(Charset.forName("UTF8"));
-        BluetoothGattCharacteristic bluetoothGattCharacteristic = BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SSID_STRING);
-        bluetoothGattCharacteristic.setValue(bytes);
-        EpLog.m77i("SSID write :" + mSSID);
-        gattWriteCharacter(bluetoothGattCharacteristic);
-    }
-
-    public void setSSIDType() {
-        mSequence = jobSequence.CHECK_SSID;
-        if (mConnGatt == null) {
-            EpLog.m71e("mConnGatt  NULL !");
-        }
-        checkSSID();
-    }
-
-    private void startSetSSID() {
-        int i;
-        EpLog.m77i("mSequence = " + mSequence + " mSSID =  " + mSSID);
-        mInSequence = false;
-        String str = "";
-        String str2 = "";
-        switch (mSequence) {
-            case MIB_GET_MACADDRESS:
-                str = "epsGetMacAddress";
-                str2 = "mibGetMacadress";
-                i = mEscprlib.mibGetMacadress(mMibCommand);
-                break;
-            case MIB_SET_SSID:
-                str = "epsWlanConfSSID";
-                str2 = "mibSetSSID";
-                EpLog.m77i("mSSID  " + mSSID);
-                if (!mSSID.isEmpty()) {
-                    i = mEscprlib.mibSetSSID(mMibCommand, mSSID);
-                    break;
-                } else {
-                    EpLog.m82w("set SSID :  empty");
-                    return;
-                }
-            case MIB_SEC_LOGIN:
-                str = "epsAdminMibAccessLoginOperation";
-                str2 = "mibSecLogin ";
-                if (mEngineID == null) {
-                    EpLog.m71e("mEngineID");
-                    failedProcessing();
-                }
-                i = mEscprlib.mibSecLogin(mMibCommand, mEngineID);
-                break;
-            case MIB_SEC_SET_PASS:
-                str = "epsWlanCommonPassPhrase";
-                str2 = "mibSecSetPass ";
-                String str3 = mSSIDPassword;
-                EpLog.m77i("mSSIDPassword  " + mSSIDPassword);
-                if (str3.isEmpty()) {
-                    EpLog.m82w("SSIDPassword is empty");
-                }
-                if (mEngineID == null) {
-                    EpLog.m71e("mEngineID");
-                    failedProcessing();
-                }
-                i = mEscprlib.mibSecSetPassword(mMibCommand, mEngineID, str3);
-                break;
-            case MIB_SEC_LOGOUT:
-                str = "epsAdminMibAccessLogOutOperation";
-                str2 = "mibSecLogout ";
-                if (mEngineID == null) {
-                    EpLog.m71e("mEngineID");
-                    failedProcessing();
-                }
-                i = mEscprlib.mibSecLogout(mMibCommand, mEngineID);
-                break;
-            case MIB_SET_SECURITY_TYPE:
-                str = "epsWlanSecurityType";
-                str2 = "mibSetSecurityType ";
-                if (mSSIDPassword == null) {
-                    mSSIDPassword = "";
-                }
-                int i2 = mSSIDPassword.isEmpty() ? 0 : 255;
-                EpLog.m77i("MIB_SET_SECURITY_TYPE SecurityType = " + i2);
-                int mibSetSecurityType = mEscprlib.mibSetSecurityType(mMibCommand, i2);
-                if (i2 == 0) {
-                    mSequence = jobSequence.MIB_SEC_SKIP;
-                }
-                i = mibSetSecurityType;
-                break;
-            case MIB_REBOOT_NW:
-                str = "epsBluetoothOperationSetupEnd";
-                str2 = "mibRebootNW  ";
-                i = mEscprlib.mibRebootNWwithBLE(mMibCommand);
-                break;
-            default:
-                i = 0;
-                break;
-        }
-        if (i != 0) {
-            EpLog.m71e(str2 + " ret = " + i);
-            sequenceError();
-            return;
-        }
-        byte[] bArr = new byte[mMibCommand.commandBlock.bufSize];
-        System.arraycopy(mMibCommand.commandBlock.buf, 0, bArr, 0, mMibCommand.commandBlock.bufSize);
-        EpLog.m77i("SNMP Request write :" + str + " mSequence   " + mSequence);
-        BluetoothGattCharacteristic bluetoothGattCharacteristic = BLEUuid.GattCharsMap.get(BLEUuid.CHAR_SNMP_REQUEST_STRING);
-        bluetoothGattCharacteristic.setValue(bArr);
-        gattWriteCharacter(bluetoothGattCharacteristic);
-    }
-
-    private void sequenceError() {
-        failedProcessing();
-    }
-
-    private void failedProcessing() {
-        disconnect();
-        if (mSequenceCallbackFailed != null) {
-            EpLog.m71e(" " + mSequence);
-            mSequenceCallbackFailed.call(mSequence);
-        }
-    }
-}

+ 0 - 958
app/src/main/java/epson/common/ble/BleWorkActivity.java

@@ -1,958 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.Handler;
-
-import android.text.Editable;
-import android.text.InputFilter;
-import android.text.Spanned;
-import android.text.TextWatcher;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.AdapterView;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-import com.epson.iprint.prtlogger.Analytics;
-import com.epson.mobilephone.common.EpLog;
-import com.epson.mobilephone.common.ble.BleWork;
-import com.epson.mobilephone.common.ble.util.BLEUtility;
-import com.epson.mobilephone.common.ble.util.ScannedDevice;
-import epson.epsonconnectregistration.ActivityECConfiguration;
-import epson.maintain.activity.PrinterNotFoundDialogCreator;
-import epson.print.ActivityIACommon;
-
-import epson.print.CommonDefine;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import org.apache.commons.lang.CharEncoding;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.time.DateUtils;
-
-public class BleWorkActivity extends ActivityIACommon {
-    private static final int CONNECT_TIME_OUT = 60000;
-    private static final int FIRST_DELAY = 10000;
-    private static final int FIRST_DELAY_SEC = 10;
-    private static final int FIRST_PROGRESS_PER = 90;
-    private static final int FIRST_PROGRESS_SEC = 90;
-    private static final int REQUEST_CODE_EPSON_CONNECT_REGISTRATION = 212;
-    private static final int SECOND_DELAY = 200000;
-    private static final int TOTAL_MARGIN_SEC = 30;
-    private static final int TOTAL_PROGRESS_SEC = 210;
-    int count = 0;
-    private boolean isAlive;
-    boolean isStopSetUpProgress = false;
-    AlertDialog mAlertDialog;
-    private BleWork mBleWork = null;
-    private CallbackWork mCompletion = null;
-    private Context mContext;
-    private DeviceAdapter mDeviceAdapter;
-    AlertDialog mDialog;
-    private CallbackWork mNext = null;
-    TextView mPercentView;
-    ProbePrinter mProbePrinter;
-    ProgressBar mProgressPercent;
-    private BLEUtility.BleWorkCallback mSequenceCallbackFailed = null;
-    private BLEUtility.BleWorkCallback mSequenceCallbackSuccess = null;
-    private Handler mTimeoutHandler;
-    private Handler mWifiSearchHandler;
-    private Runnable runnableSetUpProgress;
-    private Runnable runnableWifiSearch;
-    private Handler setUpProgressHandler;
-
-    public interface CallbackWork {
-        void call(Object obj);
-    }
-
-    protected void onCreate(Bundle bundle) {
-        EpLog.m76i();
-        super.onCreate(bundle);
-        requestWindowFeature(5);
-        setContentView((int) R.layout.activity_scan);
-        setActionBar((int) R.string.BLE_select_unconfigured_printer_title, true);
-        findViewById(R.id.progress_bar).setVisibility(8);
-        mContext = this;
-        callBackFuncs();
-        getWindow().addFlags(128);
-        mProbePrinter = ProbePrinter.create().setContext(mContext);
-        mBleWork = BleWork.getInstace();
-        mBleWork.resetSequence();
-    }
-
-    protected void onResume() {
-        ArrayList parcelableArrayListExtra;
-        super.onResume();
-        mProbePrinter.bindEpsonService();
-        EpLog.m77i("mSequence = " + BleWork.getInstace().mSequence);
-        if (mDeviceAdapter == null && BleWork.getInstace().mSequence == BleWork.jobSequence.UNINITIALIZED && (parcelableArrayListExtra = getIntent().getParcelableArrayListExtra(ScannedDevice.TYPE)) != null && parcelableArrayListExtra.size() > 0) {
-            init(parcelableArrayListExtra);
-        }
-    }
-
-    protected void onPause() {
-        super.onPause();
-        EpLog.m76i();
-    }
-
-    protected void onStart() {
-        super.onStart();
-        isAlive = true;
-    }
-
-    protected void onStop() {
-        super.onStop();
-        EpLog.m76i();
-        isAlive = false;
-        getWindow().clearFlags(128);
-    }
-
-    protected void onDestroy() {
-        super.onDestroy();
-        mProbePrinter.unbindEpsonService();
-    }
-
-    private void callBackFuncs() {
-        mCompletion = new CallbackWork() {
-            public void call(Object obj) {
-                if (!(obj instanceof Boolean)) {
-                    EpLog.m71e(" type mismatch !");
-                }
-                StringBuilder sb = new StringBuilder();
-                sb.append("result = ");
-                Boolean bool = (Boolean) obj;
-                sb.append(bool.booleanValue());
-                EpLog.m77i(sb.toString());
-                if (bool.booleanValue()) {
-                    BleWorkActivity.this.count = BleWorkActivity.TOTAL_PROGRESS_SEC;
-                    EpLog.m77i("count = " + BleWorkActivity.this.count);
-                }
-                BleWorkActivity.this.stopCallbacks();
-                if (BleWorkActivity.mAlertDialog != null && BleWorkActivity.mAlertDialog.isShowing()) {
-                    BleWorkActivity.this.runOnUiThread(new Runnable() {
-                        public void run() {
-                            EpLog.m77i("dismiss ");
-                            BleWorkActivity.mAlertDialog.dismiss();
-                            BleWorkActivity.mAlertDialog = null;
-                        }
-                    });
-                }
-                BleWorkActivity.mBleWork.resetSequence();
-                BleWorkActivity.this.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() {
-                    public void run() {
-                        EpLog.m77i("setSSID");
-                        BleWorkActivity.mBleWork.setSSID(new BLEUtility.BleWorkCallback() {
-                            public void call(Object obj) {
-                                Runnable unused = BleWorkActivity.this.runnableWifiSearch = new Runnable() {
-                                    int postCount = 0;
-
-                                    public void run() {
-                                        int i = postCount;
-                                        if (i >= 2) {
-                                            EpLog.m77i("postCount >= 2 ");
-                                            BleWorkActivity.mProbePrinter.interruptSearch();
-                                            if (BleWorkActivity.mAlertDialog != null) {
-                                                BleWorkActivity.mAlertDialog.dismiss();
-                                                BleWorkActivity.mAlertDialog = null;
-                                            }
-                                            if (BleWorkActivity.mCompletion != null) {
-                                                BleWorkActivity.mCompletion.call(false);
-                                                return;
-                                            }
-                                            return;
-                                        }
-                                        if (i == 1) {
-                                            BleWorkActivity.mProbePrinter.setMacAddress(BleWorkActivity.mBleWork.getDeviceMacAddress());
-                                            BleWorkActivity.mProbePrinter.setBleCallback(BleWorkActivity.mCompletion);
-                                            try {
-                                                BleWorkActivity.mProbePrinter.search();
-                                            } catch (IllegalStateException e) {
-                                                EpLog.m71e(e.getMessage());
-                                                BleWorkActivity.mProbePrinter.interruptSearch();
-                                                if (BleWorkActivity.mAlertDialog != null) {
-                                                    BleWorkActivity.mAlertDialog.dismiss();
-                                                    BleWorkActivity.mAlertDialog = null;
-                                                }
-                                                if (BleWorkActivity.mCompletion != null) {
-                                                    BleWorkActivity.mCompletion.call(false);
-                                                }
-                                            }
-                                        }
-                                        postCount++;
-                                        if (BleWorkActivity.mCompletion != null) {
-                                            StringBuilder sb = new StringBuilder();
-                                            sb.append("postDelayed  postCount = ");
-                                            sb.append(this.postCount);
-                                            sb.append(" delay ");
-                                            sb.append(this.postCount == 1 ? 10000 : BleWorkActivity.SECOND_DELAY);
-                                            EpLog.m77i(sb.toString());
-                                            BleWorkActivity.mWifiSearchHandler.postDelayed(this, postCount == 1 ? 10000 : 200000);
-                                        }
-                                    }
-                                };
-                                BleWorkActivity.mWifiSearchHandler.post(BleWorkActivity.this.runnableWifiSearch);
-                            }
-                        }, new BLEUtility.BleWorkCallback() {
-                            public void call(Object obj) {
-                                EpLog.m71e("BleWorkCallback");
-                                if (BleWorkActivity.mCompletion != null) {
-                                    BleWorkActivity.mCompletion.call(false);
-                                }
-                            }
-                        });
-                    }
-                });
-            }
-        };
-        mSequenceCallbackSuccess = new BLEUtility.BleWorkCallback() {
-            public void call(Object obj) {
-                BleWork.jobSequence jobsequence = (BleWork.jobSequence) obj;
-                EpLog.m77i("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();
-                }
-                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;
-                    EpLog.m77i("mAlertDialog        dismiss " + jobsequence);
-                }
-                if (jobsequence == BleWork.jobSequence.CHECK_SSID) {
-                    BleWorkActivity.this.setSSIDPassword();
-                } else if (jobsequence == BleWork.jobSequence.MIB_GET_SSID_LIST) {
-                    BleWorkActivity.this.showSSIDList();
-                }
-            }
-        };
-        mSequenceCallbackFailed = new BLEUtility.BleWorkCallback() {
-            public void call(Object obj) {
-                BleWorkActivity.this.failedDialog((BleWork.jobSequence) obj);
-            }
-        };
-    }
-
-    private void stopCallbacks() {
-        stopConnectTimeOut();
-        stopWifiSearch();
-        isStopSetUpProgress = true;
-        stopSetUpProgress();
-    }
-
-    private void stopSetUpProgress() {
-        Handler handler = setUpProgressHandler;
-        if (handler != null) {
-            handler.removeCallbacks(this.runnableSetUpProgress);
-            setUpProgressHandler = null;
-            runnableSetUpProgress = null;
-        }
-    }
-
-    private void stopWifiSearch() {
-        Handler handler = mWifiSearchHandler;
-        if (handler != null) {
-            handler.removeCallbacks(this.runnableWifiSearch);
-            mWifiSearchHandler = null;
-            runnableWifiSearch = null;
-        }
-    }
-
-    private void settingResultDailog(final boolean z) {
-        runOnUiThread(new Runnable() {
-            public void run() {
-                AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.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() {
-                        public void onClick(DialogInterface dialogInterface, int i) {
-                            Analytics.SetUpPath setUpPath;
-                            if (BleWorkActivity.this.getCallingActivity() != null) {
-                                BleWorkActivity.this.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);
-                            intent.putExtra(ActivityECConfiguration.INTENT_EC_BLE_CONTENT, true);
-                            BleWorkActivity.this.startActivityForResult(intent, BleWorkActivity.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() {
-                        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();
-                        }
-                    }).setNeutralButton(BleWorkActivity.this.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();
-                        }
-                    });
-                }
-                BleWorkActivity.mAlertDialog = cancelable.create();
-                BleWorkActivity.mAlertDialog.show();
-            }
-        });
-    }
-
-    protected void onActivityResult(int i, int i2, Intent intent) {
-        if (i == REQUEST_CODE_EPSON_CONNECT_REGISTRATION) {
-            finish();
-        }
-    }
-
-    private void waitingCommunicationDaialog() {
-        if (mAlertDialog != null) {
-            EpLog.m77i("dismiss ");
-            mAlertDialog.dismiss();
-            mAlertDialog = null;
-        }
-        isStopSetUpProgress = false;
-        mAlertDialog = new AlertDialog.Builder(mContext).setCancelable(false).create();
-        View inflate = LayoutInflater.from(mContext).inflate(R.layout.ble_progress_layout, (ViewGroup) null);
-        mAlertDialog.setView(inflate);
-        mProgressPercent = (ProgressBar) inflate.findViewById(R.id.progress_percent);
-        mProgressPercent.setVisibility(0);
-        mPercentView = (TextView) inflate.findViewById(R.id.percent);
-        mPercentView.setVisibility(0);
-        inflate.findViewById(R.id.space_upper).setVisibility(0);
-        mProgressPercent.setProgress(0);
-        mProgressPercent.setMax(100);
-        mPercentView.setText("0%");
-        mAlertDialog.setMessage(getResources().getString(R.string.BLE_wait_setup_complete_msg));
-        mAlertDialog.show();
-        count = 0;
-        stopSetUpProgress();
-        setUpProgressHandler = new Handler();
-        runnableSetUpProgress = new Runnable() {
-            public void run() {
-                int i;
-                if (BleWorkActivity.this.isStopSetUpProgress) {
-                    EpLog.m77i("☆☆runnableSetUpProgress retuen ");
-                    return;
-                }
-                EpLog.m77i("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.m71e("TIME OUT");
-                    BleWorkActivity.mCompletion.call(false);
-                    CallbackWork unused = BleWorkActivity.mCompletion = null;
-                    return;
-                }
-                if (BleWorkActivity.this.count <= 90) {
-                    i = BleWorkActivity.this.count;
-                } else {
-                    if (BleWorkActivity.this.count <= BleWorkActivity.TOTAL_PROGRESS_SEC) {
-                        i3 = BleWorkActivity.this.count;
-                    }
-                    i = (int) ((((double) (i3 - 90)) / 12.0d) + 90.0d);
-                }
-                EpLog.m77i(BleWorkActivity.this.count + "::" + i + " %");
-                BleWorkActivity.this.updateProgress(i);
-                if (!BleWorkActivity.this.isStopSetUpProgress) {
-                    BleWorkActivity.this.setUpProgressHandler.postDelayed(this, 1000);
-                }
-            }
-        };
-        setUpProgressHandler.post(this.runnableSetUpProgress);
-    }
-
-    private void updateProgress(int i) {
-        mProgressPercent.setProgress(i);
-        TextView textView = mPercentView;
-        textView.setText(i + " %");
-        mProgressPercent.invalidate();
-        mPercentView.invalidate();
-    }
-
-    private void init(ArrayList<ScannedDevice> arrayList) {
-        ListView listView = (ListView) findViewById(R.id.list);
-        Collections.sort(arrayList, new ScannedDeviceComparator());
-        mDeviceAdapter = new DeviceAdapter(this, R.layout.listitem_device, arrayList != null ? arrayList : new ArrayList<>());
-        listView.setAdapter(mDeviceAdapter);
-        if (arrayList.size() == 1) {
-            selectDevice((ScannedDevice) mDeviceAdapter.getItem(0));
-        }
-        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
-                ScannedDevice scannedDevice = (ScannedDevice) BleWorkActivity.mDeviceAdapter.getItem(i);
-                if (scannedDevice != null) {
-                    BleWorkActivity.this.selectDevice(scannedDevice);
-                }
-            }
-        });
-    }
-
-    public class ScannedDeviceComparator implements Comparator<ScannedDevice> {
-        public ScannedDeviceComparator() {
-        }
-
-        public int compare(ScannedDevice scannedDevice, ScannedDevice scannedDevice2) {
-            if (scannedDevice.getRssi() == scannedDevice2.getRssi()) {
-                return 0;
-            }
-            return scannedDevice.getRssi() < scannedDevice2.getRssi() ? 1 : -1;
-        }
-    }
-
-    private void selectDevice(@NonNull ScannedDevice scannedDevice) {
-        String displayName = scannedDevice.getDisplayName();
-        BleScanWork.getInstace().stopScan();
-        mBleWork.resetSequence();
-        mBleWork.setSequenceCallback(mSequenceCallbackSuccess, mSequenceCallbackFailed);
-        EpLog.m69d("              getInfoForConnectDialog");
-        getInfoForConnectDialog(displayName);
-        mBleWork.init(this, scannedDevice);
-    }
-
-    private void getInfoForConnectDialog(String str) {
-        mAlertDialog = new AlertDialog.Builder(this).setCancelable(false).create();
-        mAlertDialog.setView(LayoutInflater.from(mContext).inflate(R.layout.ble_progress_layout, (ViewGroup) null));
-        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()) {
-            mAlertDialog.show();
-        }
-        setConnectTimeOut();
-    }
-
-    private void setConnectTimeOut() {
-        mTimeoutHandler = new Handler();
-        mTimeoutHandler.postDelayed(new Runnable() {
-            public void run() {
-                EpLog.m71e(" 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();
-                }
-                BleWorkActivity.mBleWork.setRetryFinish();
-            }
-        }, DateUtils.MILLIS_PER_MINUTE);
-    }
-
-    private void stopConnectTimeOut() {
-        Handler handler = mTimeoutHandler;
-        if (handler != null) {
-            handler.removeCallbacksAndMessages((Object) null);
-            mTimeoutHandler = null;
-        }
-    }
-
-    private void failedDialog(final BleWork.jobSequence jobsequence) {
-        runOnUiThread(new Runnable() {
-            public void run() {
-                BleWorkActivity.this.stopCallbacks();
-                BleWork.jobSequence jobsequence = jobsequence;
-                EpLog.m77i("sequence = " + jobsequence);
-                if (BleWorkActivity.mAlertDialog != null) {
-                    BleWorkActivity.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() {
-                    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();
-                    }
-                });
-                if (BleWorkActivity.this.isAlive && !BleWorkActivity.this.isFinishing()) {
-                    BleWorkActivity.mAlertDialog = cancelable.create();
-                    BleWorkActivity.mAlertDialog.show();
-                }
-            }
-        });
-    }
-
-    private void SSIDfailedDialog(BleWork.jobSequence jobsequence) {
-        runOnUiThread(new Runnable(jobsequence) {
-            private final /* synthetic */ BleWork.jobSequence f$1;
-
-            {
-                f$1 = r2;
-            }
-
-            public final void run() {
-                BleWorkActivity.lambda$SSIDfailedDialog$1(BleWorkActivity.this, f$1);
-            }
-        });
-    }
-
-    public static /* synthetic */ void lambda$SSIDfailedDialog$1(BleWorkActivity bleWorkActivity, BleWork.jobSequence jobsequence) {
-        bleWorkActivity.stopCallbacks();
-        EpLog.m77i("sequence = " + jobsequence);
-        AlertDialog alertDialog = bleWorkActivity.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) {
-            private final /* synthetic */ boolean f$1;
-
-            {
-                f$1 = r2;
-            }
-
-            public final void onClick(DialogInterface dialogInterface, int i) {
-                BleWorkActivity.lambda$null$0(BleWorkActivity.this, f$1, dialogInterface, i);
-            }
-        });
-        if (bleWorkActivity.isAlive && !bleWorkActivity.isFinishing()) {
-            bleWorkActivity.mAlertDialog = cancelable.create();
-            bleWorkActivity.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);
-        if (z) {
-            bleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_SSID_LIST;
-            bleWorkActivity.mBleWork.setSecurityType(0);
-            bleWorkActivity.showSSIDList();
-            return;
-        }
-        bleWorkActivity.mBleWork.disconnect();
-        bleWorkActivity.finish();
-    }
-
-    private void showSSIDList() {
-        runOnUiThread(new Runnable() {
-            public void run() {
-                BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_SET_SSID;
-                BleWorkActivity.mBleWork.disconnect(false);
-                EpLog.m69d("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());
-                final String[] strArr = (String[]) ssidLis.toArray(new String[ssidLis.size()]);
-                LinearLayout linearLayout = new LinearLayout(BleWorkActivity.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.setTextSize(20.0f);
-                textView.setLayoutParams(layoutParams);
-                linearLayout.addView(textView);
-                AlertDialog.Builder cancelable = new AlertDialog.Builder(BleWorkActivity.this).setCancelable(false);
-                cancelable.setCustomTitle(linearLayout);
-                cancelable.setItems(strArr, new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialogInterface, int i) {
-                        String str = strArr[i];
-                        EpLog.m69d("select = " + str);
-                        if (i == strArr.length - 1) {
-                            BleWorkActivity.this.setSSID();
-                            return;
-                        }
-                        EpLog.m77i("☆" + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
-                        BleWorkActivity.mBleWork.setSSID(str);
-                        if (BleWorkActivity.mBleWork.mSequence == BleWork.jobSequence.DISCONNECTED || BleWorkActivity.mBleWork.mStatus == 0) {
-                            EpLog.m77i("☆☆ " + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
-                            BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.BEFORE_CHECK_SSID;
-                            BleWorkActivity.mBleWork.connect();
-                            EpLog.m69d("              getInfoForConnectDialog");
-                            BleWorkActivity.this.getInfoForConnectDialog(BleWorkActivity.mBleWork.getDeviceName());
-                            return;
-                        }
-                        EpLog.m77i("☆☆☆☆ " + BleWorkActivity.mBleWork.mSequence + "::" + BleWorkActivity.mBleWork.mStatus);
-                        BleWorkActivity.mBleWork.setSSIDType();
-                    }
-                });
-                cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.BLE_setup_abort_button), new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialogInterface, int i) {
-                        EpLog.m76i();
-                        BleWorkActivity.mBleWork.disconnect(true);
-                    }
-                });
-                cancelable.show();
-            }
-        });
-    }
-
-    private void sortSSIDlist(List<String> list) {
-        Collections.sort(list);
-        String replaceAll = BleWork.getSSID(this).toUpperCase().replaceAll(CommonDefine.UNDER_BAR, "-");
-        int i = 0;
-        while (true) {
-            if (i >= list.size()) {
-                i = -1;
-                break;
-            }
-            String replaceAll2 = list.get(i).toUpperCase().replaceAll(CommonDefine.UNDER_BAR, "-");
-            if (replaceAll2.replaceAll("-A$", "-G").equals(replaceAll) || replaceAll2.replaceFirst("-A-", "-G-").equals(replaceAll) || replaceAll.replaceAll("-5G$", "").equals(replaceAll2) || replaceAll.replaceAll("-5GHZ$", "").equals(replaceAll2)) {
-                break;
-            }
-            i++;
-        }
-        if (i > 0) {
-            list.add(0, list.get(i));
-            list.remove(i + 1);
-        }
-    }
-
-    private void setSSID() {
-        runOnUiThread(new Runnable() {
-            public void run() {
-                EpLog.m77i("inputs = ");
-                final EditText editText = new EditText(BleWorkActivity.this);
-                editText.setInputType(33);
-                editText.setFilters(BleWorkActivity.this.getInputFilters(100));
-                editText.addTextChangedListener(new TextWatcher() {
-                    public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
-                    }
-
-                    public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
-                    }
-
-                    public void afterTextChanged(Editable editable) {
-                        EpLog.m77i("afterTextChanged " + editable);
-                        BleWorkActivity.this.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));
-                cancelable.setView(editText);
-                cancelable.setPositiveButton(BleWorkActivity.this.getString(R.string.ok_button), new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialogInterface, int i) {
-                        EpLog.m77i(editText.getText().toString());
-                        BleWorkActivity.mBleWork.setSSID(editText.getText().toString());
-                        BleWorkActivity.mBleWork.setSecurityType(255);
-                        BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.SET_PASSWORD;
-                        BleWorkActivity.this.setSSIDPassword();
-                    }
-                });
-                cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.no_button), new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialogInterface, int i) {
-                        EpLog.m76i();
-                        ((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();
-                            return;
-                        }
-                        BleWorkActivity.mBleWork.disconnect();
-                    }
-                });
-                if (!BleWorkActivity.this.isFinishing()) {
-                    BleWorkActivity.mDialog = cancelable.create();
-                    BleWorkActivity.mDialog.show();
-                    BleWorkActivity.mDialog.getButton(-1).setEnabled(false);
-                }
-            }
-        });
-    }
-
-    private void setSSIDPassword() {
-        EpLog.m76i();
-        if (!mBleWork.getSSIDPassword().isEmpty() || mBleWork.getSecurityType() == 1 || (mBleWork.getSecurityType() == 255 && mBleWork.mSequence != BleWork.jobSequence.SET_PASSWORD)) {
-            runOnUiThread(new Runnable() {
-                public void run() {
-                    EpLog.m77i("password mNext");
-                    BleWorkActivity.mNext.call("");
-                    if (BleWorkActivity.this.setUpProgressHandler == null && BleWorkActivity.this.runnableSetUpProgress == null) {
-                        if (BleWorkActivity.mAlertDialog != null) {
-                            BleWorkActivity.mAlertDialog.dismiss();
-                            BleWorkActivity.mAlertDialog = null;
-                        }
-                        EpLog.m69d("waitingCommunicationDaialog");
-                        BleWorkActivity.this.waitingCommunicationDaialog();
-                    }
-                }
-            });
-        } else {
-            runOnUiThread(new Runnable() {
-                public void run() {
-                    EpLog.m77i("inputs = ");
-                    final short securityType = BleWorkActivity.mBleWork.getSecurityType();
-                    if (securityType == 7 || securityType == 10) {
-                        BleWorkActivity bleWorkActivity = BleWorkActivity.this;
-                        bleWorkActivity.SSIDfailedDialog(bleWorkActivity.mBleWork.mSequence);
-                        return;
-                    }
-                    final EditText editText = new EditText(BleWorkActivity.this);
-                    editText.setInputType(33);
-                    editText.setFilters(BleWorkActivity.this.getInputFilters(securityType));
-                    editText.addTextChangedListener(new TextWatcher() {
-                        public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
-                        }
-
-                        public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
-                        }
-
-                        public void afterTextChanged(Editable editable) {
-                            EpLog.m77i("afterTextChanged " + editable);
-                            BleWorkActivity.this.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;
-                    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() {
-                        public void onClick(DialogInterface dialogInterface, int i) {
-                            EpLog.m77i(editText.getText().toString());
-                            BleWorkActivity.mBleWork.setSSIDPassword(editText.getText().toString());
-                            BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.MIB_GET_MACADDRESS;
-                            BleWorkActivity.mBleWork.connect();
-                            BleWorkActivity.this.setConnectTimeOut();
-                            EpLog.m69d("waitingCommunicationDaialog");
-                            BleWorkActivity.this.waitingCommunicationDaialog();
-                            ((InputMethodManager) BleWorkActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(editText.getWindowToken(), 2);
-                        }
-                    });
-                    cancelable.setNegativeButton(BleWorkActivity.this.getString(R.string.no_button), new DialogInterface.OnClickListener() {
-                        public void onClick(DialogInterface dialogInterface, int i) {
-                            EpLog.m76i();
-                            ((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();
-                                return;
-                            }
-                            BleWorkActivity.mBleWork.disconnect();
-                        }
-                    });
-                    if (!BleWorkActivity.this.isFinishing()) {
-                        BleWorkActivity.mDialog = cancelable.create();
-                        BleWorkActivity.mDialog.show();
-                        Button button = BleWorkActivity.mDialog.getButton(-1);
-                        if (securityType != 255) {
-                            z = false;
-                        }
-                        button.setEnabled(z);
-                    }
-                    EpLog.m69d("sequence = " + BleWorkActivity.mBleWork.mSequence);
-                    BleWorkActivity.mBleWork.mSequence = BleWork.jobSequence.AFTER_SETTING_PASSWORD;
-                    BleWorkActivity.mBleWork.disconnect(false);
-                    EpLog.m69d("sequence = " + BleWorkActivity.mBleWork.mSequence);
-                }
-            });
-        }
-    }
-
-    /* access modifiers changed from: private */
-    @NonNull
-    public InputFilter[] getInputFilters(int i) {
-        int i2 = 26;
-        if (i != 7) {
-            if (i != 100) {
-                switch (i) {
-                    case 2:
-                    case 4:
-                        break;
-                    case 3:
-                        i2 = 10;
-                        break;
-                    case 5:
-                        break;
-                    default:
-                        switch (i) {
-                            case 9:
-                            case 10:
-                            case 11:
-                                break;
-                            default:
-                                i2 = 63;
-                                break;
-                        }
-                }
-            } else {
-                i2 = 32;
-            }
-            return new InputFilter[]{new InputFilter.LengthFilter(i2), new PasswordFilter(i)};
-        }
-        i2 = 63;
-        return new InputFilter[]{new InputFilter.LengthFilter(i2), new PasswordFilter(i)};
-    }
-
-    class PasswordFilter implements InputFilter {
-        int filterType;
-
-        PasswordFilter(int i) {
-            filterType = i;
-        }
-
-        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
-            String charSequence2 = charSequence.toString();
-            if (charSequence2.contains(" ")) {
-                return StringUtils.deleteWhitespace(charSequence2);
-            }
-            try {
-                charSequence = charSequence2.replace(new String(new byte[]{-62, -91}, CharEncoding.UTF_8), new String("\\".getBytes(), CharEncoding.UTF_8));
-            } catch (UnsupportedEncodingException e) {
-                EpLog.m71e(e.getMessage());
-            }
-            if (charSequence.toString().matches("^[a-zA-Z0-9!-/:-@\\[-\\`\\{-\\~]+$")) {
-                return charSequence;
-            }
-            EpLog.m77i("in NG");
-            return "";
-        }
-    }
-
-    /* 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");
-    }
-}

+ 0 - 90
app/src/main/java/epson/common/ble/DeviceAdapter.java

@@ -1,90 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-import android.bluetooth.BluetoothDevice;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.drawable.Drawable;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-import com.epson.mobilephone.common.EpLog;
-import com.epson.mobilephone.common.ble.util.ScannedDevice;
-
-import epson.print.IprintApplication;
-import java.util.Iterator;
-import java.util.List;
-
-public class DeviceAdapter extends ArrayAdapter<ScannedDevice> {
-    private static final String PREFIX_RSSI = "RSSI:";
-    private LayoutInflater mInflater;
-    private List<ScannedDevice> mList;
-    private int mResId;
-
-    public DeviceAdapter(Context context, int i, List<ScannedDevice> list) {
-        super(context, i, list);
-        mResId = i;
-        mList = list;
-        mInflater = (LayoutInflater) context.getSystemService("layout_inflater");
-    }
-
-    public View getView(int i, View view, ViewGroup viewGroup) {
-        ScannedDevice scannedDevice = (ScannedDevice) getItem(i);
-        if (view == null) {
-            view = mInflater.inflate(mResId, (ViewGroup) null);
-        }
-        TextView textView = (TextView) view.findViewById(R.id.device_name);
-        textView.setText(scannedDevice.getDisplayName());
-        if (IprintApplication.isReleaseUnlimited()) {
-            ((TextView) view.findViewById(R.id.device_address)).setText(scannedDevice.getDevice().getAddress());
-            TextView textView2 = (TextView) view.findViewById(R.id.device_rssi);
-            textView2.setText(PREFIX_RSSI + Integer.toString(scannedDevice.getRssi()));
-            textView2.setTextColor(-3355444);
-        } else {
-            view.findViewById(R.id.device_address).setVisibility(8);
-            view.findViewById(R.id.device_rssi).setVisibility(8);
-            textView.setPadding(0, 20, 0, 20);
-        }
-        ((ImageView) view.findViewById(R.id.signal)).setImageDrawable(getThresholdIcon(scannedDevice.getRssi()));
-        return view;
-    }
-
-    private Drawable getThresholdIcon(int i) {
-        Resources resources = getContext().getResources();
-        int i2 = R.C2136drawable.signal_1;
-        if (i >= -60) {
-            EpLog.m77i("HIGH_SIGNAL");
-            i2 = R.C2136drawable.signal_3;
-        } else if (i >= -70) {
-            EpLog.m77i("MID_SIGNAL");
-            i2 = R.C2136drawable.signal_2;
-        } else if (i >= -75) {
-            EpLog.m77i("LOW_SIGNAL");
-        }
-        return resources.getDrawable(i2);
-    }
-
-    public void update(BluetoothDevice bluetoothDevice, int i, String str, byte[] bArr) {
-        if (bluetoothDevice != null && bluetoothDevice.getAddress() != null) {
-            boolean z = false;
-            Iterator<ScannedDevice> it = mList.iterator();
-            while (true) {
-                if (!it.hasNext()) {
-                    break;
-                }
-                ScannedDevice next = it.next();
-                if (bluetoothDevice.getAddress().equals(next.getDevice().getAddress())) {
-                    z = true;
-                    next.setRssi(i);
-                    break;
-                }
-            }
-            if (!z) {
-                mList.add(new ScannedDevice(bluetoothDevice, i, str, bArr));
-            }
-            notifyDataSetChanged();
-        }
-    }
-}

+ 0 - 347
app/src/main/java/epson/common/ble/ProbePrinter.java

@@ -1,347 +0,0 @@
-package com.epson.mobilephone.common.ble;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-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.EpLog;
-import com.epson.mobilephone.common.ble.BleWorkActivity;
-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.service.EpsonService;
-import epson.print.service.IEpsonService;
-import epson.print.service.IEpsonServiceCallback;
-import epson.scan.lib.EscanLibException;
-import epson.scan.lib.ScanSettingHelper;
-import epson.scan.lib.escanLib;
-import java.io.IOException;
-
-public class ProbePrinter {
-    static final int PROBE_TIMEOUT_SEC = 180;
-    private static final Object lock = new Object();
-    private static escanLib mScanner = new escanLib();
-    private final int BIND_SERVICE = 17;
-    private final int CANCEL_FIND_PRINTER = 2;
-    private final int DELAY = 100;
-    private final int SEARCH_PRINTER = 1;
-    private final int SELECT_PRINTER = 4;
-    private BleWorkActivity.CallbackWork completion;
-    private Context context;
-    private volatile boolean isPrinterFound;
-    private IEpsonServiceCallback mCallback = new IEpsonServiceCallback.Stub() {
-        public void onGetStatusState() throws RemoteException {
-            EpLog.m76i();
-        }
-
-        public void onGetInkState() throws RemoteException {
-            EpLog.m76i();
-        }
-
-        public void onFindPrinterResult(String str, String str2, String str3, String str4, String str5) throws RemoteException {
-            EpLog.m77i("find      :" + str + ":" + str2 + ":★" + str3 + "★:" + str4);
-            if (str.contains("FINISH")) {
-                EpLog.m77i(" !!  FINISH  !!");
-                if (!ProbePrinter.this.isPrinterFound) {
-                    ProbePrinter.this.unbindEpsonService();
-                    EpLog.m77i(" !!  確認失敗  !!");
-                    ProbePrinter.this.callbackCompletion(false);
-                }
-            } else if (str3.contains(ProbePrinter.macAddress)) {
-                EpLog.m77i(" !!  FIND    OK    !! :" + ProbePrinter.macAddress + ": ◆");
-                boolean unused = ProbePrinter.this.isPrinterFound = true;
-                MyPrinter myPrinter = new MyPrinter(str, str2, str3, str4);
-                Message obtainMessage = ProbePrinter.mHandler.obtainMessage();
-                obtainMessage.obj = myPrinter;
-                obtainMessage.what = 4;
-                ProbePrinter.mHandler.sendMessage(obtainMessage);
-                ProbePrinter.mHandler.sendEmptyMessageDelayed(2, 100);
-            }
-        }
-
-        public void onNotifyProgress(int i, int i2) throws RemoteException {
-            EpLog.m76i();
-        }
-
-        public void onNotifyContinueable(int i) throws RemoteException {
-            EpLog.m76i();
-        }
-
-        public void onNotifyError(int i, int i2, boolean z) throws RemoteException {
-            EpLog.m76i();
-        }
-
-        public void onNotifyEndJob(int i) throws RemoteException {
-            EpLog.m76i();
-        }
-    };
-    private ServiceConnection mEpsonConnection = new ServiceConnection() {
-        public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
-            EpLog.m76i();
-            IEpsonService unused = ProbePrinter.mEpsonService = IEpsonService.Stub.asInterface(iBinder);
-            if (ProbePrinter.mEpsonService != null) {
-                try {
-                    ProbePrinter.mEpsonService.registerCallback(ProbePrinter.mCallback);
-                } catch (RemoteException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-
-        public void onServiceDisconnected(ComponentName componentName) {
-            EpLog.m77i("ComponentName " + componentName);
-            IEpsonService unused = ProbePrinter.mEpsonService = null;
-        }
-    };
-    private IEpsonService mEpsonService;
-    private Handler mHandler = new Handler(new Handler.Callback() {
-        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]);
-            } else if (i != 17) {
-                switch (i) {
-                    case 1:
-                        try {
-                            ProbePrinter.this.search();
-                            break;
-                        } catch (IllegalStateException e) {
-                            EpLog.m71e(e.getMessage());
-                            break;
-                        }
-                    case 2:
-                        ProbePrinter.this.interruptSearch();
-                        break;
-                    default:
-                        EpLog.m77i("not handled (" + message.what + ")");
-                        break;
-                }
-            } else {
-                ProbePrinter.this.bindEpsonService();
-            }
-            return false;
-        }
-    });
-    private String macAddress;
-
-    private ProbePrinter() {
-    }
-
-    public static ProbePrinter create() {
-        return new ProbePrinter();
-    }
-
-    public ProbePrinter setContext(Context context2) {
-        context = context2;
-        return this;
-    }
-
-    public ProbePrinter setMacAddress(String str) {
-        EpLog.m69d("★" + str + "★ ");
-        macAddress = str;
-        return this;
-    }
-
-    public ProbePrinter setBleCallback(BleWorkActivity.CallbackWork callbackWork) {
-        completion = callbackWork;
-        return this;
-    }
-
-    public void search() throws IllegalStateException {
-        String str;
-        if (mEpsonService == null || completion == null || (str = macAddress) == null || str.length() != 12 || completion == null) {
-            EpLog.m71e("Required field is not set.");
-            throw new IllegalStateException("Required field is not set.");
-        }
-        Context context2 = context;
-        context2.bindService(new Intent(context2, EpsonService.class), mEpsonConnection, 1);
-        try {
-            synchronized (lock) {
-                isPrinterFound = false;
-            }
-            EpLog.m69d("mEpsonService.searchPrinters");
-            mEpsonService.setTimeOut(180);
-            mEpsonService.searchPrinters((String) null, (String) null, 1);
-        } catch (RemoteException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void interruptSearch() {
-        EpLog.m68d();
-        mHandler.removeMessages(1);
-        if (mEpsonService != null) {
-            try {
-                EpLog.m77i("cancelSearchPrinter");
-                mEpsonService.cancelSearchPrinter();
-            } catch (RemoteException e) {
-                e.printStackTrace();
-            }
-        }
-        unbindEpsonService();
-    }
-
-    public void bindEpsonService() {
-        if (mEpsonService == null) {
-            Context context2 = context;
-            context2.bindService(new Intent(context2, EpsonService.class), mEpsonConnection, 1);
-        }
-        if (mEpsonService == null) {
-            EpLog.m71e("mEpsonService NULL");
-            mHandler.sendEmptyMessageDelayed(17, 1000);
-            return;
-        }
-        EpLog.m77i("bindEpsonService OK !!");
-    }
-
-    private void unbindEpsonService() {
-        EpLog.m76i();
-        if (mEpsonService != null) {
-            if (!this.isPrinterFound) {
-                mHandler.sendEmptyMessageDelayed(2, 200);
-                EpLog.m77i("1");
-            }
-            try {
-                EpLog.m77i(ExifInterface.GPS_MEASUREMENT_2D);
-                EpLog.m77i("unregisterCallback");
-                mEpsonService.unregisterCallback(mCallback);
-                context.unbindService(mEpsonConnection);
-                mEpsonService = null;
-            } catch (RemoteException unused) {
-                EpLog.m71e("unregisterCallback   mEpsonService");
-            }
-            EpLog.m77i(ExifInterface.GPS_MEASUREMENT_3D);
-        }
-    }
-
-    private void callbackCompletion(boolean z) {
-        BleWorkActivity.CallbackWork callbackWork = completion;
-        if (callbackWork != null) {
-            callbackWork.call(Boolean.valueOf(z));
-            completion = null;
-        }
-    }
-
-    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);
-    }
-
-    private class printerProbeTask extends AsyncTask<Void, Void, Integer> {
-        private Context mContext;
-        private MyPrinter mMyPrinter;
-        private MaintainPrinter2 mPrinter = MaintainPrinter2.getInstance();
-
-        public printerProbeTask(Context context, MyPrinter myPrinter) {
-            mContext = context;
-            mMyPrinter = myPrinter;
-        }
-
-        protected void onPreExecute() {
-            super.onPreExecute();
-        }
-
-        protected Integer doInBackground(Void... voidArr) {
-            int doProbePrinter = mPrinter.doProbePrinter(60, mMyPrinter.getPrinterId(), mMyPrinter.getIp(), 3);
-            if (doProbePrinter != 0) {
-                return Integer.valueOf(doProbePrinter);
-            }
-            mPrinter.setMSearchPos(0);
-            int doSetPrinter = mPrinter.doSetPrinter();
-            if (doSetPrinter != 0) {
-                return Integer.valueOf(doSetPrinter);
-            }
-            mMyPrinter.setLang(mPrinter.doGetLang());
-            ExternalFileUtils instance = ExternalFileUtils.getInstance(mContext);
-            instance.createTempFolder(instance.getSupportedMediaDir());
-            int epsWrapperGetSupportedMedia = mPrinter.getMEscpLib().epsWrapperGetSupportedMedia(ExternalFileUtils.getInstance(mContext).getSupportedMediaDir());
-            if (epsWrapperGetSupportedMedia != 0) {
-                return Integer.valueOf(epsWrapperGetSupportedMedia);
-            }
-            try {
-                Utils.copyFile(instance.getSupportedMedia(), instance.getSavedSupportedMedia());
-                EpLog.m77i("Success epsWrapperGetSupportedMedia");
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-            try {
-                Utils.copyFile(instance.getAreaInfo(), instance.getSavedAreaInfo());
-                EpLog.m77i("Success copy AreaInfo");
-            } catch (IOException e2) {
-                e2.printStackTrace();
-            }
-            return Integer.valueOf(epsWrapperGetSupportedMedia);
-        }
-
-        protected void onPostExecute(Integer num) {
-            super.onPostExecute(num);
-            if (num.intValue() == 0) {
-                ProbePrinter.this.selectPrinter(mMyPrinter);
-                ProbePrinter.this.callbackCompletion(true);
-                return;
-            }
-            ProbePrinter.this.callbackCompletion(false);
-        }
-    }
-
-    private class scanProbeTask extends AsyncTask<Context, Void, Context> {
-        private MyPrinter mPrinter;
-
-        scanProbeTask(MyPrinter myPrinter) {
-            mPrinter = myPrinter;
-        }
-
-        protected Context doInBackground(Context... contextArr) {
-            boolean z;
-            Context applicationContext = contextArr[0].getApplicationContext();
-            EpLog.m77i("スキャナ検索処理");
-            int escanWrapperInitDriver = ProbePrinter.mScanner.escanWrapperInitDriver(applicationContext);
-            if (escanWrapperInitDriver == -1050) {
-                z = true;
-            } else if (escanWrapperInitDriver != 0) {
-                EpLog.m77i("Scan 機能不明");
-                return contextArr[0];
-            } else {
-                z = false;
-            }
-            try {
-                ScanSettingHelper.recodeScannerInfo(ProbePrinter.mScanner, applicationContext, mPrinter);
-                EpLog.m77i("Scan 機能あり");
-                if (!z) {
-                    ProbePrinter.mScanner.escanWrapperReleaseDriver();
-                }
-                EpLog.m77i("YYY");
-                return contextArr[0];
-            } catch (EscanLibException | IOException unused) {
-                EpLog.m77i("Scan 機能なし");
-                Context context = contextArr[0];
-                if (!z) {
-                    ProbePrinter.mScanner.escanWrapperReleaseDriver();
-                }
-                return context;
-            } catch (Throwable th) {
-                if (!z) {
-                    ProbePrinter.mScanner.escanWrapperReleaseDriver();
-                }
-                throw th;
-            }
-        }
-
-        protected void onPostExecute(Context context) {
-            super.onPostExecute(context);
-            EpLog.m77i("スキャナ検索onPostExecute");
-            ProbePrinter.this.callbackCompletion(true);
-        }
-    }
-}

+ 0 - 86
app/src/main/java/epson/common/ble/util/BLEUtility.java

@@ -1,86 +0,0 @@
-package com.epson.mobilephone.common.ble.util;
-
-import android.app.Service;
-import android.bluetooth.BluetoothManager;
-import android.content.Context;
-
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import com.epson.mobilephone.common.EpLog;
-
-public class BLEUtility {
-    public static final int GATT_BUSY = 132;
-    public static final int GATT_DB_FULL = 131;
-    public static final int GATT_INTERNAL_ERROR = 129;
-    public static final int GATT_WRONG_STATE = 130;
-
-    public interface BleWorkCallback {
-        void call(Object obj);
-    }
-
-    private BLEUtility() {
-    }
-
-    public static boolean isBLESupported(Context context) {
-        return context.getPackageManager().hasSystemFeature("android.hardware.bluetooth_le");
-    }
-
-    public static BluetoothManager getManager(Context context) {
-        return (BluetoothManager) context.getSystemService(Service.WIFI_SERVICE);
-    }
-
-    @NonNull
-    public static String IntToHex2(int i) {
-        return new String(new char[]{Character.forDigit((i >> 4) & 15, 16), Character.forDigit(i & 15, 16)}).toUpperCase();
-    }
-
-    public static boolean isThreadAliveParentGroup(String str) {
-        if (str == null) {
-            return false;
-        }
-        ThreadGroup parent = Thread.currentThread().getThreadGroup().getParent();
-        Thread[] threadArr = new Thread[parent.activeCount()];
-        parent.enumerate(threadArr, true);
-        int length = threadArr.length;
-        int i = 0;
-        while (i < length) {
-            Thread thread = threadArr[i];
-            if (thread == null || !thread.getName().equals(str) || !thread.isAlive()) {
-                i++;
-            } else {
-                EpLog.m69d("" + thread);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Nullable
-    public static Thread getThread(String str) {
-        if (str == null) {
-            return null;
-        }
-        Thread.currentThread();
-        Thread[] threadArr = new Thread[Thread.activeCount()];
-        Thread.enumerate(threadArr);
-        int length = threadArr.length;
-        int i = 0;
-        while (i < length) {
-            Thread thread = threadArr[i];
-            if (thread == null || !thread.getName().equals(str)) {
-                i++;
-            } else {
-                EpLog.m77i("find thread : " + str);
-                return thread;
-            }
-        }
-        return null;
-    }
-
-    public static boolean isThreadAlive(String str) {
-        Thread thread = getThread(str);
-        return thread != null && thread.isAlive();
-    }
-}

+ 0 - 36
app/src/main/java/epson/common/ble/util/BLEUuid.java

@@ -1,36 +0,0 @@
-package com.epson.mobilephone.common.ble.util;
-
-import android.bluetooth.BluetoothGattCharacteristic;
-import java.util.HashMap;
-import java.util.Map;
-
-public class BLEUuid {
-    public static final String AD_UUID = "802A0000-4EF4-4E59-B573-2B2A00004EF4";
-    public static final String CHAR_ALERT_LEVEL = "00002a06-0000-1000-8000-00805f9b34fb";
-    public static final String CHAR_DEVICE_NAME_STRING = "00002a00-0000-1000-8000-00805f9b34fb";
-    public static final String CHAR_MANUFACTURER_NAME_STRING = "00002a29-0000-1000-8000-00805f9b34fb";
-    public static final String CHAR_MODEL_NUMBER_STRING = "00002a24-0000-1000-8000-00805f9b34fb";
-    public static final String CHAR_PASSWORD_STRING = "802a0001-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CHAR_SECURITY_TYPE_STRING = "802a0007-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CHAR_SERIAL_NUMBEAR_STRING = "00002a25-0000-1000-8000-00805f9b34fb";
-    public static final String CHAR_SNMP_REQUEST_STRING = "802a0003-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CHAR_SNMP_RESPONSE_STRING = "802a0005-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CHAR_SNMP_STATUS_STRING = "802a0004-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CHAR_SSID_STRING = "802a0006-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CHAR_VERSION_STRING = "802a0002-4ef4-4e59-b573-2bed4a4ac158";
-    public static final String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
-    public static Map<String, BluetoothGattCharacteristic> GattCharsMap = new HashMap();
-    public static final String SERVICE_DEVICE_INFORMATION = "0000180a-0000-1000-8000-00805f9b34fb";
-    public static final String SERVICE_IMMEDIATE_ALERT = "00001802-0000-1000-8000-00805f9b34fb";
-    public static final String SERVICE_SNMP = "802a0000-4ef4-4e59-b573-2bed4a4ac158";
-
-    static {
-        GattCharsMap.put(CHAR_PASSWORD_STRING, (Object) null);
-        GattCharsMap.put(CHAR_VERSION_STRING, (Object) null);
-        GattCharsMap.put(CHAR_SNMP_REQUEST_STRING, (Object) null);
-        GattCharsMap.put(CHAR_SNMP_STATUS_STRING, (Object) null);
-        GattCharsMap.put(CHAR_SNMP_RESPONSE_STRING, (Object) null);
-        GattCharsMap.put(CHAR_SSID_STRING, (Object) null);
-        GattCharsMap.put(CHAR_SECURITY_TYPE_STRING, (Object) null);
-    }
-}

+ 0 - 85
app/src/main/java/epson/common/ble/util/ScannedDevice.java

@@ -1,85 +0,0 @@
-package com.epson.mobilephone.common.ble.util;
-
-import android.bluetooth.BluetoothDevice;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class ScannedDevice implements Parcelable {
-    public static final Parcelable.Creator<ScannedDevice> CREATOR = new Parcelable.Creator<ScannedDevice>() {
-        public ScannedDevice createFromParcel(Parcel parcel) {
-            return new ScannedDevice(parcel);
-        }
-
-        public ScannedDevice[] newArray(int i) {
-            return new ScannedDevice[i];
-        }
-    };
-    public static final int HIGH_SIGNAL = -60;
-    public static final int INVALID_SIGNAL = 127;
-    public static final int LOW_SIGNAL = -75;
-    public static final int MID_SIGNAL = -70;
-    public static final String TYPE = "ScannedDevice";
-    private static final String UNKNOWN = "Unknown";
-    private BluetoothDevice mDevice;
-    private String mDisplayName;
-    private byte[] mHardwareType;
-    private int mRssi;
-
-    public int describeContents() {
-        return 0;
-    }
-
-    protected ScannedDevice(Parcel parcel) {
-        mDevice = (BluetoothDevice) parcel.readParcelable(BluetoothDevice.class.getClassLoader());
-        mRssi = parcel.readInt();
-        mDisplayName = parcel.readString();
-        mHardwareType = parcel.createByteArray();
-    }
-
-    public void writeToParcel(Parcel parcel, int i) {
-        parcel.writeParcelable(mDevice, i);
-        parcel.writeInt(mRssi);
-        parcel.writeString(mDisplayName);
-        parcel.writeByteArray(mHardwareType);
-    }
-
-    public ScannedDevice(BluetoothDevice bluetoothDevice, int i, String str, byte[] bArr) {
-        if (bluetoothDevice != null) {
-            mDevice = bluetoothDevice;
-            if (Build.VERSION.SDK_INT >= 21) {
-                mDisplayName = str;
-            } else {
-                mDisplayName = mDevice.getName();
-            }
-            String str2 = mDisplayName;
-            if (str2 == null || str2.length() == 0) {
-                mDisplayName = UNKNOWN;
-            }
-            mRssi = i;
-            mHardwareType = bArr;
-            return;
-        }
-        throw new IllegalArgumentException("BluetoothDevice is null");
-    }
-
-    public BluetoothDevice getDevice() {
-        return mDevice;
-    }
-
-    public int getRssi() {
-        return mRssi;
-    }
-
-    public void setRssi(int i) {
-        mRssi = i;
-    }
-
-    public byte[] getHardwareType() {
-        return mHardwareType;
-    }
-
-    public String getDisplayName() {
-        return mDisplayName;
-    }
-}

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

@@ -1,9 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EPS_LAYOUTSIZE_INFO {
-    EPS_LAYOUT_INFO[] layoutList = null;
-    int mediaSizeID = -1;
-    int numLayouts = 0;
-    int paperHeight = 0;
-    int paperWidth = 0;
-}

+ 0 - 6
app/src/main/java/epson/common/escpr/EPS_LAYOUT_INFO.java

@@ -1,6 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EPS_LAYOUT_INFO {
-    int layout = -1;
-    EPS_MARGIN margin = new EPS_MARGIN();
-}

+ 0 - 8
app/src/main/java/epson/common/escpr/EPS_MARGIN.java

@@ -1,8 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EPS_MARGIN {
-    int bottom = 0;
-    int left = 0;
-    int right = 0;
-    int top = 0;
-}

+ 0 - 6
app/src/main/java/epson/common/escpr/EPS_PRINT_AREA_INFO.java

@@ -1,6 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EPS_PRINT_AREA_INFO {
-    int numSizes = 0;
-    EPS_LAYOUTSIZE_INFO[] sizeList = null;
-}

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

@@ -1,9 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EPS_REDYINKINFO {
-    public int emaStatus;
-    public int subscriptionError;
-    public int subscriptionErrorCode;
-    public int subscriptionMode;
-    public int subscriptionStatus;
-}

+ 0 - 56
app/src/main/java/epson/common/escpr/EscprDef.java

@@ -1,56 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EscprDef {
-    public static final int EPS_BATTERY_NUM = 5;
-    static final int EPS_BK1PRINT_ACCEPTED = 2;
-    static final int EPS_BK1PRINT_NONE = 255;
-    static final int EPS_BK1PRINT_NOTACCEPTED = 1;
-    static final int EPS_BK1PRINT_UNCONFIRMED = 0;
-    public static final int EPS_CM_COLOR = 0;
-    public static final int EPS_CM_MONOCHROME = 1;
-    public static final int EPS_CM_SEPIA = 2;
-    public static final int EPS_DUPLEX_LONG = 1;
-    public static final int EPS_DUPLEX_NONE = 0;
-    public static final int EPS_DUPLEX_SHORT = 2;
-    public static final int EPS_FEEDDIR_LANDSCAPE = 1;
-    public static final int EPS_FEEDDIR_PORTRAIT = 0;
-    public static final int EPS_LANG_ESCPAGE = 2;
-    public static final int EPS_LANG_ESCPAGE_COLOR = 3;
-    public static final int EPS_LANG_ESCPAGE_S = 4;
-    public static final int EPS_LANG_ESCPR = 1;
-    public static final int EPS_LANG_PCL = 6;
-    public static final int EPS_LANG_PCL_COLOR = 5;
-    public static final int EPS_LANG_UNKNOWN = 0;
-    public static final int EPS_MLID_BORDERLESS = 1;
-    public static final int EPS_MLID_BORDERS = 2;
-    public static final int EPS_MLID_CDLABEL = 4;
-    public static final int EPS_MLID_CUSTOM = 0;
-    public static final int EPS_MLID_DIVIDE16 = 8;
-    public static final int EPS_MPID_ALL_ESCPAGE = 32870;
-    public static final int EPS_MPID_ALL_ESCPR = 1023;
-    public static final int EPS_MPID_AUTO = 128;
-    public static final int EPS_MPID_CDTRAY = 8;
-    public static final int EPS_MPID_FRONT1 = 2;
-    public static final int EPS_MPID_FRONT2 = 4;
-    public static final int EPS_MPID_FRONT3 = 32;
-    public static final int EPS_MPID_FRONT4 = 64;
-    public static final int EPS_MPID_MANUAL = 16;
-    public static final int EPS_MPID_MANUAL2 = 512;
-    public static final int EPS_MPID_MPTRAY = 32768;
-    public static final int EPS_MPID_NOT_SPEC = 0;
-    public static final int EPS_MPID_REAR = 1;
-    public static final int EPS_MPID_REARMANUAL = 16;
-    public static final int EPS_MPID_ROLL = 256;
-    public static final int EPS_MQID_ALL = 135;
-    public static final int EPS_MQID_BEST = 16;
-    public static final int EPS_MQID_BEST_PLAIN = 128;
-    public static final int EPS_MQID_DRAFT = 1;
-    public static final int EPS_MQID_HIGH = 4;
-    public static final int EPS_MQID_NORMAL = 2;
-    public static final int EPS_MQID_STANDARD_VIVID = 64;
-    public static final int EPS_MQID_SUPER_HIGH = 8;
-    public static final int EPS_MQID_UNKNOWN = 0;
-    public static final int EPS_MTID_HAGAKIINKJET = 28;
-    public static final byte EPS_PF_IPRINT_ANDROID = 8;
-    public static final byte EPS_PF_OTHER_ANDROID = 10;
-}

+ 0 - 188
app/src/main/java/epson/common/escpr/EscprError.java

@@ -1,188 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class EscprError {
-    public static final int EPS_ERR_2ND_OPEN_IO = -1103;
-    public static final int EPS_ERR_CAN_NOT_RESET = -1650;
-    public static final int EPS_ERR_COMM_ERROR = -1100;
-    public static final int EPS_ERR_FIND_NOT_STARTED = -1305;
-    public static final int EPS_ERR_INVALID_CALL = -1012;
-    public static final int EPS_ERR_INVALID_DATATYPE = -1014;
-    public static final int EPS_ERR_INVALID_VERSION = -1013;
-    public static final int EPS_ERR_INV_APF_ACT = -1431;
-    public static final int EPS_ERR_INV_APF_RDE = -1433;
-    public static final int EPS_ERR_INV_APF_SHP = -1432;
-    public static final int EPS_ERR_INV_ARG_ADDDATA = -2001;
-    public static final int EPS_ERR_INV_ARG_COMMMODE = -1200;
-    public static final int EPS_ERR_INV_ARG_DATA = -1600;
-    public static final int EPS_ERR_INV_ARG_DATASIZE = -1610;
-    public static final int EPS_ERR_INV_ARG_HEIGHT_PIXELS = -1603;
-    public static final int EPS_ERR_INV_ARG_INKINFO = -1710;
-    public static final int EPS_ERR_INV_ARG_JOB_ATTRIB = -1450;
-    public static final int EPS_ERR_INV_ARG_PAGE_ATTRIB = -1451;
-    public static final int EPS_ERR_INV_ARG_PRINTABLE_HEIGHT = -1801;
-    public static final int EPS_ERR_INV_ARG_PRINTABLE_WIDTH = -1800;
-    public static final int EPS_ERR_INV_ARG_PRINTER = -1350;
-    public static final int EPS_ERR_INV_ARG_PRINTER_ADDR = -1304;
-    public static final int EPS_ERR_INV_ARG_PRINTER_ID = -1303;
-    public static final int EPS_ERR_INV_ARG_PROBEINFO = -1301;
-    public static final int EPS_ERR_INV_ARG_QRSOURCE = -2002;
-    public static final int EPS_ERR_INV_ARG_QRXPOS = -2003;
-    public static final int EPS_ERR_INV_ARG_QRYPOS = -2004;
-    public static final int EPS_ERR_INV_ARG_STATUS = -1700;
-    public static final int EPS_ERR_INV_ARG_SUPPORTED_MEDIA = -1750;
-    public static final int EPS_ERR_INV_ARG_UNK_METHOD = -1302;
-    public static final int EPS_ERR_INV_ARG_WIDTH_PIXELS = -1601;
-    public static final int EPS_ERR_INV_BORDER_MODE = -1402;
-    public static final int EPS_ERR_INV_BOTTOM_MARGIN = -1422;
-    public static final int EPS_ERR_INV_BRIGHTNESS = -1410;
-    public static final int EPS_ERR_INV_CD_INDIM = -1434;
-    public static final int EPS_ERR_INV_CD_OUTDIM = -1435;
-    public static final int EPS_ERR_INV_CMDTYPE = -1436;
-    public static final int EPS_ERR_INV_COLOR_MODE = -1404;
-    public static final int EPS_ERR_INV_COLOR_PLANE = -1407;
-    public static final int EPS_ERR_INV_CONTRAST = -1411;
-    public static final int EPS_ERR_INV_DUPLEX = -1427;
-    public static final int EPS_ERR_INV_FEED_DIRECTION = -1428;
-    public static final int EPS_ERR_INV_FNCP_CLOSEPORTAL = -1212;
-    public static final int EPS_ERR_INV_FNCP_FINDCALLBACK = -1202;
-    public static final int EPS_ERR_INV_FNCP_FINDCLOSE = -1217;
-    public static final int EPS_ERR_INV_FNCP_FINDFIRST = -1215;
-    public static final int EPS_ERR_INV_FNCP_FINDNEXT = -1216;
-    public static final int EPS_ERR_INV_FNCP_GETTIME = -1206;
-    public static final int EPS_ERR_INV_FNCP_MEMALLOC = -1203;
-    public static final int EPS_ERR_INV_FNCP_MEMFREE = -1204;
-    public static final int EPS_ERR_INV_FNCP_NETACCEPT = -1227;
-    public static final int EPS_ERR_INV_FNCP_NETBIND = -1225;
-    public static final int EPS_ERR_INV_FNCP_NETCLOSE = -1222;
-    public static final int EPS_ERR_INV_FNCP_NETCONNECT = -1223;
-    public static final int EPS_ERR_INV_FNCP_NETGETSOCKNAME = -1232;
-    public static final int EPS_ERR_INV_FNCP_NETLISTEN = -1226;
-    public static final int EPS_ERR_INV_FNCP_NETRECEIVE = -1230;
-    public static final int EPS_ERR_INV_FNCP_NETRECEIVEFROM = -1231;
-    public static final int EPS_ERR_INV_FNCP_NETSEND = -1228;
-    public static final int EPS_ERR_INV_FNCP_NETSENDTO = -1229;
-    public static final int EPS_ERR_INV_FNCP_NETSETBROADCAST = -1234;
-    public static final int EPS_ERR_INV_FNCP_NETSETMULTITTL = -1233;
-    public static final int EPS_ERR_INV_FNCP_NETSHUTDOWN = -1224;
-    public static final int EPS_ERR_INV_FNCP_NETSOCKET = -1221;
-    public static final int EPS_ERR_INV_FNCP_NULL = -1201;
-    public static final int EPS_ERR_INV_FNCP_OPENPORTAL = -1211;
-    public static final int EPS_ERR_INV_FNCP_READPORTAL = -1213;
-    public static final int EPS_ERR_INV_FNCP_SLEEP = -1205;
-    public static final int EPS_ERR_INV_FNCP_WRITEPORTAL = -1214;
-    public static final int EPS_ERR_INV_INPUT_RESOLUTION = -1405;
-    public static final int EPS_ERR_INV_LEFT_MARGIN = -1421;
-    public static final int EPS_ERR_INV_MEDIA_SIZE = -1400;
-    public static final int EPS_ERR_INV_MEDIA_TYPE = -1401;
-    public static final int EPS_ERR_INV_PALETTE_DATA = -1409;
-    public static final int EPS_ERR_INV_PALETTE_SIZE = -1408;
-    public static final int EPS_ERR_INV_PAPER_SOURCE = -1426;
-    public static final int EPS_ERR_INV_PRINT_DIRECTION = -1406;
-    public static final int EPS_ERR_INV_PRINT_LANGUAGE = -1352;
-    public static final int EPS_ERR_INV_PRINT_QUALITY = -1403;
-    public static final int EPS_ERR_INV_RIGHT_MARGIN = -1423;
-    public static final int EPS_ERR_INV_SATURATION = -1412;
-    public static final int EPS_ERR_INV_TOP_MARGIN = -1420;
-    public static final int EPS_ERR_JOB_NOT_CLOSED = -1053;
-    public static final int EPS_ERR_JOB_NOT_INITIALIZED = -1052;
-    public static final int EPS_ERR_LANGUAGE_NOT_SUPPORTED = -1015;
-    public static final int EPS_ERR_LIB_INTIALIZED = -1050;
-    public static final int EPS_ERR_LIB_NOT_INITIALIZED = -1051;
-    public static final int EPS_ERR_MARGIN_OVER_PRINTABLE_HEIGHT = -1425;
-    public static final int EPS_ERR_MARGIN_OVER_PRINTABLE_WIDTH = -1424;
-    public static final int EPS_ERR_MEMORY_ALLOCATION = -1001;
-    public static final int EPS_ERR_NEED_BIDIRECT = -1011;
-    public static final int EPS_ERR_NONE = 0;
-    public static final int EPS_ERR_NOT_CLOSE_IO = -1102;
-    public static final int EPS_ERR_NOT_OPEN_IO = -1101;
-    public static final int EPS_ERR_OPR_FAIL = -1000;
-    public static final int EPS_ERR_PAGE_NOT_CLOSED = -1055;
-    public static final int EPS_ERR_PAGE_NOT_INITIALIZED = -1054;
-    public static final int EPS_ERR_PRINTER_ERR_OCCUR = -1003;
-    public static final int EPS_ERR_PRINTER_NOT_FOUND = -1300;
-    public static final int EPS_ERR_PRINTER_NOT_FOUND_2 = -13001;
-    public static final int EPS_ERR_PRINTER_NOT_SET = -1351;
-    public static final int EPS_ERR_PRINTER_NOT_USEFUL = -1306;
-    public static final int EPS_ERR_PROTOCOL_NOT_SUPPORTED = -1010;
-    public static final int EPS_ERR_QRSOURCE_TOO_LAGE = -2005;
-    public static final int EPS_ERR_SEARCH_PRINTER_NOT_FOUND = -11005;
-    public static final int EPS_FIND_CANCELED = 42;
-    public static final int EPS_JOB_CANCELED = 40;
-    public static final int EPS_OUT_OF_BOUNDS = 41;
-    public static final int EPS_PRNERR_3DMEDIA_DIRECTION = 27;
-    public static final int EPS_PRNERR_3DMEDIA_FACE = 26;
-    public static final int EPS_PRNERR_ANY = 200;
-    public static final int EPS_PRNERR_BATTERYEMPTY = 17;
-    public static final int EPS_PRNERR_BATTERYTEMPERATURE = 16;
-    public static final int EPS_PRNERR_BATTERYVOLTAGE = 15;
-    public static final int EPS_PRNERR_BATTERY_CHARGING = 40;
-    public static final int EPS_PRNERR_BATTERY_TEMPERATURE_HIGH = 41;
-    public static final int EPS_PRNERR_BATTERY_TEMPERATURE_LOW = 42;
-    public static final int EPS_PRNERR_BK1MODE_NEED_ACCEPT = 109;
-    public static final int EPS_PRNERR_BK1MODE_WAITING_ACCEPT = 56;
-    public static final int EPS_PRNERR_BORDERLESS_WIP_END = 54;
-    public static final int EPS_PRNERR_BORDERLESS_WIP_NEAR_END = 53;
-    public static final int EPS_PRNERR_BUSY = 100;
-    public static final int EPS_PRNERR_CARDLOADING = 13;
-    public static final int EPS_PRNERR_CARTRIDGEOVERFLOW = 14;
-    public static final int EPS_PRNERR_CASSETTECOVER_CLOSED = 58;
-    public static final int EPS_PRNERR_CASSETTECOVER_OPENED = 57;
-    public static final int EPS_PRNERR_CDDVDCONFIG = 23;
-    public static final int EPS_PRNERR_CDDVDCONFIG_FEEDBUTTON = 35;
-    public static final int EPS_PRNERR_CDDVDCONFIG_STARTBUTTON = 34;
-    public static final int EPS_PRNERR_CDGUIDECLOSE = 106;
-    public static final int EPS_PRNERR_CDREXIST_MAINTE = 24;
-    public static final int EPS_PRNERR_CDRGUIDEOPEN = 22;
-    public static final int EPS_PRNERR_CEMPTY = 103;
-    public static final int EPS_PRNERR_CFAIL = 104;
-    public static final int EPS_PRNERR_COMM = 102;
-    public static final int EPS_PRNERR_COVEROPEN = 4;
-    public static final int EPS_PRNERR_DISABEL_CLEANING = 108;
-    public static final int EPS_PRNERR_DISABLE_DUPLEX = 51;
-    public static final int EPS_PRNERR_DOUBLEFEED = 10;
-    public static final int EPS_PRNERR_FACTORY = 101;
-    public static final int EPS_PRNERR_FATAL = 2;
-    public static final int EPS_PRNERR_FEEDERCLOSE = 25;
-    public static final int EPS_PRNERR_GENERAL = 1;
-    public static final int EPS_PRNERR_INKCOVEROPEN = 11;
-    public static final int EPS_PRNERR_INKOUT = 6;
-    public static final int EPS_PRNERR_INKOUT_BK1MODE = 55;
-    public static final int EPS_PRNERR_INTERFACE = 3;
-    public static final int EPS_PRNERR_INTERRUPT_BY_INKEND = 36;
-    public static final int EPS_PRNERR_JPG_LIMIT = 107;
-    public static final int EPS_PRNERR_LOW_BATTERY_FNC = 39;
-    public static final int EPS_PRNERR_MANUALFEED_EXCESSIVE = 32;
-    public static final int EPS_PRNERR_MANUALFEED_EXCESSIVE_NOLCD = 33;
-    public static final int EPS_PRNERR_MANUALFEED_FAILED = 30;
-    public static final int EPS_PRNERR_MANUALFEED_FAILED_NOLCD = 31;
-    public static final int EPS_PRNERR_MANUALFEED_SET_PAPER = 28;
-    public static final int EPS_PRNERR_MANUALFEED_SET_PAPER_NOLCD = 29;
-    public static final int EPS_PRNERR_NOERROR = 0;
-    public static final int EPS_PRNERR_NOTRAY = 12;
-    public static final int EPS_PRNERR_NOT_INITIALFILL = 19;
-    public static final int EPS_PRNERR_NO_BATTERY = 38;
-    public static final int EPS_PRNERR_NO_MAINTENANCE_BOX = 48;
-    public static final int EPS_PRNERR_NO_STAPLE = 50;
-    public static final int EPS_PRNERR_PAPERJAM = 5;
-    public static final int EPS_PRNERR_PAPEROUT = 7;
-    public static final int EPS_PRNERR_PC_DIRECTION1 = 43;
-    public static final int EPS_PRNERR_PC_DIRECTION2 = 46;
-    public static final int EPS_PRNERR_PC_FACE1 = 44;
-    public static final int EPS_PRNERR_PC_FACE2 = 45;
-    public static final int EPS_PRNERR_PRINTPACKEND = 20;
-    public static final int EPS_PRNERR_READYPRINT_SERVICE = 59;
-    public static final int EPS_PRNERR_REPLACE_MAINTENANCE_BOX = 47;
-    public static final int EPS_PRNERR_ROLLPAPER_TOOSHORT = 37;
-    public static final int EPS_PRNERR_SCANNEROPEN = 21;
-    public static final int EPS_PRNERR_SERVICEREQ = 9;
-    public static final int EPS_PRNERR_SHUTOFF = 18;
-    public static final int EPS_PRNERR_SIZE_TYPE_PATH = 8;
-    public static final int EPS_PRNERR_STACKER_FULL = 49;
-    public static final int EPS_PRNERR_TRAYCLOSE = 105;
-    public static final int EPS_PRNERR_WIP_NEAR_END = 52;
-    public static final int EPS_PRNST_BUSY = 2;
-    public static final int EPS_PRNST_CANCELLING = 3;
-    public static final int EPS_PRNST_ERROR = 4;
-    public static final int EPS_PRNST_IDLE = 0;
-    public static final int EPS_PRNST_PRINTING = 1;
-}

+ 0 - 496
app/src/main/java/epson/common/escpr/EscprLib.java

@@ -1,496 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-import android.content.Context;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import com.box.androidsdk.content.models.BoxUser;
-import com.epson.mobilephone.common.EpLog;
-import com.epson.mobilephone.common.maintain.EPS_SUPPLY_INFO;
-import com.epson.mobilephone.common.maintain2.BatteryInfo;
-import com.epson.mobilephone.common.maintain2.BatteryInfoEx;
-import com.epson.mobilephone.common.maintain2.MaintainPrinterInfo2;
-import com.epson.mobilephone.common.wifidirect.escprLib;
-import epson.print.BuildConfig;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.EnumMap;
-import java.util.Random;
-
-public class EscprLib {
-    public static final int EPS_ERR_NONE = 0;
-    public static final int EPS_ERR_PRINTER_NOT_FOUND = -1300;
-    private static final int MACADRESS_SIZE = 6;
-    public static final int MSG_FIND_PRINTER_CALLBACK = 0;
-    public static final int MSG_NOTIFY_CONTINUEABLE = 1;
-    public static final int MSG_NOTIFY_ERROR = 2;
-    public static final int MSG_NOTIFY_PAGE = 30;
-    private static final int RUNDOM_SIZE = 4;
-    public static final int SECURITY_TYPE_AUTO = 255;
-    public static final int SECURITY_TYPE_NONE = 0;
-    private static final EscprLib instance = new EscprLib();
-    final int EPS_CANCEL = 1;
-    final int EPS_CONTINUE = 4;
-    volatile boolean bInvalidId = false;
-    private String cardprintPackageName = "com.epson.cardprint";
-    private String debugString;
-    private String iPrintPackageName = BuildConfig.APPLICATION_ID;
-    private Handler mHandler;
-    private boolean mIsSearch;
-    volatile String printerId;
-    volatile String printerIp;
-    private String printerList;
-
-    public enum PrinterFirmInfo {
-        NicFlg,
-        NetVer,
-        MainVer,
-        FY,
-        MarketID,
-        UrlVer
-    }
-
-    public enum snmpParseType {
-        STRING,
-        MAC_ADDRESS,
-        INTEGER,
-        SECURITY
-    }
-
-    private native int epsWrapperFindPrinter(int i, int i2);
-
-    private native int epsWrapperGetFirmwareInfo(byte[] bArr, byte[] bArr2, byte[] bArr3, byte[] bArr4, byte[] bArr5, byte[] bArr6);
-
-    private native int epsWrapperGetReadyPrintStatus(int[] iArr);
-
-    private native int epsWrapperProbePrinter2(int i, int i2, char[] cArr);
-
-    private native int start_job(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17, int i18, int i19);
-
-    private native int start_job2(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12);
-
-    public native int cancel_print();
-
-    public native int cancel_search_printer();
-
-    public native int confirm_cancel(boolean z);
-
-    public native int confirm_continue(boolean z);
-
-    public native int end_job();
-
-    public native int end_job(int i);
-
-    public native int end_page(boolean z);
-
-    public native int epsWrapperCancelFindPrinter();
-
-    public native int epsWrapperDoMainteCmd(int i);
-
-    public native int epsWrapperGetAutoPowerOnEnable(String str, int[] iArr);
-
-    public native int[] epsWrapperGetBatteryInfo();
-
-    public native int epsWrapperGetEmaStatus(int[] iArr);
-
-    public native String epsWrapperGetId();
-
-    public native int epsWrapperGetInkInfo(int[] iArr);
-
-    public native int epsWrapperGetInkInfo2(MaintainPrinterInfo2 maintainPrinterInfo2);
-
-    public native String epsWrapperGetIp();
-
-    public native int[] epsWrapperGetMaintenanceBoxInformation();
-
-    public native int[] epsWrapperGetMediaInfo(int i, int i2);
-
-    public native int[] epsWrapperGetPaperInfo();
-
-    public native int epsWrapperGetStatus(int[] iArr);
-
-    public native int epsWrapperGetSupplyInfo(EPS_SUPPLY_INFO eps_supply_info);
-
-    public native int epsWrapperGetSupportedMedia(String str);
-
-    public native int epsWrapperInitDriver(Context context, int i, byte b);
-
-    public native int epsWrapperSetAutoPowerOnEnable(String str, boolean z);
-
-    public native int epsWrapperSetEmaStatus(int i);
-
-    public native int[] get_color(int i, int i2);
-
-    public native int get_duplex(int i, int i2);
-
-    public native int get_lang();
-
-    public native int[] get_layout(int i, int i2);
-
-    public native int[] get_paper_size();
-
-    public native int[] get_paper_source(int i, int i2);
-
-    public native int[] get_paper_type(int i);
-
-    public native int[] get_printable_area();
-
-    public native int get_printable_area_info_all(EPS_PRINT_AREA_INFO eps_print_area_info);
-
-    public native int[] get_printer_status();
-
-    public native int[] get_quality(int i, int i2);
-
-    public native int get_start_job_resolution2();
-
-    public native int get_supported_media(String str);
-
-    public native int get_supported_media2();
-
-    public native int init_driver(Context context, String str, byte b);
-
-    public native int init_image(String str);
-
-    public native boolean is64bit();
-
-    public native boolean is_printer_set();
-
-    public native int mibCheckMaxofSimpleAP(MIBCommand mIBCommand);
-
-    public native int mibEnableSimpleAP(MIBCommand mIBCommand);
-
-    public native int mibEnableWiFi(MIBCommand mIBCommand);
-
-    public native int mibGetESSIDList(MIBCommand mIBCommand, byte b);
-
-    public native int mibGetMacadress(MIBCommand mIBCommand);
-
-    public native int mibGetSerial(MIBCommand mIBCommand);
-
-    public native int mibGetSimpleAPSSID(MIBCommand mIBCommand);
-
-    public native int mibGetStatusInfra(MIBCommand mIBCommand);
-
-    public native int mibGetStatusSimpleAP(MIBCommand mIBCommand);
-
-    public native int mibIsAdminLocked(MIBCommand mIBCommand);
-
-    public native int mibParseResponseAsInt(MIBCommand mIBCommand, int[] iArr);
-
-    public native String mibParseResponseAsMacaddress(MIBCommand mIBCommand);
-
-    public native String mibParseResponseAsStr(MIBCommand mIBCommand);
-
-    public native int mibParseSecResponse(MIBCommand mIBCommand, byte[] bArr);
-
-    public native int mibRebootNWwithBLE(MIBCommand mIBCommand);
-
-    public native int mibRebootNWwithSNMP(MIBCommand mIBCommand);
-
-    public native int mibSecLogin(MIBCommand mIBCommand, byte[] bArr);
-
-    public native int mibSecLogout(MIBCommand mIBCommand, byte[] bArr);
-
-    public native int mibSecSetPassword(MIBCommand mIBCommand, byte[] bArr, String str);
-
-    public native int mibSendRecieveCommand(MIBCommand mIBCommand, MIBCommand mIBCommand2, byte[] bArr);
-
-    public native int mibSetSSID(MIBCommand mIBCommand, String str);
-
-    public native int mibSetSecurityType(MIBCommand mIBCommand, int i);
-
-    public native boolean pageS_needRotate2(int i);
-
-    public native int print_jpeg(String str);
-
-    public native int print_page();
-
-    public native int release_driver();
-
-    public native int release_image();
-
-    public native int search_device(int i);
-
-    public native int search_printer(String str);
-
-    public native int search_printer2(String str, String str2, int i, int i2);
-
-    public native int set_printer(int i);
-
-    public native int start_job_roll(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15, int i16);
-
-    public native int start_page();
-
-    static {
-        try {
-            System.loadLibrary("escprlib");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    private EscprLib() {
-    }
-
-    public static EscprLib getInstance() {
-        return instance;
-    }
-
-    public int init_driver(Context context, String str) {
-        EpLog.m77i("init_driver :" + str);
-        EpLog.m77i(is64bit() ? "Native is operating at 64 bit !!" : "Native is operating at 32 bit");
-        return init_driver(context, str, iPrintPackageName.equals(context.getPackageName()) ? (byte) 8 : 10);
-    }
-
-    public int start_job(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17, int i18, boolean z) {
-        return start_job(i, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, z ? 2 : 0);
-    }
-
-    public int start_job2(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, boolean z) {
-        return start_job2(i, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, z ? 2 : 0);
-    }
-
-    public void setHanlder(Handler handler) {
-        mHandler = handler;
-    }
-
-    public void findPrinterCallback(String str) {
-        EpLog.m78i("called findPrinterCallback : %s", str);
-        if (mHandler != null) {
-            Message obtain = Message.obtain();
-            obtain.what = 0;
-            obtain.obj = str.toString();
-            mHandler.sendMessage(obtain);
-        }
-    }
-
-    public void epsNotifyDataChange(String str) {
-        EpLog.m78i("  @@@@@@@@@@   called epsNotifyDataChange : %s", str);
-        if (mHandler != null) {
-            Message obtain = Message.obtain();
-            obtain.what = 0;
-            obtain.obj = str.toString();
-            mHandler.sendMessage(obtain);
-        }
-    }
-
-    public void epsNotifyContinueable(int i) {
-        EpLog.m77i("called epsNotifyContinueable :" + i);
-        if (mHandler != null) {
-            Message obtain = Message.obtain();
-            obtain.what = 1;
-            obtain.arg1 = i;
-            mHandler.sendMessage(obtain);
-        }
-    }
-
-    public void epsNotifyError(int i, int i2, boolean z) {
-        EpLog.m77i("called epsNotifyError " + i + ":" + i2 + ":" + z);
-        if (mHandler != null) {
-            Message obtain = Message.obtain();
-            obtain.what = 2;
-            obtain.arg1 = i;
-            obtain.arg2 = i2;
-            obtain.obj = Boolean.valueOf(z);
-            mHandler.sendMessage(obtain);
-        }
-    }
-
-    public void epsNotifyPage(int i) {
-        EpLog.m77i("called epsNotifyPage :" + i);
-        if (mHandler != null) {
-            Message obtain = Message.obtain();
-            obtain.what = 30;
-            obtain.arg1 = i;
-            mHandler.sendMessage(obtain);
-        }
-    }
-
-    public int epsGetReadyPrintStatus(EPS_REDYINKINFO eps_redyinkinfo) {
-        int[] iArr = new int[5];
-        Arrays.fill(iArr, 0);
-        int epsWrapperGetReadyPrintStatus = epsWrapperGetReadyPrintStatus(iArr);
-        eps_redyinkinfo.emaStatus = iArr[0];
-        eps_redyinkinfo.subscriptionStatus = iArr[1];
-        eps_redyinkinfo.subscriptionErrorCode = iArr[2];
-        eps_redyinkinfo.subscriptionMode = iArr[3];
-        eps_redyinkinfo.subscriptionError = iArr[4];
-        return epsWrapperGetReadyPrintStatus;
-    }
-
-    public int doFindPrinter(int i, int i2) {
-        EpLog.m78i("escprLib2", "**********Call do find printer************");
-        return epsWrapperFindPrinter(i, i2);
-    }
-
-    public int epsWrapperInitDriver(Context context, int i) {
-        return epsWrapperInitDriver(context, i, iPrintPackageName.equals(context.getPackageName()) ? (byte) 8 : 10);
-    }
-
-    public int epsWrapperProbePrinter2(int i, String str, String str2, int i2) {
-        EpLog.m76i();
-        if (i2 != 1) {
-            if (i2 == 3 && str2 != null && str2.length() > 0) {
-                printerIp = str2;
-                printerId = str;
-                int epsWrapperProbePrinter2 = epsWrapperProbePrinter2(i, 2, str2.toCharArray());
-                if (epsWrapperProbePrinter2 != 0 || !this.bInvalidId) {
-                    return epsWrapperProbePrinter2;
-                }
-                return -500001;
-            }
-        } else if (str != null && str.length() > 0) {
-            return epsWrapperProbePrinter2(i, 1, str.toCharArray());
-        }
-        return -1300;
-    }
-
-    public void resetIPAdressCheck() {
-        printerId = null;
-        printerIp = null;
-        bInvalidId = false;
-    }
-
-    public void setSearchStt(boolean z) {
-        mIsSearch = z;
-    }
-
-    private void findPrinterCB() {
-        EpLog.m77i("JAVA findPrinterCB");
-        String str = printerList;
-        if (str != null && str.length() > 0) {
-            String name = getClass().getName();
-            EpLog.m78i(name, "EXTRACT Printer information: " + printerList);
-            String[] split = printerList.split("\\|\\|");
-            if (this.printerIp == null || printerId == null || !this.printerIp.equals(split[2]) || printerId.equals(split[4])) {
-                EpLog.m77i("JAVA mIsSearch == " + mIsSearch);
-                if (mIsSearch) {
-                    EpLog.m77i("JAVA mHandler == " + mHandler);
-                    if (mHandler != null) {
-                        Message obtain = Message.obtain();
-                        obtain.what = 0;
-                        Bundle bundle = new Bundle();
-                        bundle.putString("index", String.valueOf(Integer.parseInt(split[0]) - 1));
-                        bundle.putString("name", split[1]);
-                        bundle.putString(escprLib.PRINTER_IP, split[2]);
-                        bundle.putString("id", split[4]);
-                        if (split.length >= 6) {
-                            bundle.putString(escprLib.PRINTER_SERIAL_NO, split[5]);
-                        }
-                        if (split.length >= 7) {
-                            bundle.putString("common_devicename", split[6]);
-                        }
-                        if (split.length >= 8) {
-                            bundle.putString(BoxUser.FIELD_LANGUAGE, split[7]);
-                        }
-                        obtain.setData(bundle);
-                        EpLog.m77i("JAVA send message");
-                        mHandler.sendMessage(obtain);
-                    }
-                }
-            } else {
-                bInvalidId = true;
-                String name2 = getClass().getName();
-                EpLog.m72e(name2, "Invalid IP Printer: Expected = " + printerId);
-            }
-        }
-        printerList = "";
-    }
-
-    public int epsWrapperPrintErrorNotifyCB(int[] iArr) {
-        System.out.println("epsWrapperPrintErrorNotifyCB() call");
-        int i = iArr[0];
-        int i2 = iArr[1];
-        PrintStream printStream = System.out;
-        printStream.println("printer error" + i + ";;;choice type: " + i2);
-        return 1;
-    }
-
-    public int getFirmwareInfo(EnumMap<PrinterFirmInfo, String> enumMap) {
-        byte[] bArr = new byte[1];
-        byte[] bArr2 = new byte[6];
-        byte[] bArr3 = new byte[7];
-        byte[] bArr4 = new byte[5];
-        byte[] bArr5 = new byte[3];
-        byte[] bArr6 = new byte[3];
-        int epsWrapperGetFirmwareInfo = epsWrapperGetFirmwareInfo(bArr, bArr2, bArr3, bArr4, bArr5, bArr6);
-        enumMap.clear();
-        if (epsWrapperGetFirmwareInfo == 0) {
-            try {
-                PrinterFirmInfo printerFirmInfo = PrinterFirmInfo.NicFlg;
-                enumMap.put(printerFirmInfo, "" + ((char) (bArr[0] + 48)));
-                enumMap.put(PrinterFirmInfo.NetVer, cStrToString(bArr2));
-                enumMap.put(PrinterFirmInfo.MainVer, cStrToString(bArr3));
-                enumMap.put(PrinterFirmInfo.FY, cStrToString(bArr4));
-                enumMap.put(PrinterFirmInfo.MarketID, cStrToString(bArr5));
-                enumMap.put(PrinterFirmInfo.UrlVer, cStrToString(bArr6));
-            } catch (RuntimeException unused) {
-                enumMap.clear();
-            }
-        }
-        return epsWrapperGetFirmwareInfo;
-    }
-
-    public int getBatteryInfo(BatteryInfo batteryInfo) {
-        int[] epsWrapperGetBatteryInfo = epsWrapperGetBatteryInfo();
-        if (epsWrapperGetBatteryInfo[0] == 0) {
-            batteryInfo.powerSourceType = epsWrapperGetBatteryInfo[1];
-            batteryInfo.batteryChargeState = epsWrapperGetBatteryInfo[2];
-            batteryInfo.batteryRemain = epsWrapperGetBatteryInfo[3];
-        }
-        return epsWrapperGetBatteryInfo[0];
-    }
-
-    public int getBatteryInfoEx(BatteryInfoEx batteryInfoEx) {
-        EPS_SUPPLY_INFO eps_supply_info = new EPS_SUPPLY_INFO();
-        int epsWrapperGetSupplyInfo = epsWrapperGetSupplyInfo(eps_supply_info);
-        batteryInfoEx.powerSourceType = eps_supply_info.powerSourceEx.powerSource;
-        batteryInfoEx.number = eps_supply_info.powerSourceEx.number;
-        batteryInfoEx.batteryType = (int[]) eps_supply_info.powerSourceEx.batteryType.clone();
-        batteryInfoEx.batteryState = (int[]) eps_supply_info.powerSourceEx.batteryState.clone();
-        batteryInfoEx.batteryRemain = (int[]) eps_supply_info.powerSourceEx.remaining.clone();
-        return epsWrapperGetSupplyInfo;
-    }
-
-    private String cStrToString(byte[] bArr) {
-        String str = new String(bArr);
-        return str.substring(0, str.indexOf(0));
-    }
-
-    public static byte[] getMd5(byte[] bArr) {
-        byte[] bArr2 = {0};
-        try {
-            MessageDigest instance2 = MessageDigest.getInstance("MD5");
-            instance2.update(bArr);
-            return instance2.digest();
-        } catch (NoSuchAlgorithmException e) {
-            e.printStackTrace();
-            return bArr2;
-        }
-    }
-
-    public byte[] getEngineId(Context context) {
-        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(10);
-        Random random = new Random();
-        for (int i = 0; i < 4; i++) {
-            byteArrayOutputStream.write(random.nextInt());
-        }
-        String macAddress = ((WifiManager) context.getApplicationContext().getSystemService(Service.WIFI_SERVICE)).getConnectionInfo().getMacAddress();
-        if (macAddress != null) {
-            EpLog.m69d("getEngineId macAdress = " + macAddress);
-            String[] split = macAddress.split(":", 6);
-            if (split.length == 6) {
-                for (int i2 = 0; i2 < 6; i2++) {
-                    byteArrayOutputStream.write((byte) Integer.parseInt(split[i2], 16));
-                }
-            }
-        } else {
-            byteArrayOutputStream.write(new byte[]{0, 0, 0, 0, 0, 0}, 0, 6);
-        }
-        return byteArrayOutputStream.toByteArray();
-    }
-}

+ 0 - 145
app/src/main/java/epson/common/escpr/Info_paper.java

@@ -1,145 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class Info_paper {
-    public static int boder_pixel = 42;
-    private int border_bottom_margin;
-    private int border_left_margin;
-    private int border_right_margin;
-    private int border_top_margin;
-    private int borderless_bottom_margin;
-    private int borderless_left_margin;
-    private int borderless_right_margin;
-    private int borderless_top_margin;
-    private int paper_height;
-    private int paper_height_boder;
-    private int paper_height_boderless;
-    private int paper_width;
-    private int paper_width_boder;
-    private int paper_width_boderless;
-
-    public int getPaper_height() {
-        return paper_height;
-    }
-
-    public void setPaper_height(int i) {
-        paper_height = i;
-    }
-
-    public int getPaper_width_boder() {
-        return paper_width_boder;
-    }
-
-    public void setPaper_width_boder(int i) {
-        paper_width_boder = i;
-    }
-
-    public int getPaper_height_boder() {
-        return paper_height_boder;
-    }
-
-    public void setPaper_height_boder(int i) {
-        paper_height_boder = i;
-    }
-
-    public int getPaper_width_boderless() {
-        return paper_width_boderless;
-    }
-
-    public void setPaper_width_boderless(int i) {
-        paper_width_boderless = i;
-    }
-
-    public int getPaper_height_boderless() {
-        return paper_height_boderless;
-    }
-
-    public void setPaper_height_boderless(int i) {
-        paper_height_boderless = i;
-    }
-
-    public int getLeftMargin() {
-        return borderless_left_margin;
-    }
-
-    public void setLeftMargin(int i) {
-        borderless_left_margin = i;
-    }
-
-    public int getTopMargin() {
-        return borderless_top_margin;
-    }
-
-    public void setTopMargin(int i) {
-        borderless_top_margin = i;
-    }
-
-    public int getRightMargin() {
-        return borderless_right_margin;
-    }
-
-    public int getBottomMargin() {
-        return borderless_bottom_margin;
-    }
-
-    public int getBorderLeftMargin() {
-        return border_left_margin;
-    }
-
-    public int getBorderTopMargin() {
-        return border_top_margin;
-    }
-
-    public int getBorderRightMargin() {
-        return border_right_margin;
-    }
-
-    public int getBorderBottomMargin() {
-        return border_bottom_margin;
-    }
-
-    public int getPaper_width() {
-        return paper_width;
-    }
-
-    public void setPaper_width(int i) {
-        paper_width = i;
-    }
-
-    public Info_paper(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
-        paper_height = i2;
-        paper_width = i;
-        paper_height_boder = i4;
-        paper_height_boderless = i8;
-        paper_width_boder = i3;
-        paper_width_boderless = i7;
-        int i9 = paper_width;
-        int i10 = paper_width_boder;
-        border_left_margin = (i9 - i10) / 2;
-        int i11 = paper_height;
-        int i12 = paper_height_boder;
-        border_top_margin = (i11 - i12) / 2;
-        border_right_margin = (i9 - i10) / 2;
-        border_bottom_margin = (i11 - i12) / 2;
-        borderless_left_margin = i5;
-        borderless_top_margin = i6;
-        borderless_right_margin = (this.paper_width_boderless - i9) - i5;
-        borderless_bottom_margin = (this.paper_height_boderless - i11) - i6;
-    }
-
-    public Info_paper(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14) {
-        paper_height = i2;
-        paper_width = i;
-        paper_height_boder = i4;
-        paper_height_boderless = i8;
-        paper_width_boder = i3;
-        paper_width_boderless = i7;
-        border_left_margin = i9;
-        border_top_margin = i10;
-        border_right_margin = i11;
-        border_bottom_margin = i12;
-        borderless_left_margin = i5;
-        borderless_top_margin = i6;
-        borderless_right_margin = i13;
-        borderless_bottom_margin = i14;
-    }
-}

+ 0 - 8
app/src/main/java/epson/common/escpr/MIBCommand.java

@@ -1,8 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class MIBCommand {
-    public static final int SNMP_MAX_BUF = 1024;
-    public static final int SNMP_MAX_OID = 128;
-    public MIBDataBlock commandBlock = new MIBDataBlock();
-    public MIBIdentifier mibIdentifier = new MIBIdentifier();
-}

+ 0 - 6
app/src/main/java/epson/common/escpr/MIBDataBlock.java

@@ -1,6 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class MIBDataBlock {
-    public byte[] buf = new byte[1024];
-    public int bufSize;
-}

+ 0 - 6
app/src/main/java/epson/common/escpr/MIBIdentifier.java

@@ -1,6 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-public class MIBIdentifier {
-    public byte[] oid = new byte[128];
-    public int requestId;
-}

+ 0 - 683
app/src/main/java/epson/common/escpr/MediaInfo.java

@@ -1,683 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-import com.epson.mobilephone.common.PrintingLib.define.Constants;
-import epson.print.service.EpsonService;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import org.opencv.videoio.Videoio;
-
-public interface MediaInfo {
-    public static final int EPS_PRNST_BUSY = 2;
-    public static final int EPS_PRNST_CANCELLING = 3;
-    public static final int EPS_PRNST_ERROR = 4;
-    public static final int EPS_PRNST_IDLE = 0;
-    public static final int EPS_PRNST_PRINTING = 1;
-    public static final int ERROR_GET_LAYOUT = -1;
-
-    public static class ErrorTable {
-        protected static Hashtable<Integer, Integer[]> sCodeTable = new Hashtable<>();
-
-        static {
-            sCodeTable.put(1, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_GENERAL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_GENERAL_TITLE), 0});
-            sCodeTable.put(2, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_FATAL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_FATAL_TITLE), 0});
-            sCodeTable.put(3, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INTERFACE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INTERFACE_TITLE), 1});
-            sCodeTable.put(4, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COVEROPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_COVEROPEN_TITLE), 1});
-            sCodeTable.put(5, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PAPERJAM_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PAPERJAM_TITLE), 0});
-            sCodeTable.put(6, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_TITLE), 1});
-            sCodeTable.put(7, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PAPEROUT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PAPEROUT_TITLE), 1});
-            sCodeTable.put(8, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SIZE_TYPE_PATH_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SIZE_TYPE_PATH_TITLE), 0});
-            sCodeTable.put(9, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SERVICEREQ_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SERVICEREQ_TITLE), 0});
-            sCodeTable.put(10, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_DOUBLEFEED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_DOUBLEFEED_TITLE), 1});
-            sCodeTable.put(11, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INKCOVEROPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INKCOVEROPEN_TITLE), 1});
-            sCodeTable.put(12, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NOTRAY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NOTRAY_TITLE), 1});
-            sCodeTable.put(13, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CARDLOADING_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CARDLOADING_TITLE), 0});
-            sCodeTable.put(14, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CARTRIDGEOVERFLOW_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CARTRIDGEOVERFLOW_TITLE), 1});
-            sCodeTable.put(15, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYVOLTAGE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYVOLTAGE_TITLE), 0});
-            sCodeTable.put(16, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYTEMPERATURE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYTEMPERATURE_TITLE), 0});
-            sCodeTable.put(17, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYEMPTY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYEMPTY_TITLE), 0});
-            sCodeTable.put(18, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SHUTOFF_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SHUTOFF_TITLE), 1});
-            sCodeTable.put(19, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NOT_INITIALFILL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NOT_INITIALFILL_TITLE), 1});
-            sCodeTable.put(20, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PRINTPACKEND_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PRINTPACKEND_TITLE), 1});
-            sCodeTable.put(21, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SCANNEROPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SCANNEROPEN_TITLE), 1});
-            sCodeTable.put(22, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDRGUIDEOPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDRGUIDEOPEN_TITLE), 1});
-            sCodeTable.put(23, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_TITLE), 1});
-            sCodeTable.put(24, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDREXIST_MAINTE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDREXIST_MAINTE_TITLE), 1});
-            sCodeTable.put(25, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_FEEDERCLOSE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_FEEDERCLOSE_TITLE), 1});
-            sCodeTable.put(26, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_FACE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_FACE_TITLE), 1});
-            sCodeTable.put(27, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_DIRECTION_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_DIRECTION_TITLE), 1});
-            sCodeTable.put(28, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_TITLE), 1});
-            sCodeTable.put(29, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_NOLCD_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_TITLE), 1});
-            sCodeTable.put(30, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_TITLE), 1});
-            sCodeTable.put(31, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_NOLCD_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_TITLE), 1});
-            sCodeTable.put(32, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_TITLE), 1});
-            sCodeTable.put(33, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_NOLCD_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_TITLE), 1});
-            sCodeTable.put(34, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_STARTBUTTON_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_STARTBUTTON_TITLE), 1});
-            sCodeTable.put(35, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_FEEDBUTTON_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_FEEDBUTTON_TITLE), 1});
-            sCodeTable.put(36, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INTERRUPT_BY_INKEND_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INTERRUPT_BY_INKEND_TITLE), 1});
-            sCodeTable.put(37, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_ROLLPAPER_TOOSHORT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_ROLLPAPER_TOOSHORT_TITLE), 1});
-            sCodeTable.put(38, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NO_BATTERY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NO_BATTERY_TITLE), 1});
-            sCodeTable.put(39, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_LOW_BATTERY_FNC_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_LOW_BATTERY_FNC_TITLE), 1});
-            sCodeTable.put(40, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_CHARGING_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_CHARGING_TITLE), 1});
-            sCodeTable.put(41, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_HIGH_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_HIGH_TITLE), 1});
-            sCodeTable.put(42, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_LOW_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_LOW_TITLE), 1});
-            sCodeTable.put(44, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE1_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE1_TITLE), 1});
-            sCodeTable.put(45, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE2_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE2_TITLE), 1});
-            sCodeTable.put(43, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION1_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION1_TITLE), 1});
-            sCodeTable.put(46, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION2_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION2_TITLE), 1});
-            sCodeTable.put(47, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_REPLACE_MAINTENANCE_BOX_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_REPLACE_MAINTENANCE_BOX_TITLE), 1});
-            sCodeTable.put(48, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NO_MAINTENANCE_BOX_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NO_MAINTENANCE_BOX_TITLE), 1});
-            sCodeTable.put(49, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_STACKER_FULL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_STACKER_FULL_TITLE), 1});
-            sCodeTable.put(50, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NO_STAPLE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NO_STAPLE_TITLE), 1});
-            sCodeTable.put(51, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_DISABLE_DUPLEX_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_DISABLE_DUPLEX_TITLE), 1});
-            sCodeTable.put(52, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_WIP_NEAR_END_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_WIP_NEAR_END_TITLE), 1});
-            sCodeTable.put(53, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_NEAR_END_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_NEAR_END_TITLE), 1});
-            sCodeTable.put(54, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_END_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_END_TITLE), 1});
-            sCodeTable.put(55, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_BK1MODE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_BK1MODE_TITLE), 1});
-            sCodeTable.put(56, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_WAITING_ACCEPT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_WAITING_ACCEPT_TITLE), 1});
-            sCodeTable.put(57, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_OPENED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_OPENED_TITLE), 1});
-            sCodeTable.put(58, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_CLOSED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_CLOSED_TITLE), 1});
-            sCodeTable.put(100, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BUSY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BUSY_TITLE), 1});
-            sCodeTable.put(101, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_FACTORY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_FACTORY_TITLE), 1});
-            sCodeTable.put(102, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM_TITLE), 0});
-            sCodeTable.put(103, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CEMPTY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CEMPTY_TITLE), 1});
-            sCodeTable.put(104, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CFAIL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CFAIL_TITLE), 1});
-            sCodeTable.put(105, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_TRAYCLOSE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_TRAYCLOSE_TITLE), 1});
-            sCodeTable.put(106, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDGUIDECLOSE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDGUIDECLOSE_TITLE), 1});
-            sCodeTable.put(108, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_DISABEL_CLEANING_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_DISABEL_CLEANING_TITLE), 1});
-            sCodeTable.put(109, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_NEED_ACCEPT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_NEED_ACCEPT_TITLE), 1});
-            sCodeTable.put(59, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_READYPRINT_SERVICE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_READYPRINT_SERVICE_TITLE), 1});
-            sCodeTable.put(200, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_ANY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_ANY_TITLE), 1});
-            sCodeTable.put(-1300, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM3), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM_TITLE3), 0});
-            sCodeTable.put(-1100, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM1), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
-            sCodeTable.put(-11001, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM4), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
-            sCodeTable.put(Integer.valueOf(EscprError.EPS_ERR_PRINTER_NOT_FOUND_2), new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
-            sCodeTable.put(Integer.valueOf(EscprError.EPS_ERR_PRINTER_NOT_SET), new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
-            sCodeTable.put(Integer.valueOf(EscprError.EPS_ERR_SEARCH_PRINTER_NOT_FOUND), new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM5), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
-            sCodeTable.put(Integer.valueOf(EpsonService.MEDIA_INFO_MEMORY_ERROR), new Integer[]{Integer.valueOf(C1055R.string.str_err_msg_out_of_memory_title), Integer.valueOf(C1055R.string.EPS_PRNERR_GENERAL_TITLE), 0});
-            sCodeTable.put(-11006, new Integer[]{Integer.valueOf(C1055R.string.Cannot_retrieve_any_information_from_the_printer_), Integer.valueOf(C1055R.string.Cannot_retrieve_any_information_from_the_printer_), 0});
-            sCodeTable.put(-500001, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
-        }
-
-        public static Integer[] getStringId(int i) {
-            if (sCodeTable.containsKey(Integer.valueOf(i))) {
-                return sCodeTable.get(Integer.valueOf(i));
-            }
-            return null;
-        }
-    }
-
-    public static class StatusTable {
-        protected static Hashtable<Integer, Integer[]> sCodeTable = new Hashtable<>();
-
-        static {
-            sCodeTable.put(0, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_IDLE_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_IDLE_MSG)});
-            sCodeTable.put(1, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_PRINTING_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_PRINTING_MSG)});
-            sCodeTable.put(2, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_BUSY_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_BUSY_MSG)});
-            sCodeTable.put(3, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_CANCELLING_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_CANCELLING_MSG)});
-        }
-
-        public static Integer[] getStringId(int i) {
-            if (sCodeTable.containsKey(Integer.valueOf(i))) {
-                return sCodeTable.get(Integer.valueOf(i));
-            }
-            return null;
-        }
-    }
-
-    public static class ColorTable {
-        protected static Hashtable<Integer, Integer[]> mHashMap = new Hashtable<>();
-
-        static {
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_CYAN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_cyan), Integer.valueOf(C1055R.string.EPS_COLOR_CYAN), Integer.valueOf(C1055R.string.EPS_COLOR_CYAN_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_MAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_magenta), Integer.valueOf(C1055R.string.EPS_COLOR_MAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_MAGENTA_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_YELLOW.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_yellow), Integer.valueOf(C1055R.string.EPS_COLOR_YELLOW), Integer.valueOf(C1055R.string.EPS_COLOR_YELLOW_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTCYAN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightcyan), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTCYAN), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTCYAN_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTMAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightmagenta), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTMAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTMAGENTA_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTYELLOW.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightyellow), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTYELLOW), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTYELLOW_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_DARKYELLOW.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_darkyellow), Integer.valueOf(C1055R.string.EPS_COLOR_DARKYELLOW), Integer.valueOf(C1055R.string.EPS_COLOR_DARKYELLOW_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightblack), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTBLACK_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_RED.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_red), Integer.valueOf(C1055R.string.EPS_COLOR_RED), Integer.valueOf(C1055R.string.EPS_COLOR_RED_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_VIOLET.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_violet), Integer.valueOf(C1055R.string.EPS_COLOR_VIOLET), Integer.valueOf(C1055R.string.EPS_COLOR_VIOLET_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_MATTEBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_matteblack), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTLIGHTBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightlightblack), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTLIGHTBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTLIGHTBLACK__CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_PHOTOBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_photoblack), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_CLEAR.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_clear), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAR), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAR_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_GRAY.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_gray), Integer.valueOf(C1055R.string.EPS_COLOR_GRAY), Integer.valueOf(C1055R.string.EPS_COLOR_GRAY_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLACK2.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_black2), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK2), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK2_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_ORANGE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_orange), Integer.valueOf(C1055R.string.EPS_COLOR_ORANGE), Integer.valueOf(C1055R.string.EPS_COLOR_ORANGE_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_GREEN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_green), Integer.valueOf(C1055R.string.EPS_COLOR_GREEN), Integer.valueOf(C1055R.string.EPS_COLOR_GREEN_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_WHITE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_white), Integer.valueOf(C1055R.string.EPS_COLOR_WHITE), Integer.valueOf(C1055R.string.EPS_COLOR_WHITE_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_CLEAN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_clean), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAN), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAN_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_COMPOSITE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_composite), Integer.valueOf(C1055R.string.EPS_COLOR_COMPOSITE), Integer.valueOf(C1055R.string.EPS_COLOR_COMPOSITE_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLACK1.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK1), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK1_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLUE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_blue), Integer.valueOf(C1055R.string.EPS_COLOR_BLUE), Integer.valueOf(C1055R.string.EPS_COLOR_BLUE_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_DEEP_BLUE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_deep_blue), Integer.valueOf(C1055R.string.EPS_COLOR_DEEP_BLUE), Integer.valueOf(C1055R.string.EPS_COLOR_DEEP_BLUE_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_VIVID_MAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_vivid_magenta), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_MAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_MAGENTA_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_VIVID_LIGHTMAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_vivid_lightmagenta), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_LIGHTMAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_LIGHTMAGENTA_CON)});
-            mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTGRAY.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightgray), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTGRAY), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTGRAY_CON)});
-        }
-
-        public static Integer[] getColorName(int i) {
-            if (mHashMap.containsKey(Integer.valueOf(i))) {
-                return mHashMap.get(Integer.valueOf(i));
-            }
-            return null;
-        }
-
-        public static Integer[] getColorNameByModel(int i, String str) {
-            if (!mHashMap.containsKey(Integer.valueOf(i))) {
-                return null;
-            }
-            Integer[] numArr = mHashMap.get(Integer.valueOf(i));
-            if (str.equals("SC-PX1V") || str.equals("SC-PX1VL")) {
-                if (i != Constants.ColorName.EPS_COLOR_PHOTOBLACK.ordinal()) {
-                    return numArr;
-                }
-                return new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK_CON_BK)};
-            } else if (!str.equals("SC-P700 Series") && !str.equals("SC-P900 Series")) {
-                return numArr;
-            } else {
-                if (i == Constants.ColorName.EPS_COLOR_PHOTOBLACK.ordinal()) {
-                    return new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK_CON_PK)};
-                } else if (i != Constants.ColorName.EPS_COLOR_MATTEBLACK.ordinal()) {
-                    return numArr;
-                } else {
-                    return new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK_CON_MK)};
-                }
-            }
-        }
-    }
-
-    public static abstract class AbstractInfo {
-        protected final Hashtable<Integer, Integer> sCodeTable = new Hashtable<>();
-
-        public int getStringId(int i) {
-            if (this.sCodeTable.containsKey(Integer.valueOf(i))) {
-                return sCodeTable.get(Integer.valueOf(i)).intValue();
-            }
-            return sCodeTable.get(0).intValue();
-        }
-
-        public boolean putID(int i, int i2) {
-            if (!this.sCodeTable.containsKey(Integer.valueOf(i))) {
-                return false;
-            }
-            sCodeTable.put(Integer.valueOf(i), Integer.valueOf(i2));
-            return true;
-        }
-
-        public int getID(int i) {
-            if (this.sCodeTable.containsKey(Integer.valueOf(i))) {
-                return sCodeTable.get(Integer.valueOf(i)).intValue();
-            }
-            return -1;
-        }
-
-        public Enumeration getKeys() {
-            return sCodeTable.keys();
-        }
-
-        public void destructor() {
-            sCodeTable.clear();
-        }
-    }
-
-    public static class PaperSize extends AbstractInfo {
-        public PaperSize() {
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A4));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LETTER.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_LETTER));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LEGAL.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_LEGAL));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A5));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A6));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B5));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_EXECUTIVE.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_EXECUTIVE));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFLETTER.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_HALFLETTER));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PANORAMIC.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PANORAMIC));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_TRIM_4X6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_TRIM_4X6));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_4X6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_4X6));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_5X8.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_5X8));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8X10.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8X10));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X15.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_10X15));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_200X300.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_200X300));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_POSTCARD.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_POSTCARD));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_DBLPOSTCARD.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_DBLPOSTCARD));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_10_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C6_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_DL_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWEVN_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_NEWEVN_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CHOKEI_3));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CHOKEI_4));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_1.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_1));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_2));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_3));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_4));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_2L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_2L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_10_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C6_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_DL_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWENV_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_NEWENV_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_MEISHI.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_MEISHI));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_89X50.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_BUZCARD_89X50));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CARD_54X86.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CARD_54X86));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_55X91.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_BUZCARD_55X91));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ALBUM_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_A5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ALBUM_A5));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_L_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_L_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_2L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_2L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A5_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_A5_L));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_A4));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HIVISION.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_HIVISION));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_KAKU_2));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C4_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C4_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B6));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_20.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_KAKU_20));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A5_24HOLE.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A5_24HOLE));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_40.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CHOKEI_40));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_QUADRAPLEPOSTCARD.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_QUADRAPLEPOSTCARD));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_0.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_0));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C5_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C5_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_6));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_MEXICO_OFICIO.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_MEXICO_OFICIO));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_OFICIO9.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_OFICIO9));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_INDIAN_LEGAL.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_INDIAN_LEGAL));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3NOBI.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A3NOBI));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A3));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B4));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USB.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_USB));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_11X14.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_11X14));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B3));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A2));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USC.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_USC));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X12.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_10X12));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_12X12.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_12X12));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP1.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP1));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP2));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP3));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP4));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP5));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_16K.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_16K));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8K.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8K));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SRA3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SRA3));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_12X18.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_12X18));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8_5X13.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8_5X13));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SQUARE_8_27.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SQUARE_8_27));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SQUARE_5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SQUARE_5));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USER.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_USER));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8X10_5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8X10_5));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8_27X13.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8_27X13));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_B5_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_B5_P));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFCUT.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_HALFCUT));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_16X20.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_16X20));
-        }
-    }
-
-    public static abstract class AbstractInfo_size {
-        protected final Hashtable<Integer, Info_paper> sCodeTable = new Hashtable<>();
-
-        public Info_paper getStringId(int i) {
-            if (this.sCodeTable.containsKey(Integer.valueOf(i))) {
-                return sCodeTable.get(Integer.valueOf(i));
-            }
-            return null;
-        }
-
-        public Info_paper getStringIdForFormPrint(int i) {
-            if (i == 3) {
-                return new Info_paper(2098, 2976, 1816, 2694, 0, 0, 2098, 2976, 141, 141, 141, 141, 0, 0);
-            }
-            if (this.sCodeTable.containsKey(Integer.valueOf(i))) {
-                return sCodeTable.get(Integer.valueOf(i));
-            }
-            return null;
-        }
-
-        public void destructor() {
-            sCodeTable.clear();
-        }
-    }
-
-    public static class PaperSize_constants extends AbstractInfo_size {
-        public PaperSize_constants() {
-            EPS_PRINT_AREA_INFO eps_print_area_info = new EPS_PRINT_AREA_INFO();
-            if (EscprLib.getInstance().get_printable_area_info_all(eps_print_area_info) >= 0) {
-                for (int i = 0; i < eps_print_area_info.numSizes; i++) {
-                    int i2 = eps_print_area_info.sizeList[i].paperWidth;
-                    int i3 = eps_print_area_info.sizeList[i].paperHeight;
-                    int i4 = 0;
-                    int i5 = 0;
-                    int i6 = 0;
-                    int i7 = 0;
-                    int i8 = 0;
-                    int i9 = 0;
-                    int i10 = 0;
-                    int i11 = 0;
-                    int i12 = 0;
-                    int i13 = 0;
-                    int i14 = 0;
-                    int i15 = 0;
-                    for (int i16 = 0; i16 < eps_print_area_info.sizeList[i].numLayouts; i16++) {
-                        if (eps_print_area_info.sizeList[i].layoutList[i16].layout == 2) {
-                            int i17 = (i2 - eps_print_area_info.sizeList[i].layoutList[i16].margin.left) - eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
-                            int i18 = (i3 - eps_print_area_info.sizeList[i].layoutList[i16].margin.top) - eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
-                            int i19 = eps_print_area_info.sizeList[i].layoutList[i16].margin.left;
-                            int i20 = eps_print_area_info.sizeList[i].layoutList[i16].margin.top;
-                            i12 = eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
-                            i13 = eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
-                            i10 = i19;
-                            i11 = i20;
-                            i4 = i17;
-                            i5 = i18;
-                        } else if (eps_print_area_info.sizeList[i].layoutList[i16].layout == 1) {
-                            int i21 = (i2 - eps_print_area_info.sizeList[i].layoutList[i16].margin.left) - eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
-                            int i22 = (i3 - eps_print_area_info.sizeList[i].layoutList[i16].margin.top) - eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
-                            i6 = eps_print_area_info.sizeList[i].layoutList[i16].margin.left;
-                            i7 = eps_print_area_info.sizeList[i].layoutList[i16].margin.top;
-                            i14 = eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
-                            i15 = eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
-                            i8 = i21;
-                            i9 = i22;
-                        }
-                    }
-                    sCodeTable.put(Integer.valueOf(eps_print_area_info.sizeList[i].mediaSizeID), new Info_paper(i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15));
-                }
-                return;
-            }
-            presetPaperSize();
-        }
-
-        public PaperSize_constants(boolean z) {
-            presetPaperSize();
-        }
-
-        private void presetPaperSize() {
-            sCodeTable.put(0, new Info_paper(2976, 4209, 2892, 4125, -36, -42, 3048, 4321));
-            sCodeTable.put(1, new Info_paper(3060, 3960, 2976, 3876, -36, -42, 3132, 4072));
-            sCodeTable.put(2, new Info_paper(3060, 5040, 2976, 4956, -36, -42, 3132, 5152));
-            sCodeTable.put(3, new Info_paper(2098, 2976, 2014, 2892, -36, -42, 2170, 3088));
-            sCodeTable.put(4, new Info_paper(1488, 2098, 1404, 2014, -36, -42, 1560, 2210));
-            sCodeTable.put(5, new Info_paper(2580, 3643, 2496, 3559, -36, -42, 2652, 3755));
-            sCodeTable.put(6, new Info_paper(2611, 3780, 2527, 3696, -36, -42, 2683, 3892));
-            sCodeTable.put(7, new Info_paper(1980, 3060, 1896, 2976, -36, -42, 2052, 3172));
-            sCodeTable.put(8, new Info_paper(2976, 8419, 2892, 8335, -36, -42, 3048, 8531));
-            sCodeTable.put(9, new Info_paper(Videoio.CAP_OPENNI2_ASUS, 2330, 1526, 2246, -36, -42, 1682, 2442));
-            sCodeTable.put(10, new Info_paper(1440, 2160, 1356, 2076, -36, -42, 1512, 2272));
-            sCodeTable.put(11, new Info_paper(1800, 2880, 1716, 2796, -36, -42, 1872, 2992));
-            sCodeTable.put(12, new Info_paper(2880, 3600, 2796, 3516, -36, -42, 2952, 3712));
-            sCodeTable.put(13, new Info_paper(1417, 2125, 1333, 2041, -36, -42, 1489, 2237));
-            sCodeTable.put(14, new Info_paper(3061, 4790, 2977, 4706, -36, -42, 3133, 4902));
-            sCodeTable.put(15, new Info_paper(1261, 1800, 1177, 1716, -36, -42, 1333, 1912));
-            sCodeTable.put(16, new Info_paper(1417, 2098, 1333, 2014, -36, -42, 1489, 2210));
-            sCodeTable.put(17, new Info_paper(2835, 2098, 2751, 2014, -36, -42, 2907, 2210));
-            sCodeTable.put(18, new Info_paper(3420, 1485, 3336, 1401, -36, -42, 3492, 1597));
-            sCodeTable.put(19, new Info_paper(2296, 1616, 2212, 1532, -36, -42, 2368, 1728));
-            sCodeTable.put(20, new Info_paper(3118, 1559, 3034, 1475, -36, -42, 3190, 1671));
-            sCodeTable.put(21, new Info_paper(3118, 1871, 3034, 1787, -36, -42, 3190, 1983));
-            sCodeTable.put(22, new Info_paper(1701, 3331, 1561, 3006, -36, -42, 1773, 3443));
-            sCodeTable.put(23, new Info_paper(1276, 2906, 1136, 2581, -36, -42, 1348, 3018));
-            sCodeTable.put(24, new Info_paper(1701, 2494, 1561, 2169, -36, -42, 1773, 2606));
-            sCodeTable.put(25, new Info_paper(1616, 2296, 1476, 1971, -36, -42, 1688, 2408));
-            sCodeTable.put(26, new Info_paper(1389, 2098, 1249, 1773, -36, -42, 1461, 2210));
-            sCodeTable.put(27, new Info_paper(1488, 3331, 1348, 3006, -36, -42, 1560, 3443));
-            sCodeTable.put(28, new Info_paper(1800, 2522, 1716, 2438, -36, -42, 1872, 2634));
-            sCodeTable.put(29, new Info_paper(1485, 3420, 1345, 3095, -36, -42, 1557, 3532));
-            sCodeTable.put(30, new Info_paper(1616, 2296, 1476, 1971, -36, -42, 1688, 2408));
-            sCodeTable.put(31, new Info_paper(1559, 3118, 1419, 2793, -36, -42, 1631, 3230));
-            sCodeTable.put(32, new Info_paper(1871, 3118, 1731, 2793, -36, -42, 1943, 3230));
-            sCodeTable.put(33, new Info_paper(1261, 779, 1177, 695, -36, -42, 1333, 891));
-            sCodeTable.put(34, new Info_paper(1261, 709, 1177, 625, -36, -42, 1333, 821));
-            sCodeTable.put(35, new Info_paper(765, 1219, 681, 1135, -36, -42, 837, 1331));
-            sCodeTable.put(36, new Info_paper(780, 1290, 696, 1206, -36, -42, 852, 1402));
-            sCodeTable.put(37, new Info_paper(1800, 2607, 1716, 2523, -36, -42, 1872, 2719));
-            sCodeTable.put(38, new Info_paper(2976, 4294, 2892, 4210, -36, -42, 3048, 4406));
-            sCodeTable.put(39, new Info_paper(1800, 1260, 1716, 1176, -36, -42, 1872, 1372));
-            sCodeTable.put(40, new Info_paper(1800, 2521, 1716, 2437, -36, -42, 1872, 2633));
-            sCodeTable.put(41, new Info_paper(2976, 2101, 2892, 2017, -36, -42, 3048, 2213));
-            sCodeTable.put(42, new Info_paper(2976, 4203, 2892, 4119, -36, -42, 3048, 4315));
-            sCodeTable.put(43, new Info_paper(1440, 2560, 1356, 2476, -36, -42, 1512, 2672));
-            sCodeTable.put(44, new Info_paper(3401, 4705, 2977, 4380, -36, -42, 3473, 4817));
-            sCodeTable.put(45, new Info_paper(3245, 4592, 2977, 4267, -36, -42, 3317, 4704));
-            sCodeTable.put(46, new Info_paper(1814, 2580, 1730, 2496, -48, -42, 1910, 2692));
-            sCodeTable.put(47, new Info_paper(3245, 4592, 2977, 4267, -36, -42, 3317, 4704));
-            sCodeTable.put(48, new Info_paper(2098, 2976, 1816, 2694, -36, -42, 2170, 3088));
-            sCodeTable.put(52, new Info_paper(1276, 3189, 1136, 2736, -36, -42, 1348, 3301));
-            sCodeTable.put(61, new Info_paper(4663, 6846, 4579, 6762, -48, -42, 4759, 6958));
-            sCodeTable.put(62, new Info_paper(4209, 5953, 4125, 5869, -48, -42, 4305, 6065));
-            sCodeTable.put(63, new Info_paper(3643, 5159, 3559, 5075, -48, -42, 3739, 5271));
-            sCodeTable.put(64, new Info_paper(3960, 6120, 3876, 6036, -48, -42, 4056, 6232));
-            sCodeTable.put(65, new Info_paper(3960, 5040, 3876, 4956, -48, -42, 4056, 5152));
-            sCodeTable.put(66, new Info_paper(5159, 7299, 5075, 7215, -48, -42, 5255, 7411));
-            sCodeTable.put(67, new Info_paper(5953, 8419, 5869, 8335, -48, -42, 6049, 8531));
-            sCodeTable.put(68, new Info_paper(6120, 7920, 6036, 7836, -48, -42, 6216, 8032));
-            sCodeTable.put(69, new Info_paper(3600, 4320, 3516, 4236, -48, -42, 3696, 4432));
-            sCodeTable.put(70, new Info_paper(4320, 4320, 4236, 4236, -48, -42, 4416, 4432));
-            sCodeTable.put(71, new Info_paper(2976, 3827, 2892, 3743, -36, -42, 3048, 3939));
-            sCodeTable.put(72, new Info_paper(2976, 2112, 2892, 2028, -36, -42, 3048, 2224));
-            sCodeTable.put(73, new Info_paper(1417, 2409, 1333, 2325, -36, -42, 1489, 2521));
-            sCodeTable.put(74, new Info_paper(1843, 2580, 1759, 2496, -36, -42, 1915, 2692));
-            sCodeTable.put(75, new Info_paper(2721, 1871, 2637, 1787, -36, -42, 2793, 1983));
-            sCodeTable.put(76, new Info_paper(2764, 3827, 2680, 3743, -36, -42, 2836, 3939));
-            sCodeTable.put(77, new Info_paper(3827, 5528, 3743, 5444, -36, -42, 3899, 5640));
-            sCodeTable.put(87, new Info_paper(2976, 2976, 2892, 2892, -36, -42, 3048, 3088));
-            sCodeTable.put(88, new Info_paper(1800, 1800, 1716, 1716, -36, -42, 1872, 1912));
-            sCodeTable.put(99, new Info_paper(0, 0, 0, 0, -36, -42, 0, 0));
-            sCodeTable.put(104, new Info_paper(2880, 3780, 2796, 3696, -36, -42, 2952, 3892));
-            sCodeTable.put(106, new Info_paper(2976, 4678, 2892, 4594, -36, -42, 3048, 4790));
-            sCodeTable.put(111, new Info_paper(2494, 3543, 2354, 3218, -36, -42, 2566, 3655));
-            sCodeTable.put(128, new Info_paper(5040, 6120, 4956, 6036, -36, -42, 5112, 6232));
-            sCodeTable.put(129, new Info_paper(5760, 7200, 5676, 7116, -36, -42, 5832, 7312));
-            sCodeTable.put(255, new Info_paper(0, 0, 0, 0, 0, 0, 0, 0));
-        }
-    }
-
-    public static class PaperType extends AbstractInfo {
-        public PaperType() {
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_IRON.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_IRON));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTOINKJET.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTOINKJET));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_MATTE.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_MATTE));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_MINIPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_MINIPHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PGPHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PSPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PSPHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLPHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ARCHMATTE.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ARCHMATTE));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_WATERCOLOR.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_WATERCOLOR));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ECOPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ECOPHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_VELVETFINEART.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_VELVETFINEART));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HAGAKIRECL.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HAGAKIRECL));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HAGAKIINKJET.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HAGAKIINKJET));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTOINKJET2.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTOINKJET2));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_MATTEMEISHI.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_MATTEMEISHI));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HAGAKIATENA.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HAGAKIATENA));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ENVELOPE.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ENVELOPE));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLATINA.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLATINA));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ULTRASMOOTH.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ULTRASMOOTH));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_SFHAGAKI.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_SFHAGAKI));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTOSTD.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTOSTD));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GLOSSYHAGAKI.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GLOSSYHAGAKI));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GLOSSYPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GLOSSYPHOTO));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GLOSSYCAST.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GLOSSYCAST));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BSMATTE_DS.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BSMATTE_DS));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_3D.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_3D));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_LCPP.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_LCPP));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PREPRINTED.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PREPRINTED));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_LETTERHEAD.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_LETTERHEAD));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_RECYCLED.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_RECYCLED));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_COLOR.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_COLOR));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BUSINESS_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BUSINESS_PLAIN));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN_ROLL_STICKER.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN_ROLL_STICKER));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GROSSY_ROLL_STICKER.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GROSSY_ROLL_STICKER));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN1.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN1));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN2.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN2));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER1.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER1));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER2.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER2));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER3.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER3));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER4.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER4));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER5.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER5));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HIGH_QUALITY_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HIGH_QUALITY_PLAIN));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BS_HALFGLOSSY_DS.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BS_HALFGLOSSY_DS));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_CDDVD.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_CDDVD));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_CDDVDHIGH.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_CDDVDHIGH));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLOOFING_WHITE_MAT.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLOOFING_WHITE_MAT));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BARYTA.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BARYTA));
-            sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_AUTO_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_AUTO_PLAIN));
-        }
-    }
-
-    public static class Layout extends AbstractInfo {
-        public Layout() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_MLID_CUSTOM));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_MLID_BORDERLESS));
-            sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_MLID_BORDERS));
-            sCodeTable.put(4, Integer.valueOf(C1055R.string.EPS_MLID_CDLABEL));
-        }
-    }
-
-    public static class Quality extends AbstractInfo {
-        public Quality() {
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_MQID_DRAFT));
-            sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_MQID_NORMAL));
-            sCodeTable.put(4, Integer.valueOf(C1055R.string.EPS_MQID_HIGH));
-            sCodeTable.put(128, Integer.valueOf(C1055R.string.EPS_MQID_BEST_PLAIN));
-        }
-    }
-
-    public static class PaperSource extends AbstractInfo {
-        public PaperSource() {
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_MPID_REAR));
-            sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_MPID_FRONT1));
-            sCodeTable.put(4, Integer.valueOf(C1055R.string.EPS_MPID_FRONT2));
-            sCodeTable.put(32, Integer.valueOf(C1055R.string.EPS_MPID_FRONT3));
-            sCodeTable.put(64, Integer.valueOf(C1055R.string.EPS_MPID_FRONT4));
-            sCodeTable.put(8, Integer.valueOf(C1055R.string.EPS_MPID_CDTRAY));
-            sCodeTable.put(32768, Integer.valueOf(C1055R.string.EPS_MPID_MPTRAY));
-            sCodeTable.put(16, Integer.valueOf(C1055R.string.EPS_MPID_REARMANUAL));
-            sCodeTable.put(512, Integer.valueOf(C1055R.string.EPS_MPID_MANUAL2));
-            sCodeTable.put(256, Integer.valueOf(C1055R.string.EPS_MPID_ROLL));
-            sCodeTable.put(1024, Integer.valueOf(C1055R.string.EPS_MPID_MPTRAY_IJ));
-            sCodeTable.put(2048, Integer.valueOf(C1055R.string.EPS_MPID_HIGHCAP));
-            sCodeTable.put(128, Integer.valueOf(C1055R.string.EPS_MPID_AUTO));
-        }
-    }
-
-    public static class PrintDate extends AbstractInfo {
-        public PrintDate() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.Off));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_PD_DATETYPE1));
-            sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_PD_DATETYPE2));
-            sCodeTable.put(3, Integer.valueOf(C1055R.string.EPS_PD_DATETYPE3));
-        }
-    }
-
-    public static class PhotoeEhance extends AbstractInfo {
-        public PhotoeEhance() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_APF_ON));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_APF_OFF));
-        }
-    }
-
-    public static class Color extends AbstractInfo {
-        public Color() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_CM_COLOR));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_CM_MONOCHROME));
-        }
-    }
-
-    public static class Duplex extends AbstractInfo {
-        public Duplex() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_DUPLEX_NONE));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_DUPLEX_LONG));
-            sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_DUPLEX_SHORT));
-        }
-    }
-
-    public static class FeedDirection extends AbstractInfo {
-        public FeedDirection() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_FEEDDIR_PORTRAIT));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_FEEDDIR_LANDSCAPE));
-        }
-    }
-
-    public static class PaperSizeType extends AbstractInfo {
-        public PaperSizeType() {
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LETTER.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LEGAL.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A5.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B5.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_EXECUTIVE.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFLETTER.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PANORAMIC.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_TRIM_4X6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_4X6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_5X8.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8X10.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X15.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_200X300.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_POSTCARD.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_DBLPOSTCARD.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWEVN_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_1.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_2.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_2L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWENV_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_MEISHI.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_89X50.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CARD_54X86.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_55X91.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_A5.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_L_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_2L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A5_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HIVISION.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_2.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C4_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_20.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3NOBI.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USB.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_11X14.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A2.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USC.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X12.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_12X12.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USER.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFCUT.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-            sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_16X20.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
-        }
-    }
-
-    public static class ApfState extends AbstractInfo {
-        public ApfState() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_APF_OFF));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_APF_ON));
-        }
-    }
-
-    public static class SharpnessState extends AbstractInfo {
-        public SharpnessState() {
-            sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_SHARPNESS_OFF));
-            sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_SHARPNESS_ON));
-        }
-    }
-}

+ 0 - 88
app/src/main/java/epson/common/escpr/PaperSize.java

@@ -1,88 +0,0 @@
-package com.epson.mobilephone.common.escpr;
-
-import com.epson.mobilephone.common.escpr.MediaInfo;
-
-public class PaperSize {
-    public int mHeight;
-    MediaInfo.AbstractInfo_size mInfo;
-    public int mWidth;
-
-    public PaperSize() {
-        mWidth = 0;
-        mHeight = 0;
-    }
-
-    public PaperSize(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        Info_paper stringId = mInfo.getStringId(i);
-        mWidth = stringId.getPaper_width();
-        mHeight = stringId.getPaper_height();
-        mInfo.destructor();
-    }
-
-    public void setPaperSize(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        Info_paper stringId = mInfo.getStringId(i);
-        mWidth = stringId.getPaper_width();
-        mHeight = stringId.getPaper_height();
-        mInfo.destructor();
-    }
-
-    public int[] getPaperSizeBoder(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        Info_paper stringId = mInfo.getStringId(i);
-        int[] iArr = {stringId.getPaper_width_boder(), stringId.getPaper_height_boder()};
-        mInfo.destructor();
-        return iArr;
-    }
-
-    public int getWidth_boder(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        int paper_width_boder = mInfo.getStringId(i).getPaper_width_boder();
-        mInfo.destructor();
-        return paper_width_boder;
-    }
-
-    public int getHeight_boder(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        int paper_height_boder = mInfo.getStringId(i).getPaper_height_boder();
-        mInfo.destructor();
-        return paper_height_boder;
-    }
-
-    public int getWidth_boderLess(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        int paper_width_boderless = mInfo.getStringId(i).getPaper_width_boderless();
-        mInfo.destructor();
-        return paper_width_boderless;
-    }
-
-    public int getHeight_boderLess(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        int paper_height_boderless = mInfo.getStringId(i).getPaper_height_boderless();
-        mInfo.destructor();
-        return paper_height_boderless;
-    }
-
-    public int getTopMargin(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        int topMargin = mInfo.getStringId(i).getTopMargin();
-        mInfo.destructor();
-        return Math.abs(topMargin);
-    }
-
-    public int getLeftMargin(int i) {
-        mInfo = new MediaInfo.PaperSize_constants();
-        int leftMargin = mInfo.getStringId(i).getLeftMargin();
-        mInfo.destructor();
-        return Math.abs(leftMargin);
-    }
-
-    public int getHeightPaper() {
-        return mHeight;
-    }
-
-    public int getWidthPaper() {
-        return mWidth;
-    }
-}

+ 0 - 99
app/src/main/java/epson/common/guide/GuideWebviewFragment.java

@@ -1,99 +0,0 @@
-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;
-import android.webkit.WebView;
-import android.widget.FrameLayout;
-import com.epson.guidelib.C0907R;
-
-public class GuideWebviewFragment extends Fragment {
-    private static final String ARG_PARAM1 = "html_file_path";
-    MyClickListener mClickListerner;
-    private String mHtmlPath;
-    private WebView mWebView;
-    private FrameLayout mWebViewFrame;
-
-    public interface MyClickListener {
-        void onClickClose();
-    }
-
-    public static GuideWebviewFragment newInstance(String str) {
-        GuideWebviewFragment guideWebviewFragment = new GuideWebviewFragment();
-        Bundle bundle = new Bundle();
-        bundle.putString(ARG_PARAM1, str);
-        guideWebviewFragment.setArguments(bundle);
-        return guideWebviewFragment;
-    }
-
-    public void onCreate(Bundle bundle) {
-        super.onCreate(bundle);
-        if (getArguments() != null) {
-            mHtmlPath = getArguments().getString(ARG_PARAM1);
-        }
-    }
-
-    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
-        View inflate = layoutInflater.inflate(C0907R.layout.fragment_guide_webview, viewGroup, false);
-        mWebView = (WebView) inflate.findViewById(C0907R.C0909id.guideWebview);
-        mWebViewFrame = (FrameLayout) inflate.findViewById(C0907R.C0909id.guideWebViewFrame);
-        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) mWebView.getLayoutParams();
-        ViewGroup.MarginLayoutParams marginLayoutParams2 = (ViewGroup.MarginLayoutParams) mWebViewFrame.getLayoutParams();
-        mWebView.getSettings().setBuiltInZoomControls(false);
-        mWebView.getSettings().setLoadWithOverviewMode(true);
-        mWebView.getSettings().setUseWideViewPort(true);
-        mWebView.setInitialScale(1);
-        mWebView.loadUrl(mHtmlPath);
-        int webViewDP = Utils.getWebViewDP(getActivity(), getContext());
-        marginLayoutParams.height = (int) Utils.dptopx(webViewDP, getContext());
-        marginLayoutParams.width = (int) Utils.dptopx(webViewDP, getContext());
-        marginLayoutParams2.height = (int) Utils.dptopx(Utils.LAYOUT_MEARGIN + webViewDP, getContext());
-        marginLayoutParams2.width = (int) Utils.dptopx(webViewDP + Utils.LAYOUT_MEARGIN, getContext());
-        mWebView.setLayoutParams(marginLayoutParams);
-        mWebViewFrame.setLayoutParams(marginLayoutParams2);
-        inflate.findViewById(C0907R.C0909id.closeImage).setOnClickListener(new View.OnClickListener() {
-            public void onClick(View view) {
-                if (GuideWebviewFragment.mClickListerner != null) {
-                    GuideWebviewFragment.mClickListerner.onClickClose();
-                }
-            }
-        });
-        return inflate;
-    }
-
-    public void onPause() {
-        super.onPause();
-        mWebView.onPause();
-    }
-
-    public void onResume() {
-        mWebView.onResume();
-        super.onResume();
-    }
-
-    public void onDestroy() {
-        WebView webView = mWebView;
-        if (webView != null) {
-            webView.destroy();
-        }
-        mWebView = null;
-        super.onDestroy();
-    }
-
-    public void onAttach(Context context) {
-        super.onAttach(context);
-        try {
-            mClickListerner = (MyClickListener) context;
-        } catch (ClassCastException unused) {
-            throw new ClassCastException(getActivity().toString() + "must implement OnArticleSelectedListener.");
-        }
-    }
-
-    public void onDetach() {
-        super.onDetach();
-        mClickListerner = null;
-    }
-}

+ 0 - 29
app/src/main/java/epson/common/guide/MyViewPager.java

@@ -1,29 +0,0 @@
-package com.epson.mobilephone.common.guide;
-
-import android.content.Context;
-import android.support.p000v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.view.View;
-
-public class MyViewPager extends ViewPager {
-    public MyViewPager(Context context) {
-        super(context);
-    }
-
-    public MyViewPager(Context context, AttributeSet attributeSet) {
-        super(context, attributeSet);
-    }
-
-    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));
-            int measuredHeight = childAt.getMeasuredHeight();
-            if (measuredHeight > i3) {
-                i3 = measuredHeight;
-            }
-        }
-        super.onMeasure(i, View.MeasureSpec.makeMeasureSpec(i3, 1073741824));
-    }
-}

+ 0 - 232
app/src/main/java/epson/common/guide/NoticeGuideActivity.java

@@ -1,232 +0,0 @@
-package com.epson.mobilephone.common.guide;
-
-import android.content.Intent;
-import android.content.res.Configuration;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-
-import android.support.p000v4.app.Fragment;
-import android.support.p000v4.app.FragmentManager;
-import android.support.p000v4.app.FragmentStatePagerAdapter;
-import android.support.p000v4.view.ViewPager;
-
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import com.epson.guidelib.C0907R;
-import com.epson.mobilephone.common.guide.GuideWebviewFragment;
-import java.util.ArrayList;
-import java.util.Locale;
-
-public class NoticeGuideActivity extends AppCompatActivity implements GuideWebviewFragment.MyClickListener {
-    public static int DIALOG_MODE_OFF = 20001;
-    public static int DIALOG_MODE_ON = 20000;
-    public static int DIALOG_MODE_ONLY_BUTTON = 20002;
-    public static String KEY_BOOT_GROUP = "BOOT_GROUP";
-    public static String KEY_BOOT_MODE = "BOOT_MODE";
-    public static String KEY_DIALOG_BUTTON_NO = "DIALOG_NO";
-    public static String KEY_DIALOG_BUTTON_YES = "DIALOG_YES";
-    public static String KEY_DIALOG_MODE = "DIALOG_MODE";
-    public static String KEY_DIALOG_TITLE = "DIALOG_TITLE";
-    public static String KEY_GUIDE_VER = "GUIDE_VER";
-    public static String KEY_HTML_PATH = "HTML_PATH";
-    public static int MODE_AUTO = 10001;
-    public static int MODE_MANUAL = 10000;
-    public String SP_KEY_GUIDE_VER = "GuideVersion";
-    private String boot_group;
-    private int boot_mode;
-    private int dialog_mode;
-    private ArrayList<String> htmlpath = new ArrayList<>();
-    private MyFragmentStatePagerAdapter mAdapter;
-    private Button mCancel;
-    private String mDialogButtonNo = "";
-    private String mDialogButtonYes = "";
-    private TextView mDialogText;
-    private String mDialogTextMessage = "";
-    private View mGrayLine_Hor;
-    private LinearLayout mGuideDialogView;
-    private Button mOK;
-    private LinearLayout mPageDisplayView;
-    private MyViewPager mViewPager;
-    private int version;
-
-    protected void onCreate(Bundle bundle) {
-        String str;
-        super.onCreate(bundle);
-        setContentView(C0907R.layout.activity_notice_guide);
-        Intent intent = getIntent();
-        if (intent != null) {
-            htmlpath = intent.getStringArrayListExtra(KEY_HTML_PATH);
-            if (this.htmlpath.size() == 0) {
-                finish();
-            }
-            boot_mode = intent.getIntExtra(KEY_BOOT_MODE, 0);
-            boot_group = intent.getStringExtra(KEY_BOOT_GROUP);
-            dialog_mode = intent.getIntExtra(KEY_DIALOG_MODE, 0);
-            version = intent.getIntExtra(KEY_GUIDE_VER, 0);
-            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) {
-                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)) {
-                finish();
-            }
-        }
-        final MyPageAdapter myPageAdapter = new MyPageAdapter();
-        mAdapter = new MyFragmentStatePagerAdapter(getSupportFragmentManager(), htmlpath);
-        mViewPager = (MyViewPager) findViewById(C0907R.C0909id.guideViewPager);
-        mViewPager.setAdapter(mAdapter);
-        mViewPager.setOffscreenPageLimit(2);
-        mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
-            public void onPageScrollStateChanged(int i) {
-            }
-
-            public void onPageScrolled(int i, float f, int i2) {
-            }
-
-            public void onPageSelected(int i) {
-                myPageAdapter.changePage(i);
-            }
-        });
-        mPageDisplayView = (LinearLayout) findViewById(C0907R.C0909id.pageDisplayViewGroup);
-        myPageAdapter.setPageSize(mPageDisplayView, mAdapter.getCount());
-        myPageAdapter.changePage(mViewPager.getCurrentItem());
-        mGuideDialogView = (LinearLayout) findViewById(C0907R.C0909id.guide_dialog_layout);
-        mGrayLine_Hor = findViewById(C0907R.C0909id.guide_dialog_horizon_gray_line);
-        mDialogText = (TextView) findViewById(C0907R.C0909id.guide_dialog_message);
-        int i = dialog_mode;
-        if (i == DIALOG_MODE_ON || i == DIALOG_MODE_ONLY_BUTTON) {
-            mGuideDialogView.setVisibility(0);
-            ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) mGuideDialogView.getLayoutParams();
-            marginLayoutParams.width = (int) Utils.dptopx(Utils.getWebViewDP(this, getApplicationContext()) + Utils.LAYOUT_MEARGIN, getApplicationContext());
-            mGuideDialogView.setLayoutParams(marginLayoutParams);
-            mOK = (Button) findViewById(C0907R.C0909id.ok_button);
-            mCancel = (Button) findViewById(C0907R.C0909id.cancel_btn);
-            String str2 = mDialogButtonYes;
-            if (str2 != null) {
-                mOK.setText(str2);
-            }
-            String str3 = mDialogButtonNo;
-            if (str3 != null) {
-                mCancel.setText(str3);
-            }
-            mOK.setOnClickListener(new View.OnClickListener() {
-                public void onClick(View view) {
-                    NoticeGuideActivity.this.setResult(-1);
-                    NoticeGuideActivity.this.onClickClose();
-                }
-            });
-            mCancel.setOnClickListener(new View.OnClickListener() {
-                public void onClick(View view) {
-                    NoticeGuideActivity.this.setResult(0);
-                    NoticeGuideActivity.this.onClickClose();
-                }
-            });
-            if (this.dialog_mode == DIALOG_MODE_ON && (str = mDialogTextMessage) != null) {
-                mDialogText.setText(str);
-            }
-            if (this.dialog_mode == DIALOG_MODE_ONLY_BUTTON) {
-                mGrayLine_Hor.setVisibility(8);
-                mDialogText.setVisibility(8);
-                mOK.setBackground(getResources().getDrawable(C0907R.C0908drawable.rectangle_left_button));
-                mCancel.setBackground(getResources().getDrawable(C0907R.C0908drawable.rectangle_right_button));
-            }
-        }
-    }
-
-    public void onBackPressed() {
-        onClickClose();
-    }
-
-    public void onClickClose() {
-        if (this.boot_mode == MODE_AUTO) {
-            PreferenceManager.getDefaultSharedPreferences(this).edit().putInt(this.SP_KEY_GUIDE_VER, version).apply();
-        }
-        finish();
-    }
-
-    public void onConfigurationChanged(Configuration configuration) {
-        switch (configuration.orientation) {
-            case 1:
-                if (this.dialog_mode == DIALOG_MODE_ON) {
-                    mGuideDialogView.setVisibility(0);
-                    break;
-                }
-                break;
-            case 2:
-                if (this.dialog_mode == DIALOG_MODE_ON) {
-                    mGuideDialogView.setVisibility(8);
-                    break;
-                }
-                break;
-        }
-        super.onConfigurationChanged(configuration);
-    }
-
-    public static class MyFragmentStatePagerAdapter extends FragmentStatePagerAdapter {
-        private ArrayList<String> HTML_PAGE;
-        private int PAGE_LENGTH;
-
-        private MyFragmentStatePagerAdapter(FragmentManager fragmentManager, ArrayList<String> arrayList) {
-            super(fragmentManager);
-            HTML_PAGE = new ArrayList<>();
-            PAGE_LENGTH = 0;
-            HTML_PAGE = arrayList;
-            PAGE_LENGTH = arrayList.size();
-        }
-
-        public Fragment getItem(int i) {
-            return GuideWebviewFragment.newInstance(String.format(Locale.US, HTML_PAGE.get(i), new Object[]{Integer.valueOf(i + 1)}));
-        }
-
-        public int getCount() {
-            return PAGE_LENGTH;
-        }
-    }
-
-    class MyPageAdapter {
-        private ImageView[] mPagePosition;
-
-        private MyPageAdapter() {
-        }
-
-        private void setPageSize(@NonNull ViewGroup viewGroup, int i) {
-            mPagePosition = new ImageView[i];
-            int i2 = 0;
-            while (i2 < i) {
-                ImageView imageView = new ImageView(NoticeGuideActivity.this.getApplicationContext());
-                imageView.setImageResource(C0907R.C0908drawable.cycle02);
-                int i3 = i2 + 1;
-                viewGroup.addView(imageView, i3);
-                mPagePosition[i2] = imageView;
-                i2 = i3;
-            }
-        }
-
-        private void changePage(int i) {
-            int i2 = 0;
-            while (true) {
-                ImageView[] imageViewArr = mPagePosition;
-                if (i2 < imageViewArr.length) {
-                    if (imageViewArr[i2] != null) {
-                        if (i == i2) {
-                            imageViewArr[i2].setImageResource(C0907R.C0908drawable.cycle03);
-                        } else {
-                            imageViewArr[i2].setImageResource(C0907R.C0908drawable.cycle02);
-                        }
-                    }
-                    i2++;
-                } else {
-                    return;
-                }
-            }
-        }
-    }
-}

+ 0 - 44
app/src/main/java/epson/common/guide/Utils.java

@@ -1,44 +0,0 @@
-package com.epson.mobilephone.common.guide;
-
-import android.app.Activity;
-import android.content.Context;
-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;
-    public static int WEBVIEW_500DP_SIZE = 500;
-
-    public static int getWebViewDP(Activity activity, Context context) {
-        float pxtodp = pxtodp(getDisplaySize(activity).x, context);
-        float pxtodp2 = pxtodp(getDisplaySize(activity).y, context);
-        if (pxtodp2 == 0.0f || pxtodp == 0.0f) {
-            return WEBVIEW_300DP_SIZE;
-        }
-        if (pxtodp2 < pxtodp) {
-            int i = (int) (((double) pxtodp2) * 0.7d);
-            int i2 = WEBVIEW_500DP_SIZE;
-            return i < LAYOUT_MEARGIN + i2 ? i : i2;
-        }
-        int i3 = (int) (((double) pxtodp) * 0.7d);
-        int i4 = WEBVIEW_500DP_SIZE;
-        return i3 < LAYOUT_MEARGIN + i4 ? i3 : i4;
-    }
-
-    public static Point getDisplaySize(Activity activity) {
-        Display defaultDisplay = activity.getWindowManager().getDefaultDisplay();
-        Point point = new Point();
-        defaultDisplay.getSize(point);
-        return point;
-    }
-
-    public static float pxtodp(int i, Context context) {
-        return ((float) i) / context.getResources().getDisplayMetrics().density;
-    }
-
-    public static float dptopx(int i, Context context) {
-        return TypedValue.applyDimension(1, (float) i, context.getResources().getDisplayMetrics());
-    }
-}

+ 2 - 2
app/src/main/java/epson/common/usb/UsbPrinter.java

@@ -87,7 +87,7 @@ public class UsbPrinter {
         EpLog.m78i(TAG, "bulkTransfer length=" + i);
         int bulkTransfer = usbPrinter.bulkTransfer(this.endPointIn, bArr, i, Constants.EDAM_BUSINESS_NOTEBOOKS_MAX);
         EpLog.m78i(TAG, "bulkTransfer readByte=" + bulkTransfer);
-        if (bulkTransfer < 0 && ((double) getElapsedTime()) >= 4500.0d) {
+        if (bulkTransfer < 0 && ( getElapsedTime()) >= 4500.0d) {
             bulkTransfer = 0;
             EpLog.m78i(TAG, "bulkTransfer timeout occurred");
         }
@@ -106,7 +106,7 @@ public class UsbPrinter {
         EpLog.m78i(TAG, "bulkTransfer length=" + i);
         int bulkTransfer = usbPrinter.bulkTransfer(this.endPointOut, bArr, i, Constants.EDAM_BUSINESS_NOTEBOOKS_MAX);
         EpLog.m78i(TAG, "bulkTransfer writtenByte=" + bulkTransfer);
-        if (bulkTransfer < 0 && ((double) getElapsedTime()) >= 4500.0d) {
+        if (bulkTransfer < 0 && ( getElapsedTime()) >= 4500.0d) {
             bulkTransfer = 0;
             EpLog.m78i(TAG, "bulkTransfer timeout occurred");
         }

+ 1 - 1
app/src/main/java/epson/common/wifidirect/ActivityWiFiDirectBase.java

@@ -18,7 +18,7 @@ public abstract class ActivityWiFiDirectBase extends ActivityIACommon {
     }
 
     private void setupCommonHeaderControl(boolean z, boolean z2) {
-        setActionBar((int) R.string.str_wifidirect_settings, z);
+        setActionBar( R.string.str_wifidirect_settings, z);
         bDisplayHomeAsUpEnabled = z;
         bSupportCancel = z2;
     }

+ 4 - 4
app/src/main/java/epson/common/wifidirect/ActivityWiFiDirectManual.java

@@ -112,8 +112,8 @@ public class ActivityWiFiDirectManual extends ActivityWiFiDirectBase {
 
     private void updateGuidance(boolean z) {
         if (z) {
-            mWithLcdGuidanceView.setVisibility(8);
-            mNoLcdGuidanceWebView.setVisibility(0);
+            mWithLcdGuidanceView.setVisibility(View.GONE);
+            mNoLcdGuidanceWebView.setVisibility(View.VISIBLE);
             String string = getString(R.string.path_wifidirect_guide_panelless);
             if (string == null) {
                 finish();
@@ -121,8 +121,8 @@ public class ActivityWiFiDirectManual extends ActivityWiFiDirectBase {
                 mNoLcdGuidanceWebView.loadUrl(string);
             }
         } else {
-            mNoLcdGuidanceWebView.setVisibility(8);
-            mWithLcdGuidanceView.setVisibility(0);
+            mNoLcdGuidanceWebView.setVisibility(View.GONE);
+            mWithLcdGuidanceView.setVisibility(View.VISIBLE);
         }
     }
 

+ 1 - 1
app/src/main/java/epson/common/wifidirect/ActivityWiFiDirectStart.java

@@ -12,7 +12,7 @@ public class ActivityWiFiDirectStart extends ActivityWiFiDirectBase {
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.wifidirect_start);
+        setContentView( R.layout.wifidirect_start);
         setupCommonHeaderControl(false, true);
         viewiPrintConnect = ((ViewGroup) findViewById(R.id.wifi_start_top)).findViewById(R.id.iprint_connect);
         viewiPrintConnect.setOnClickListener(new View.OnClickListener() {

+ 7 - 7
app/src/main/java/epson/common/wifidirect/ActivityiPrintConnect.java

@@ -115,7 +115,7 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
         switch (this.status) {
             case IDLE:
                 setDisplayMenu(false);
-                toolbar.setVisibility(8);
+                toolbar.setVisibility(View.GONE);
                 status = Status.CONNECTING_TEMPAP;
                 startConnectTempAp();
                 return;
@@ -208,8 +208,8 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
 
     private void onConnectSimpleAP() {
         EPLog.m86d(TAG, "onConnectSimpleAP()");
-        toolbar.setVisibility(0);
-        progress.setVisibility(8);
+        toolbar.setVisibility(View.VISIBLE);
+        progress.setVisibility(View.GONE);
         setDisplayMenu(true);
         textView1.setText(getResources().getString(R.string.str_connected_printer1));
         TextView textView = textView2;
@@ -221,8 +221,8 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
 
     private void onConnectOtherAP() {
         EPLog.m86d(TAG, "onConnectOtherAP()");
-        toolbar.setVisibility(8);
-        progress.setVisibility(8);
+        toolbar.setVisibility(View.GONE);
+        progress.setVisibility(View.GONE);
         setDisplayMenu(true);
         textView1.setText(getResources().getString(R.string.str_connected_otherAP1));
         textView2.setText(getResources().getString(R.string.str_connected_otherAP2));
@@ -231,8 +231,8 @@ public class ActivityiPrintConnect extends ActivityWiFiDirectBase {
 
     private void onConnectError() {
         EPLog.m86d(TAG, "onConnectError()");
-        toolbar.setVisibility(8);
-        progress.setVisibility(8);
+        toolbar.setVisibility(View.GONE);
+        progress.setVisibility(View.GONE);
         setDisplayMenu(true);
         textView1.setText(getResources().getString(R.string.str_connect_error1));
         textView2.setText(getResources().getString(R.string.str_connect_error2));

+ 5 - 5
app/src/main/java/epson/common/wifidirect/DialogProgressWiFiDirect.java

@@ -120,17 +120,17 @@ public class DialogProgressWiFiDirect extends DialogFragment {
             progressBar.setLayoutParams(layoutParams);
             TextView textView = (TextView) inflate.findViewById(C1113R.C1115id.dialog_progress_text_bottom);
             textView.setText(string);
-            progressBar.setVisibility(0);
-            textView.setVisibility(0);
+            progressBar.setVisibility(View.VISIBLE);
+            textView.setVisibility(View.VISIBLE);
         } else if (i == 0) {
             TextView textView2 = (TextView) inflate.findViewById(C1113R.C1115id.dialog_progress_text_right);
             textView2.setText(string);
-            progressBar.setVisibility(0);
-            textView2.setVisibility(0);
+            progressBar.setVisibility(View.VISIBLE);
+            textView2.setVisibility(View.VISIBLE);
         } else {
             TextView textView3 = (TextView) inflate.findViewById(C1113R.C1115id.dialog_progress_text_right);
             textView3.setText(string);
-            textView3.setVisibility(0);
+            textView3.setVisibility(View.VISIBLE);
         }
         builder.setView(inflate);
         return builder.create();

+ 2 - 2
app/src/main/java/epson/common/wifidirect/NfcTagParser.java

@@ -41,7 +41,7 @@ public class NfcTagParser {
     }
 
     public String getMacAddress() {
-        return NfcMacAddrUtils.getMacAdressStr(ArrayUtils.subarray(this.tagData, 115, (int) Imgproc.COLOR_YUV2RGBA_YVYU));
+        return NfcMacAddrUtils.getMacAdressStr(ArrayUtils.subarray(this.tagData, 115,  Imgproc.COLOR_YUV2RGBA_YVYU));
     }
 
     public String getSSID() {
@@ -59,7 +59,7 @@ public class NfcTagParser {
     }
 
     public String getIPAddressV4() {
-        return formatIPAddressV4(ArrayUtils.subarray(this.tagData, (int) OFFSET_IPADDRESSV4, 150));
+        return formatIPAddressV4(ArrayUtils.subarray(this.tagData,  OFFSET_IPADDRESSV4, 150));
     }
 
     public String getIPAddressV4SimpleAP() {

+ 1 - 1
app/src/main/java/epson/epsonconnectregistration/ActivityECConfiguration.java

@@ -18,7 +18,7 @@ public class ActivityECConfiguration extends AppCompatActivity {
 
     protected void onCreate(Bundle bundle) {
         super.onCreate(bundle);
-        setContentView((int) R.layout.activity_config_service);
+        setContentView( R.layout.activity_config_service);
         boolean booleanExtra = getIntent().getBooleanExtra(INTENT_EC_BLE_CONTENT, false);
         MyPrinter curPrinter = MyPrinter.getCurPrinter(this);
         if (curPrinter.getIp() == null) {

+ 2 - 2
app/src/main/java/epson/epsonconnectregistration/ECAvailableCheckTask.java

@@ -151,8 +151,8 @@ public class ECAvailableCheckTask extends ECBaseTask {
                 textView.setText(R.string.ec_registration_dialog_title);
             }
             if (eCStatus != ECStatus.ERROR_NONE) {
-                inflate.findViewById(R.id.epsonconnect_title_tv).setVisibility(8);
-                inflate.findViewById(R.id.epsonconnect_sub_msg_tv).setVisibility(8);
+                inflate.findViewById(R.id.epsonconnect_title_tv).setVisibility(View.GONE);
+                inflate.findViewById(R.id.epsonconnect_sub_msg_tv).setVisibility(View.GONE);
                 switch (eCStatus) {
                     case ERROR_PRINTER_NOT_SUPPORT_EC:
                         textView2.setText(R.string.ec_registration_dialog_not_support_ec);

+ 2 - 2
app/src/main/java/epson/epsonconnectregistration/ECConfigurationTask.java

@@ -107,7 +107,7 @@ public class ECConfigurationTask extends ECBaseTask {
             EpLog.m83w(TAG, "activity is null. Maybe activity died");
         } else if (ECStatus.ERROR_NONE.equals(eCStatus)) {
             EpLog.m70d(TAG, "Succeed Configuration");
-            AlertDialog create = new AlertDialog.Builder(activity).setTitle((int) R.string.ec_enabled_title).setMessage((int) R.string.ec_enabled_message).setPositiveButton((int) R.string.str_next, (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {
+            AlertDialog create = new AlertDialog.Builder(activity).setTitle( R.string.ec_enabled_title).setMessage( R.string.ec_enabled_message).setPositiveButton( R.string.str_next, (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialogInterface, int i) {
                     ECConfigurationTask eCConfigurationTask = ECConfigurationTask.this;
                     eCConfigurationTask.openWebPage(activity, eCConfigurationTask.registrationUri);
@@ -118,7 +118,7 @@ public class ECConfigurationTask extends ECBaseTask {
             create.show();
         } else {
             EpLog.m70d(TAG, "Failed Configuration");
-            AlertDialog create2 = new AlertDialog.Builder(activity).setTitle((int) R.string.ec_enabling_error_title).setMessage((int) R.string.ec_enabling_error_message).setPositiveButton((int) R.string.str_ok, (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {
+            AlertDialog create2 = new AlertDialog.Builder(activity).setTitle( R.string.ec_enabling_error_title).setMessage( R.string.ec_enabling_error_message).setPositiveButton( R.string.str_ok, (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialogInterface, int i) {
                     activity.finish();
                 }

+ 2 - 2
app/src/main/java/epson/epsonconnectregistration/SoapWEBSETUPDataInfo.java

@@ -53,7 +53,7 @@ public class SoapWEBSETUPDataInfo extends SoapConfigDataParser {
             if (BoxConstants.ROOT_FOLDER_ID.equals(getValue(ID_WEBSERVER_STATUS)) || BoxConstants.ROOT_FOLDER_ID.equals(getValue(ID_XMPPSERVER_STATUS))) {
                 Double valueOf2 = Double.valueOf(Double.parseDouble(getValue(ID_VERSION)));
                 Integer valueOf3 = Integer.valueOf(valueOf2.intValue());
-                Integer valueOf4 = Integer.valueOf(new Double((valueOf2.doubleValue() - ((double) valueOf2.intValue())) * 100.0d).intValue());
+                Integer valueOf4 = Integer.valueOf(new Double((valueOf2.doubleValue() - ( valueOf2.intValue())) * 100.0d).intValue());
                 if (valueOf3.intValue() == 1 && valueOf4.intValue() == 0) {
                     EpLog.m78i(TAG, "WebServerStatus:disable or XMPPServerStatus:disable -> unregistered");
                     return true;
@@ -85,7 +85,7 @@ public class SoapWEBSETUPDataInfo extends SoapConfigDataParser {
             if (BoxConstants.ROOT_FOLDER_ID.equals(getValue(ID_WEBSERVER_STATUS)) || BoxConstants.ROOT_FOLDER_ID.equals(getValue(ID_XMPPSERVER_STATUS))) {
                 Double valueOf2 = Double.valueOf(Double.parseDouble(getValue(ID_VERSION)));
                 Integer valueOf3 = Integer.valueOf(valueOf2.intValue());
-                Integer valueOf4 = Integer.valueOf(new Double((valueOf2.doubleValue() - ((double) valueOf2.intValue())) * 100.0d).intValue());
+                Integer valueOf4 = Integer.valueOf(new Double((valueOf2.doubleValue() - ( valueOf2.intValue())) * 100.0d).intValue());
                 if (valueOf3.intValue() != 1 || valueOf4.intValue() != 0) {
                     return ECStatus.ERROR_PRINTER_NOT_SUPPORT_EC;
                 }

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

@@ -97,7 +97,7 @@ public class BatteryInfoAdapter extends ArrayAdapter<BatteryInfoList> {
         }
 
         public static void clearBatteryList(Activity activity) {
-            activity.findViewById(R.id.bt_PowerText).setVisibility(8);
+            activity.findViewById(R.id.bt_PowerText).setVisibility(View.GONE);
             showListView(activity, (BatteryInfoAdapter) null);
         }
 
@@ -130,7 +130,7 @@ public class BatteryInfoAdapter extends ArrayAdapter<BatteryInfoList> {
         }
 
         public static void showPowerText(Activity activity) {
-            activity.findViewById(R.id.bt_PowerText).setVisibility(0);
+            activity.findViewById(R.id.bt_PowerText).setVisibility(View.VISIBLE);
         }
 
         static void showListView(Activity activity, BatteryInfoAdapter batteryInfoAdapter) {

Some files were not shown because too many files changed in this diff