|
@@ -3,6 +3,7 @@ package epson.common;
|
|
|
import android.annotation.TargetApi;
|
|
|
import android.app.Activity;
|
|
|
import android.app.AlertDialog;
|
|
|
+import android.app.Service;
|
|
|
import android.content.Context;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.SharedPreferences;
|
|
@@ -20,6 +21,9 @@ import android.os.Environment;
|
|
|
import android.view.KeyEvent;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
+import androidx.annotation.Nullable;
|
|
|
+
|
|
|
import epson.print.CommonDefine;
|
|
|
import epson.print.Util.EPLog;
|
|
|
import epson.print.widgets.CustomTitleAlertDialogBuilder;
|
|
@@ -498,218 +502,12 @@ public class Utils {
|
|
|
textView.setCompoundDrawables(drawable, (Drawable) null, (Drawable) null, (Drawable) null);
|
|
|
}
|
|
|
|
|
|
- /* JADX WARNING: Code restructure failed: missing block: B:11:0x002e, code lost:
|
|
|
- if (r4 == null) goto L_0x004f;
|
|
|
- */
|
|
|
- /* JADX WARNING: Code restructure failed: missing block: B:14:?, code lost:
|
|
|
- r4.close();
|
|
|
- */
|
|
|
- /* JADX WARNING: Code restructure failed: missing block: B:29:0x004c, code lost:
|
|
|
- if (r4 == null) goto L_0x004f;
|
|
|
- */
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:27:0x0049 A[SYNTHETIC, Splitter:B:27:0x0049] */
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:36:0x0057 A[SYNTHETIC, Splitter:B:36:0x0057] */
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:40:0x005c A[SYNTHETIC, Splitter:B:40:0x005c] */
|
|
|
- /* Code decompiled incorrectly, please refer to instructions dump. */
|
|
|
public static java.lang.String getAssetsFileContents(android.content.Context r4, java.lang.String r5) {
|
|
|
- /*
|
|
|
- java.lang.StringBuffer r0 = new java.lang.StringBuffer
|
|
|
- r0.<init>()
|
|
|
- r1 = 255(0xff, float:3.57E-43)
|
|
|
- byte[] r1 = new byte[r1]
|
|
|
- r1 = 0
|
|
|
- android.content.res.AssetManager r4 = r4.getAssets() // Catch:{ IOException -> 0x0041, all -> 0x003e }
|
|
|
- java.io.InputStream r4 = r4.open(r5) // Catch:{ IOException -> 0x0041, all -> 0x003e }
|
|
|
- java.io.BufferedReader r5 = new java.io.BufferedReader // Catch:{ IOException -> 0x003c }
|
|
|
- java.io.InputStreamReader r2 = new java.io.InputStreamReader // Catch:{ IOException -> 0x003c }
|
|
|
- r2.<init>(r4) // Catch:{ IOException -> 0x003c }
|
|
|
- r5.<init>(r2) // Catch:{ IOException -> 0x003c }
|
|
|
- L_0x001c:
|
|
|
- java.lang.String r1 = r5.readLine() // Catch:{ IOException -> 0x0037, all -> 0x0034 }
|
|
|
- if (r1 == 0) goto L_0x002b
|
|
|
- r0.append(r1) // Catch:{ IOException -> 0x0037, all -> 0x0034 }
|
|
|
- java.lang.String r1 = "\n"
|
|
|
- r0.append(r1) // Catch:{ IOException -> 0x0037, all -> 0x0034 }
|
|
|
- goto L_0x001c
|
|
|
- L_0x002b:
|
|
|
- r5.close() // Catch:{ IOException -> 0x002e }
|
|
|
- L_0x002e:
|
|
|
- if (r4 == 0) goto L_0x004f
|
|
|
- L_0x0030:
|
|
|
- r4.close() // Catch:{ IOException -> 0x004f }
|
|
|
- goto L_0x004f
|
|
|
- L_0x0034:
|
|
|
- r0 = move-exception
|
|
|
- r1 = r5
|
|
|
- goto L_0x0055
|
|
|
- L_0x0037:
|
|
|
- r1 = move-exception
|
|
|
- r3 = r1
|
|
|
- r1 = r5
|
|
|
- r5 = r3
|
|
|
- goto L_0x0044
|
|
|
- L_0x003c:
|
|
|
- r5 = move-exception
|
|
|
- goto L_0x0044
|
|
|
- L_0x003e:
|
|
|
- r0 = move-exception
|
|
|
- r4 = r1
|
|
|
- goto L_0x0055
|
|
|
- L_0x0041:
|
|
|
- r4 = move-exception
|
|
|
- r5 = r4
|
|
|
- r4 = r1
|
|
|
- L_0x0044:
|
|
|
- r5.printStackTrace() // Catch:{ all -> 0x0054 }
|
|
|
- if (r1 == 0) goto L_0x004c
|
|
|
- r1.close() // Catch:{ IOException -> 0x004c }
|
|
|
- L_0x004c:
|
|
|
- if (r4 == 0) goto L_0x004f
|
|
|
- goto L_0x0030
|
|
|
- L_0x004f:
|
|
|
- java.lang.String r4 = r0.toString()
|
|
|
- return r4
|
|
|
- L_0x0054:
|
|
|
- r0 = move-exception
|
|
|
- L_0x0055:
|
|
|
- if (r1 == 0) goto L_0x005a
|
|
|
- r1.close() // Catch:{ IOException -> 0x005a }
|
|
|
- L_0x005a:
|
|
|
- if (r4 == 0) goto L_0x005f
|
|
|
- r4.close() // Catch:{ IOException -> 0x005f }
|
|
|
- L_0x005f:
|
|
|
- throw r0
|
|
|
- */
|
|
|
throw new UnsupportedOperationException("Method not decompiled: epson.common.Utils.getAssetsFileContents(android.content.Context, java.lang.String):java.lang.String");
|
|
|
}
|
|
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:19:0x00fc */
|
|
|
- /* Code decompiled incorrectly, please refer to instructions dump. */
|
|
|
public static java.lang.String[] replaceMessage(java.lang.Integer[] r5, int r6, android.content.Context r7) {
|
|
|
- /*
|
|
|
- java.lang.StringBuilder r0 = new java.lang.StringBuilder
|
|
|
- r0.<init>()
|
|
|
- java.lang.String r1 = " currentError = "
|
|
|
- r0.append(r1)
|
|
|
- r0.append(r6)
|
|
|
- java.lang.String r0 = r0.toString()
|
|
|
- com.epson.mobilephone.common.EpLog.m69d(r0)
|
|
|
- r0 = 3
|
|
|
- java.lang.Integer[] r0 = new java.lang.Integer[r0]
|
|
|
- r1 = 0
|
|
|
- r2 = r5[r1]
|
|
|
- r0[r1] = r2
|
|
|
- r2 = 1
|
|
|
- r3 = r5[r2]
|
|
|
- r0[r2] = r3
|
|
|
- r3 = 2
|
|
|
- r5 = r5[r3]
|
|
|
- r0[r3] = r5
|
|
|
- r5 = -11005(0xffffffffffffd503, float:NaN)
|
|
|
- if (r6 == r5) goto L_0x00c7
|
|
|
- r5 = 59
|
|
|
- if (r6 == r5) goto L_0x005b
|
|
|
- switch(r6) {
|
|
|
- case 6: goto L_0x0047;
|
|
|
- case 7: goto L_0x0033;
|
|
|
- default: goto L_0x0031;
|
|
|
- }
|
|
|
- L_0x0031:
|
|
|
- goto L_0x00d9
|
|
|
- L_0x0033:
|
|
|
- r5 = 2131624436(0x7f0e01f4, float:1.8876052E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r2] = r5
|
|
|
- r5 = 2131624435(0x7f0e01f3, float:1.887605E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r1] = r5
|
|
|
- goto L_0x00d9
|
|
|
- L_0x0047:
|
|
|
- r5 = 2131624398(0x7f0e01ce, float:1.8875975E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r2] = r5
|
|
|
- r5 = 2131624397(0x7f0e01cd, float:1.8875973E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r1] = r5
|
|
|
- goto L_0x00d9
|
|
|
- L_0x005b:
|
|
|
- com.epson.mobilephone.common.escpr.EscprLib r5 = com.epson.mobilephone.common.escpr.EscprLib.getInstance()
|
|
|
- com.epson.mobilephone.common.escpr.EPS_REDYINKINFO r6 = new com.epson.mobilephone.common.escpr.EPS_REDYINKINFO
|
|
|
- r6.<init>()
|
|
|
- int r5 = r5.epsGetReadyPrintStatus(r6)
|
|
|
- r4 = 2131625264(0x7f0e0530, float:1.8877731E38)
|
|
|
- java.lang.Integer r4 = java.lang.Integer.valueOf(r4)
|
|
|
- r0[r2] = r4
|
|
|
- r4 = 2131625265(0x7f0e0531, float:1.8877733E38)
|
|
|
- java.lang.Integer r4 = java.lang.Integer.valueOf(r4)
|
|
|
- r0[r1] = r4
|
|
|
- if (r5 != 0) goto L_0x00c4
|
|
|
- int r5 = r6.subscriptionError
|
|
|
- switch(r5) {
|
|
|
- case 1: goto L_0x00b1;
|
|
|
- case 2: goto L_0x009e;
|
|
|
- default: goto L_0x0081;
|
|
|
- }
|
|
|
- L_0x0081:
|
|
|
- java.lang.StringBuilder r5 = new java.lang.StringBuilder
|
|
|
- r5.<init>()
|
|
|
- java.lang.String r4 = " code = "
|
|
|
- r5.append(r4)
|
|
|
- int r4 = r6.subscriptionErrorCode
|
|
|
- r5.append(r4)
|
|
|
- java.lang.String r5 = r5.toString()
|
|
|
- com.epson.mobilephone.common.EpLog.m77i(r5)
|
|
|
- int r5 = r6.subscriptionErrorCode
|
|
|
- java.lang.String r5 = java.lang.String.valueOf(r5)
|
|
|
- goto L_0x00da
|
|
|
- L_0x009e:
|
|
|
- r5 = 2131625262(0x7f0e052e, float:1.8877727E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r2] = r5
|
|
|
- r5 = 2131625263(0x7f0e052f, float:1.887773E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r1] = r5
|
|
|
- goto L_0x00d9
|
|
|
- L_0x00b1:
|
|
|
- r5 = 2131625260(0x7f0e052c, float:1.8877723E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r2] = r5
|
|
|
- r5 = 2131625261(0x7f0e052d, float:1.8877725E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r1] = r5
|
|
|
- goto L_0x00d9
|
|
|
- L_0x00c4:
|
|
|
- java.lang.String r5 = "unknown"
|
|
|
- goto L_0x00da
|
|
|
- L_0x00c7:
|
|
|
- r5 = 2131624364(0x7f0e01ac, float:1.8875906E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r2] = r5
|
|
|
- r5 = 2131624367(0x7f0e01af, float:1.8875912E38)
|
|
|
- java.lang.Integer r5 = java.lang.Integer.valueOf(r5)
|
|
|
- r0[r1] = r5
|
|
|
- L_0x00d9:
|
|
|
- r5 = 0
|
|
|
- L_0x00da:
|
|
|
- java.lang.String[] r6 = new java.lang.String[r3]
|
|
|
- r3 = r0[r1]
|
|
|
- int r3 = r3.intValue()
|
|
|
- java.lang.String r3 = r7.getString(r3)
|
|
|
- r6[r1] = r3
|
|
|
- java.lang.StringBuilder r1 = new java.lang.StringBuilder
|
|
|
- r1.<init>()
|
|
|
- r0 = r0[r2]
|
|
|
- int r0 = r0.intValue()
|
|
|
- java.lang.String r7 = r7.getString(r0)
|
|
|
- r1.append(r7)
|
|
|
- if (r5 != 0) goto L_0x00fe
|
|
|
- java.lang.String r5 = ""
|
|
|
- L_0x00fe:
|
|
|
- r1.append(r5)
|
|
|
- java.lang.String r5 = r1.toString()
|
|
|
- r6[r2] = r5
|
|
|
- return r6
|
|
|
- */
|
|
|
+
|
|
|
throw new UnsupportedOperationException("Method not decompiled: epson.common.Utils.replaceMessage(java.lang.Integer[], int, android.content.Context):java.lang.String[]");
|
|
|
}
|
|
|
}
|