|
@@ -115,29 +115,29 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
synchronized (EpsonService.mLockSearchingStatus) {
|
|
|
EpsonService.bNotifyPrinter = false;
|
|
|
}
|
|
|
- String unused = EpsonService.this.f406id = str;
|
|
|
- String unused2 = EpsonService.this.f407ip = str2;
|
|
|
- int unused3 = EpsonService.this.probeMethod = i;
|
|
|
+ String unused = f406id = str;
|
|
|
+ String unused2 = f407ip = str2;
|
|
|
+ int unused3 = probeMethod = i;
|
|
|
if (searchingPrinter != null) {
|
|
|
EPLog.d("EpsonService", "searchPrinters() search intterrupt()");
|
|
|
- EpsonService.this.searchingPrinter.interrupt();
|
|
|
+ searchingPrinter.interrupt();
|
|
|
try {
|
|
|
- EpsonService.this.searchingPrinter.join();
|
|
|
+ searchingPrinter.join();
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
EpsonService.access$504(EpsonService.this);
|
|
|
if (mSearchCount > 1) {
|
|
|
- EPLog.e("EpsonService", "search count error! mSearchCount => " + EpsonService.this.mSearchCount);
|
|
|
+ EPLog.e("EpsonService", "search count error! mSearchCount => " + mSearchCount);
|
|
|
}
|
|
|
if (!EpsonService.isInitDriver) {
|
|
|
- EpsonService.this.mEscprLib.release_driver();
|
|
|
+ mEscprLib.release_driver();
|
|
|
boolean unused4 = EpsonService.isInitDriver = true;
|
|
|
- EpsonService.this.mEscprLib.init_driver (getApplicationContext(), ExternalFileUtils.getInstance (getApplicationContext()).getSupportedMediaDir());
|
|
|
+ mEscprLib.init_driver (getApplicationContext(), ExternalFileUtils.getInstance (getApplicationContext()).getSupportedMediaDir());
|
|
|
}
|
|
|
- EpsonService.this.createSearchingThread();
|
|
|
- EpsonService.this.searchingPrinter.start();
|
|
|
+ createSearchingThread();
|
|
|
+ searchingPrinter.start();
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -147,10 +147,10 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
EPLog.e("Epson", "cancelSearchPrinter() finish1");
|
|
|
return 0;
|
|
|
}
|
|
|
- EpsonService.this.searchingPrinter.interrupt();
|
|
|
+ searchingPrinter.interrupt();
|
|
|
try {
|
|
|
EPLog.d("EpsonService", "searchingPrinter.join() enter");
|
|
|
- EpsonService.this.searchingPrinter.join(1000);
|
|
|
+ searchingPrinter.join(1000);
|
|
|
int i = 0;
|
|
|
while (true) {
|
|
|
if (!Thread.State.RUNNABLE.equals(searchingPrinter.getState())) {
|
|
@@ -162,8 +162,8 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
break;
|
|
|
}
|
|
|
EPLog.d("EpsonService", "retry doCancelFindPrinter() " + i2);
|
|
|
- EpsonService.this.searchingPrinter.interrupt();
|
|
|
- EpsonService.this.searchingPrinter.join(1000);
|
|
|
+ searchingPrinter.interrupt();
|
|
|
+ searchingPrinter.join(1000);
|
|
|
i = i2;
|
|
|
}
|
|
|
EPLog.d("EpsonService", "searchingPrinter.join() leave");
|
|
@@ -176,7 +176,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
|
|
|
public void setTimeOut(int i) throws RemoteException {
|
|
|
EPLog.d("EpsonService", "timeout = " + i);
|
|
|
- int unused = EpsonService.this.timeout_sec = i;
|
|
|
+ int unused = timeout_sec = i;
|
|
|
}
|
|
|
|
|
|
public int setCurPrinter(int i) throws RemoteException {
|
|
@@ -186,7 +186,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
EPLog.e("Epson", "Finish cancelSearchPrinter()");
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
EPLog.d("EpsonService", "Start set_printer()");
|
|
|
- i2 = EpsonService.this.mEscprLib.set_printer(i);
|
|
|
+ i2 = mEscprLib.set_printer(i);
|
|
|
EPLog.d("EpsonService", "setCurPrinter: result = " + i2);
|
|
|
}
|
|
|
return i2;
|
|
@@ -198,36 +198,36 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
EPLog.i("☆☆ isRemotePrinter " + z2);
|
|
|
PrintSetting.Kind valueOf = PrintSetting.Kind.valueOf(str);
|
|
|
if (z2) {
|
|
|
- int unused = EpsonService.this.createECPrintingThread(valueOf, ePImageList);
|
|
|
+ int unused = createECPrintingThread(valueOf, ePImageList);
|
|
|
if (printingThread != null) {
|
|
|
- EpsonService.this.printingThread.start();
|
|
|
+ printingThread.start();
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
- EpsonService.this.startLocalNonPdfPrintThread(valueOf, ePImageList, z);
|
|
|
+ startLocalNonPdfPrintThread(valueOf, ePImageList, z);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
public int printLocalPdf(String str, String str2, String str3, boolean z, int i, int i2, boolean z2) {
|
|
|
- EpsonService.this.startPdfPrintThread(str, str2, str3, z, i, i2, z2);
|
|
|
+ startPdfPrintThread(str, str2, str3, z, i, i2, z2);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
public int printWithImagesAndLayouts(List<ImageAndLayout> list, boolean z) {
|
|
|
EpsonService epsonService = EpsonService.this;
|
|
|
Thread unused = epsonService.printingThread = new PrintAndLayoutThread(epsonService, list, z);
|
|
|
- EpsonService.this.printingThread.start();
|
|
|
+ printingThread.start();
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
public int cancelPrint() throws RemoteException {
|
|
|
- return EpsonService.this.mEscprLib.cancel_print();
|
|
|
+ return mEscprLib.cancel_print();
|
|
|
}
|
|
|
|
|
|
public int getLang() throws RemoteException {
|
|
|
int i;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- i = EpsonService.this.mEscprLib.get_lang();
|
|
|
+ i = mEscprLib.get_lang();
|
|
|
}
|
|
|
return i;
|
|
|
}
|
|
@@ -240,7 +240,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
if (z) {
|
|
|
i2 = EpsonConnectGetSupportedMedia(i, str, str2);
|
|
|
} else {
|
|
|
- i2 = EpsonService.this.mEscprLib.get_supported_media2();
|
|
|
+ i2 = mEscprLib.get_supported_media2();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -251,7 +251,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public int[] getPaperSize() throws RemoteException {
|
|
|
int[] iArr;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- iArr = EpsonService.this.mEscprLib.get_paper_size();
|
|
|
+ iArr = mEscprLib.get_paper_size();
|
|
|
}
|
|
|
return iArr;
|
|
|
}
|
|
@@ -259,7 +259,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public int[] getPaperType(int i) throws RemoteException {
|
|
|
int[] iArr;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- iArr = EpsonService.this.mEscprLib.get_paper_type(i);
|
|
|
+ iArr = mEscprLib.get_paper_type(i);
|
|
|
}
|
|
|
return iArr;
|
|
|
}
|
|
@@ -267,7 +267,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public int[] getLayout(int i, int i2) throws RemoteException {
|
|
|
int[] iArr;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- iArr = EpsonService.this.mEscprLib.get_layout(i, i2);
|
|
|
+ iArr = mEscprLib.get_layout(i, i2);
|
|
|
}
|
|
|
return iArr;
|
|
|
}
|
|
@@ -275,7 +275,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public int[] getQuality(int i, int i2) throws RemoteException {
|
|
|
int[] iArr;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- iArr = EpsonService.this.mEscprLib.get_quality(i, i2);
|
|
|
+ iArr = mEscprLib.get_quality(i, i2);
|
|
|
}
|
|
|
return iArr;
|
|
|
}
|
|
@@ -283,7 +283,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public int[] getPaperSource(int i, int i2, int i3) throws RemoteException {
|
|
|
int[] iArr;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- iArr = EpsonService.this.mEscprLib.get_paper_source(i, i2);
|
|
|
+ iArr = mEscprLib.get_paper_source(i, i2);
|
|
|
}
|
|
|
return iArr;
|
|
|
}
|
|
@@ -311,7 +311,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
iArr[i5] = ((Integer) arrayList.get(i5)).intValue();
|
|
|
}
|
|
|
} else {
|
|
|
- iArr = EpsonService.this.mEscprLib.get_color(i2, i3);
|
|
|
+ iArr = mEscprLib.get_color(i2, i3);
|
|
|
}
|
|
|
}
|
|
|
return iArr;
|
|
@@ -320,7 +320,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public int getDuplex(int i, int i2) throws RemoteException {
|
|
|
int i3;
|
|
|
synchronized (EpsonService.mLock) {
|
|
|
- i3 = EpsonService.this.mEscprLib.get_duplex(i, i2);
|
|
|
+ i3 = mEscprLib.get_duplex(i, i2);
|
|
|
}
|
|
|
return i3;
|
|
|
}
|
|
@@ -328,7 +328,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public boolean isPrinting() {
|
|
|
boolean access$1700;
|
|
|
synchronized (EpsonService.mLockPrintingStatus) {
|
|
|
- access$1700 = EpsonService.this.bPrinting;
|
|
|
+ access$1700 = bPrinting;
|
|
|
}
|
|
|
return access$1700;
|
|
|
}
|
|
@@ -336,7 +336,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
public boolean isSearchingPrinter() {
|
|
|
boolean access$1800;
|
|
|
synchronized (EpsonService.mLockSearchingStatus) {
|
|
|
- access$1800 = EpsonService.this.bSearching;
|
|
|
+ access$1800 = bSearching;
|
|
|
}
|
|
|
return access$1800;
|
|
|
}
|
|
@@ -351,15 +351,15 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
boolean unused = EpsonService.bCancelPrinting = true;
|
|
|
synchronized (EpsonService.mCancelLock) {
|
|
|
if (mEPImageCreator != null) {
|
|
|
- EpsonService.this.mEPImageCreator.requestStop();
|
|
|
+ mEPImageCreator.requestStop();
|
|
|
}
|
|
|
}
|
|
|
if (bPrinting) {
|
|
|
if (mLocalPrintThread != null) {
|
|
|
- EpsonService.this.mLocalPrintThread.interrupt();
|
|
|
+ mLocalPrintThread.interrupt();
|
|
|
}
|
|
|
EPLog.e("lam dai hiep", "confirm_cancel: " + z);
|
|
|
- EpsonService.this.mEscprLib.confirm_cancel(z);
|
|
|
+ mEscprLib.confirm_cancel(z);
|
|
|
} else if (isSearchingPrinter()) {
|
|
|
try {
|
|
|
cancelSearchPrinter();
|
|
@@ -373,7 +373,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
|
|
|
public int confirmContinueable(boolean z) {
|
|
|
EPLog.e("LAM DAI HIEP", "confirmContinueable() call: " + z);
|
|
|
- return EpsonService.this.mEscprLib.confirm_continue(z);
|
|
|
+ return mEscprLib.confirm_continue(z);
|
|
|
}
|
|
|
|
|
|
public int updatePrinterSettings(String str) {
|
|
@@ -828,21 +828,21 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
int i17 = i;
|
|
|
EPLog.d("EpsonService", "EpsonConnectCreateJob() called.");
|
|
|
mEcClientLib.resetCancel();
|
|
|
- EpsonService.this.epsJobattrib.mMediaSizeIdx = i2;
|
|
|
- EpsonService.this.epsJobattrib.mMediaTypeIdx = i3;
|
|
|
- EpsonService.this.epsJobattrib.mPrintLayout = i4;
|
|
|
- EpsonService.this.epsJobattrib.mPrintQuality = i5;
|
|
|
- EpsonService.this.epsJobattrib.mPaperSource = i6;
|
|
|
+ epsJobattrib.mMediaSizeIdx = i2;
|
|
|
+ epsJobattrib.mMediaTypeIdx = i3;
|
|
|
+ epsJobattrib.mPrintLayout = i4;
|
|
|
+ epsJobattrib.mPrintQuality = i5;
|
|
|
+ epsJobattrib.mPaperSource = i6;
|
|
|
if (i7 == 1) {
|
|
|
- EpsonService.this.epsJobattrib.mColorMode = 2;
|
|
|
+ epsJobattrib.mColorMode = 2;
|
|
|
} else {
|
|
|
- EpsonService.this.epsJobattrib.mColorMode = 1;
|
|
|
+ epsJobattrib.mColorMode = 1;
|
|
|
}
|
|
|
- EpsonService.this.epsJobattrib.mBrightness = i8;
|
|
|
- EpsonService.this.epsJobattrib.mContrast = i9;
|
|
|
- EpsonService.this.epsJobattrib.mSaturation = i10;
|
|
|
- EpsonService.this.epsJobattrib.mPrintDirection = i11;
|
|
|
- EpsonService.this.epsJobattrib.mDuplex = i12;
|
|
|
+ epsJobattrib.mBrightness = i8;
|
|
|
+ epsJobattrib.mContrast = i9;
|
|
|
+ epsJobattrib.mSaturation = i10;
|
|
|
+ epsJobattrib.mPrintDirection = i11;
|
|
|
+ epsJobattrib.mDuplex = i12;
|
|
|
int i18 = 0;
|
|
|
int ensureLogin = ensureLogin(false);
|
|
|
if (ensureLogin != 0) {
|
|
@@ -861,7 +861,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
try {
|
|
|
String createJobFileName = EcClientLibUtil.getCreateJobFileName(i, str);
|
|
|
try {
|
|
|
- ensureLogin = mEcClientLib.CreateJob(i, createJobFileName == null ? i17 != 2 ? "iPrint" : "iPrint Photo" : createJobFileName, i18, EpsonService.this.epsJobattrib, i16, i15);
|
|
|
+ ensureLogin = mEcClientLib.CreateJob(i, createJobFileName == null ? i17 != 2 ? "iPrint" : "iPrint Photo" : createJobFileName, i18, epsJobattrib, i16, i15);
|
|
|
mRemotePrintMaxFileSize = mEcClientLib.mEccJobInfo.mMaxFileSize;
|
|
|
return ensureLogin;
|
|
|
} catch (NullPointerException e) {
|
|
@@ -940,7 +940,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
}
|
|
|
} else {
|
|
|
mEpsonConnectlogin = false;
|
|
|
- int Login = mEcClientLib.Login(EcClientLibUtil.quoteForJsonString(str), EcClientLibUtil.quoteForJsonString(str2), EpsonService.this.clientId);
|
|
|
+ int Login = mEcClientLib.Login(EcClientLibUtil.quoteForJsonString(str), EcClientLibUtil.quoteForJsonString(str2), clientId);
|
|
|
if (Login != 0) {
|
|
|
return Login;
|
|
|
}
|
|
@@ -1005,12 +1005,12 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
}
|
|
|
|
|
|
public int ensureLogin(boolean z) {
|
|
|
- EpsonService.this.updateLoginInfo();
|
|
|
+ updateLoginInfo();
|
|
|
if (z) {
|
|
|
mEpsonConnectlogin = false;
|
|
|
}
|
|
|
if (!mEpsonConnectlogin) {
|
|
|
- int Login = mEcClientLib.Login (mailAddress), EcClientLibUtil.quoteForJsonString (accessKey), EpsonService.this.clientId);
|
|
|
+ int Login = mEcClientLib.Login (mailAddress), EcClientLibUtil.quoteForJsonString (accessKey), clientId);
|
|
|
if (Login != 0) {
|
|
|
return Login;
|
|
|
}
|
|
@@ -1028,7 +1028,7 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
}
|
|
|
|
|
|
public void refreshRemotePrinterLogin() {
|
|
|
- EpsonService.this.updateLoginInfo();
|
|
|
+ updateLoginInfo();
|
|
|
}
|
|
|
};
|
|
|
private int mCreatetSheetIndex = 0;
|
|
@@ -1040,19 +1040,19 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
if (i != 30) {
|
|
|
switch (i) {
|
|
|
case 0:
|
|
|
- EpsonService.this.epsNotifyDataChange((String) message.obj);
|
|
|
+ epsNotifyDataChange((String) message.obj);
|
|
|
return true;
|
|
|
case 1:
|
|
|
- EpsonService.this.epsNotifyContinueable(message.arg1);
|
|
|
+ epsNotifyContinueable(message.arg1);
|
|
|
return true;
|
|
|
case 2:
|
|
|
- EpsonService.this.epsNotifyError(message.arg1, message.arg2, ((Boolean) message.obj).booleanValue());
|
|
|
+ epsNotifyError(message.arg1, message.arg2, ((Boolean) message.obj).booleanValue());
|
|
|
return true;
|
|
|
default:
|
|
|
return true;
|
|
|
}
|
|
|
} else {
|
|
|
- EpsonService.this.epsNotifyPage(message.arg1);
|
|
|
+ epsNotifyPage(message.arg1);
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -1323,13 +1323,13 @@ public class EpsonService extends Service implements ApfEpImageAdapter.ProgressC
|
|
|
}
|
|
|
|
|
|
public void interrupt() {
|
|
|
- if (mExecuting_search_printer && EpsonService.this.mEscprLib.cancel_search_printer() == -1305) {
|
|
|
+ if (mExecuting_search_printer && mEscprLib.cancel_search_printer() == -1305) {
|
|
|
mExecuting_search_printer = false;
|
|
|
- boolean unused = EpsonService.this.bEnd = true;
|
|
|
+ boolean unused = bEnd = true;
|
|
|
}
|
|
|
super.interrupt();
|
|
|
synchronized (EpsonService.mLockSearchingStatus) {
|
|
|
- boolean unused2 = EpsonService.this.bSearching = false;
|
|
|
+ boolean unused2 = bSearching = false;
|
|
|
}
|
|
|
}
|
|
|
}
|