|
@@ -23,6 +23,7 @@ import epson.common.Utils;
|
|
|
import epson.print.R;
|
|
|
import epson.print.MyPrinter;
|
|
|
import epson.print.Util.EPLog;
|
|
|
+import epson.print.WebviewActivity;
|
|
|
import epson.print.copy.ActivityBase;
|
|
|
import epson.print.copy.Component.ecopycomponent.ECopyComponent;
|
|
|
import epson.print.copy.Component.ecopycomponent.ECopyOptionContext;
|
|
@@ -40,49 +41,44 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
private static final int REQUEST_CODE_REPEAT_COPY = 12;
|
|
|
private final int COMM_ERROR = 1;
|
|
|
private final int PROBE_PRINTER = 0;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public String TAG = "CopyActivty";
|
|
|
+ private String TAG = "CopyActivty";
|
|
|
private final int UPDATE_SETTING = 2;
|
|
|
boolean bProbedPrinter = false;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public int clearindex = 0;
|
|
|
+ private int clearindex = 0;
|
|
|
CopyProcess copyProcess;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public boolean doClear = false;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public ActivityBase.errorDialog errordialog;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public String ipAdress;
|
|
|
+ private boolean doClear = false;
|
|
|
+ private ActivityBase.errorDialog errordialog;
|
|
|
+ private String ipAdress;
|
|
|
private RadioGroup mCopyTypeGroup;
|
|
|
Handler mHandler = new Handler(new Handler.Callback() {
|
|
|
public boolean handleMessage(Message message) {
|
|
|
- EPLog.i(CopyActivity.this.TAG, "HandlerCallback");
|
|
|
+ EPLog.i(TAG, "HandlerCallback");
|
|
|
switch (message.what) {
|
|
|
case 0:
|
|
|
- EPLog.i(CopyActivity.this.TAG, "PROBE_PRINTER");
|
|
|
+ EPLog.i(TAG, "PROBE_PRINTER");
|
|
|
CopyActivity copyActivity = CopyActivity.this;
|
|
|
ProbePrinter unused = copyActivity.task = new ProbePrinter();
|
|
|
- CopyActivity.this.task.execute(new Void[0]);
|
|
|
+ task.execute(new Void[0]);
|
|
|
return true;
|
|
|
case 1:
|
|
|
- EPLog.i(CopyActivity.this.TAG, "COMM_ERROR");
|
|
|
+ EPLog.i(TAG, "COMM_ERROR");
|
|
|
CopyActivity copyActivity2 = CopyActivity.this;
|
|
|
ActivityBase.errorDialog unused2 = copyActivity2.errordialog = new ActivityBase.errorDialog(copyActivity2);
|
|
|
- CopyActivity.this.errordialog.showErrorDialog(CopyActivity.this.getString(R.string.EPS_PRNERR_COMM_TITLE), CopyActivity.this.getString(R.string.EPS_PRNERR_COMM5), ActivityBase.DialogButtons.Ok, new ActivityBase.IClose() {
|
|
|
+ errordialog.showErrorDialog(getString(R.string.EPS_PRNERR_COMM_TITLE), getString(R.string.EPS_PRNERR_COMM5), ActivityBase.DialogButtons.Ok, new ActivityBase.IClose() {
|
|
|
public void onClose(ActivityBase.ClickButton clickButton) {
|
|
|
- CopyActivity.this.finish();
|
|
|
+ finish();
|
|
|
}
|
|
|
});
|
|
|
return true;
|
|
|
case 2:
|
|
|
- EPLog.i(CopyActivity.this.TAG, "UPDATE_SETTING");
|
|
|
- if (CopyActivity.this.optionContext == null) {
|
|
|
- CopyActivity.this.fetchCopyOptionContext();
|
|
|
+ EPLog.i(TAG, "UPDATE_SETTING");
|
|
|
+ if (optionContext == null) {
|
|
|
+ fetchCopyOptionContext();
|
|
|
return true;
|
|
|
}
|
|
|
CopyActivity copyActivity3 = CopyActivity.this;
|
|
|
copyActivity3.optionContext = copyActivity3.copyComponent.getBindedCopyOptionContext();
|
|
|
- CopyActivity.this.copyComponent.bindCopyOptionContext(CopyActivity.this.optionContext, CopyActivity.this.optionListener);
|
|
|
+ copyComponent.bindCopyOptionContext(optionContext, optionListener);
|
|
|
CopyActivity copyActivity4 = CopyActivity.this;
|
|
|
copyActivity4.buildCopyOptions(copyActivity4.copyComponent.getCopyOptionItems());
|
|
|
return true;
|
|
@@ -93,39 +89,35 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
});
|
|
|
private ViewGroup mLayout;
|
|
|
private RadioButton mNormalCopyButton;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public MaintainPrinter2 mPrinter;
|
|
|
+ private MaintainPrinter2 mPrinter;
|
|
|
private RadioButton mRepeatCopyButton;
|
|
|
ECopyComponent.ICopyOptionListener optionListener;
|
|
|
ActivityBase.OptionItemChangedListener optionValueChangedListener;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public ActivityBase.settingPreference presettings = new ActivityBase.settingPreference();
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public int printerLocation;
|
|
|
+ private ActivityBase.settingPreference presettings = new ActivityBase.settingPreference();
|
|
|
+ private int printerLocation;
|
|
|
ECopyComponent.ICopySystemSettings systemSettings;
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public ProbePrinter task;
|
|
|
+ private ProbePrinter task;
|
|
|
|
|
|
public void onCreate(Bundle bundle) {
|
|
|
super.onCreate(bundle);
|
|
|
- this.copyComponent.getRemoteOperationUUID(this);
|
|
|
- this.optionContext = null;
|
|
|
- this.mLayout = (ViewGroup) getLayoutInflater().inflate(R.layout.copy, (ViewGroup) null);
|
|
|
- setContentView((View) this.mLayout);
|
|
|
+ copyComponent.getRemoteOperationUUID(this);
|
|
|
+ optionContext = null;
|
|
|
+ mLayout = (ViewGroup) getLayoutInflater().inflate(R.layout.copy, (ViewGroup) null);
|
|
|
+ setContentView((View) mLayout);
|
|
|
setupUi();
|
|
|
setActionBar((int) R.string.FunctionName_iPrint_Copy, true);
|
|
|
- if (this.mPrinter == null) {
|
|
|
- this.mPrinter = MaintainPrinter2.getInstance();
|
|
|
+ if (mPrinter == null) {
|
|
|
+ mPrinter = MaintainPrinter2.getInstance();
|
|
|
}
|
|
|
- this.optionValueChangedListener = new ActivityBase.OptionItemChangedListener() {
|
|
|
+ optionValueChangedListener = new ActivityBase.OptionItemChangedListener() {
|
|
|
public void onOptionItemChanged(ECopyOptionItem eCopyOptionItem) {
|
|
|
- CopyActivity.this.copyComponent.setCopyOptionItem(eCopyOptionItem);
|
|
|
+ copyComponent.setCopyOptionItem(eCopyOptionItem);
|
|
|
}
|
|
|
};
|
|
|
- this.optionListener = new ECopyComponent.ICopyOptionListener() {
|
|
|
+ optionListener = new ECopyComponent.ICopyOptionListener() {
|
|
|
public void onCopyOptionChanged(ECopyOptionItem eCopyOptionItem, ArrayList<ECopyOptionItem> arrayList, ECopyComponent.ICopyOptionListener.CopyOptionChangedError copyOptionChangedError) {
|
|
|
if (copyOptionChangedError != null) {
|
|
|
- CopyActivity.this.loading.dismiss();
|
|
|
+ loading.dismiss();
|
|
|
CopyActivity copyActivity = CopyActivity.this;
|
|
|
ActivityBase.errorDialog errordialog = new ActivityBase.errorDialog(copyActivity);
|
|
|
String[] reasonText = errordialog.getReasonText(copyOptionChangedError);
|
|
@@ -133,65 +125,65 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
return;
|
|
|
}
|
|
|
ArrayList arrayList2 = new ArrayList();
|
|
|
- if (CopyActivity.this.doClear) {
|
|
|
- if (CopyActivity.this.clearindex != CopyActivity.this.copyComponent.getCopyOptionItems().size()) {
|
|
|
- CopyActivity.this.allClear();
|
|
|
+ if (doClear) {
|
|
|
+ if (clearindex != copyComponent.getCopyOptionItems().size()) {
|
|
|
+ allClear();
|
|
|
return;
|
|
|
}
|
|
|
- boolean unused = CopyActivity.this.doClear = false;
|
|
|
- int unused2 = CopyActivity.this.clearindex = 0;
|
|
|
- arrayList2.addAll(CopyActivity.this.copyComponent.getCopyOptionItems());
|
|
|
+ boolean unused = doClear = false;
|
|
|
+ int unused2 = clearindex = 0;
|
|
|
+ arrayList2.addAll(copyComponent.getCopyOptionItems());
|
|
|
}
|
|
|
arrayList2.add(eCopyOptionItem);
|
|
|
if (arrayList != null) {
|
|
|
arrayList2.addAll(arrayList);
|
|
|
}
|
|
|
- CopyActivity.this.buildCopyOptions(arrayList2);
|
|
|
+ buildCopyOptions(arrayList2);
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
|
|
|
public void onResume() {
|
|
|
- EPLog.v(this.TAG, "onResume()");
|
|
|
+ EPLog.v(TAG, "onResume()");
|
|
|
super.onResume();
|
|
|
- this.isKeepSimpleAPConnection = false;
|
|
|
+ isKeepSimpleAPConnection = false;
|
|
|
getPrinterInfo();
|
|
|
- CopyProcess copyProcess2 = this.copyProcess;
|
|
|
+ CopyProcess copyProcess2 = copyProcess;
|
|
|
if (copyProcess2 == null || !copyProcess2.isProccessing()) {
|
|
|
if (!WiFiDirectManager.isNeedConnect(this, WiFiDirectManager.DEVICE_TYPE_PRINTER)) {
|
|
|
- this.isTryConnectSimpleAp = false;
|
|
|
- } else if (!this.isTryConnectSimpleAp) {
|
|
|
- this.isTryConnectSimpleAp = true;
|
|
|
+ isTryConnectSimpleAp = false;
|
|
|
+ } else if (!isTryConnectSimpleAp) {
|
|
|
+ isTryConnectSimpleAp = true;
|
|
|
if (WiFiDirectManager.reconnect(this, WiFiDirectManager.DEVICE_TYPE_PRINTER, -1)) {
|
|
|
- this.isKeepSimpleAPConnection = true;
|
|
|
- this.bProbedPrinter = false;
|
|
|
+ isKeepSimpleAPConnection = true;
|
|
|
+ bProbedPrinter = false;
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- this.loading.show();
|
|
|
- if (!this.bProbedPrinter) {
|
|
|
- this.mHandler.sendEmptyMessage(0);
|
|
|
+ loading.show();
|
|
|
+ if (!bProbedPrinter) {
|
|
|
+ mHandler.sendEmptyMessage(0);
|
|
|
} else {
|
|
|
- this.mHandler.sendEmptyMessage(2);
|
|
|
+ mHandler.sendEmptyMessage(2);
|
|
|
}
|
|
|
} else {
|
|
|
- this.copyProcess.setDisconnectWifi(false);
|
|
|
+ copyProcess.setDisconnectWifi(false);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void onPause() {
|
|
|
- EPLog.v(this.TAG, "onPause()");
|
|
|
+ EPLog.v(TAG, "onPause()");
|
|
|
super.onPause();
|
|
|
- int i = this.printerLocation;
|
|
|
+ int i = printerLocation;
|
|
|
if (i == 1 || i == 3) {
|
|
|
- ProbePrinter probePrinter = this.task;
|
|
|
+ ProbePrinter probePrinter = task;
|
|
|
if (probePrinter != null) {
|
|
|
probePrinter.cancel(true);
|
|
|
}
|
|
|
- CopyProcess copyProcess2 = this.copyProcess;
|
|
|
+ CopyProcess copyProcess2 = copyProcess;
|
|
|
if (copyProcess2 != null && copyProcess2.isProccessing()) {
|
|
|
- this.copyProcess.setDisconnectWifi(true);
|
|
|
- } else if (!this.isKeepSimpleAPConnection) {
|
|
|
+ copyProcess.setDisconnectWifi(true);
|
|
|
+ } else if (!isKeepSimpleAPConnection) {
|
|
|
WiFiDirectManager.disconnect(this, WiFiDirectManager.DEVICE_TYPE_PRINTER, ActivityBase.printerIp);
|
|
|
}
|
|
|
}
|
|
@@ -209,7 +201,7 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
if (i2 == -1) {
|
|
|
finish();
|
|
|
} else {
|
|
|
- this.mNormalCopyButton.setChecked(true);
|
|
|
+ mNormalCopyButton.setChecked(true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -228,29 +220,28 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
LongTapRepeatAdapter.bless(findViewById(R.id.SettingButonCopiesCountDown));
|
|
|
LongTapRepeatAdapter.bless(findViewById(R.id.SettingButonXDensityCountUp));
|
|
|
LongTapRepeatAdapter.bless(findViewById(R.id.SettingButonXDensityCountDown));
|
|
|
- this.mCopyTypeGroup = (RadioGroup) findViewById(R.id.copy_type_group);
|
|
|
- this.mNormalCopyButton = (RadioButton) findViewById(R.id.normal_copy_tab);
|
|
|
- this.mNormalCopyButton.setChecked(true);
|
|
|
- this.mNormalCopyButton.setEnabled(false);
|
|
|
- this.mNormalCopyButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
+ mCopyTypeGroup = (RadioGroup) findViewById(R.id.copy_type_group);
|
|
|
+ mNormalCopyButton = (RadioButton) findViewById(R.id.normal_copy_tab);
|
|
|
+ mNormalCopyButton.setChecked(true);
|
|
|
+ mNormalCopyButton.setEnabled(false);
|
|
|
+ mNormalCopyButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
|
|
}
|
|
|
});
|
|
|
- this.mRepeatCopyButton = (RadioButton) findViewById(R.id.repeat_copy_tab);
|
|
|
- this.mRepeatCopyButton.setChecked(false);
|
|
|
- this.mNormalCopyButton.setEnabled(false);
|
|
|
- this.mRepeatCopyButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
+ mRepeatCopyButton = (RadioButton) findViewById(R.id.repeat_copy_tab);
|
|
|
+ mRepeatCopyButton.setChecked(false);
|
|
|
+ mNormalCopyButton.setEnabled(false);
|
|
|
+ mRepeatCopyButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
|
|
if (z) {
|
|
|
- CopyActivity.this.switchToRepeatCopy();
|
|
|
+ switchToRepeatCopy();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public void switchToRepeatCopy() {
|
|
|
- this.isKeepSimpleAPConnection = true;
|
|
|
+ private void switchToRepeatCopy() {
|
|
|
+ isKeepSimpleAPConnection = true;
|
|
|
startActivityForResult(new Intent(this, epson.print.rpcopy.CopyActivity.class), 12);
|
|
|
}
|
|
|
|
|
@@ -263,11 +254,11 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
startActivityAndKeepSimpleAp(intent);
|
|
|
return;
|
|
|
case R.id.copy_button /*2131230948*/:
|
|
|
- String str = this.TAG;
|
|
|
+ String str = TAG;
|
|
|
EPLog.i(str, "NOW_PRINTER:" + printerId);
|
|
|
- this.presettings.saveCopyOptions(this.copyComponent.getCopyOptionItems());
|
|
|
- this.copyProcess = new CopyProcess(this);
|
|
|
- this.copyProcess.startCopy(getApplicationContext());
|
|
|
+ presettings.saveCopyOptions(copyComponent.getCopyOptionItems());
|
|
|
+ copyProcess = new CopyProcess(this);
|
|
|
+ copyProcess.startCopy(getApplicationContext());
|
|
|
return;
|
|
|
case R.id.copy_setting_clear_all /*2131230967*/:
|
|
|
allClear();
|
|
@@ -308,16 +299,16 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
}
|
|
|
|
|
|
private void startActivityAndKeepSimpleAp(Intent intent) {
|
|
|
- this.isKeepSimpleAPConnection = true;
|
|
|
+ isKeepSimpleAPConnection = true;
|
|
|
startActivity(intent);
|
|
|
}
|
|
|
|
|
|
private void allClear() {
|
|
|
- this.doClear = true;
|
|
|
- this.loading.show();
|
|
|
- ArrayList<ECopyOptionItem> copyOptionItems = this.copyComponent.getCopyOptionItems();
|
|
|
- int i = this.clearindex;
|
|
|
- this.clearindex = i + 1;
|
|
|
+ doClear = true;
|
|
|
+ loading.show();
|
|
|
+ ArrayList<ECopyOptionItem> copyOptionItems = copyComponent.getCopyOptionItems();
|
|
|
+ int i = clearindex;
|
|
|
+ clearindex = i + 1;
|
|
|
ECopyOptionItem eCopyOptionItem = copyOptionItems.get(i);
|
|
|
switch (eCopyOptionItem.getKey()) {
|
|
|
case ColorEffectsType:
|
|
@@ -353,28 +344,28 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
eCopyOptionItem.selectValue(eCopyOptionItem.getDefaultValue());
|
|
|
break;
|
|
|
}
|
|
|
- this.copyComponent.setCopyOptionItem(eCopyOptionItem);
|
|
|
+ copyComponent.setCopyOptionItem(eCopyOptionItem);
|
|
|
}
|
|
|
|
|
|
private void fetchCopyOptionContext() {
|
|
|
- this.copyComponent.createCopyOptionContext(this.copyType, new ECopyComponent.ICopyOptionContextListener() {
|
|
|
+ copyComponent.createCopyOptionContext(copyType, new ECopyComponent.ICopyOptionContextListener() {
|
|
|
public void onCopyOptionContextCreated(ECopyComponent.ECopyType eCopyType, ECopyOptionContext eCopyOptionContext, ECopyComponent.ICopyOptionContextListener.ContextCreationError contextCreationError) {
|
|
|
CopyActivity copyActivity = CopyActivity.this;
|
|
|
copyActivity.optionContext = eCopyOptionContext;
|
|
|
if (contextCreationError == null) {
|
|
|
- copyActivity.copyComponent.bindCopyOptionContext(CopyActivity.this.optionContext, CopyActivity.this.optionListener);
|
|
|
- ArrayList<ECopyOptionItem> copyOptionItems = CopyActivity.this.copyComponent.getCopyOptionItems();
|
|
|
- if (ActivityBase.printerId.equalsIgnoreCase(CopyActivity.this.presettings.loadPrePrinter())) {
|
|
|
- CopyActivity.this.presettings.setCopyOptions(copyOptionItems);
|
|
|
+ copyActivity.copyComponent.bindCopyOptionContext(optionContext, optionListener);
|
|
|
+ ArrayList<ECopyOptionItem> copyOptionItems = copyComponent.getCopyOptionItems();
|
|
|
+ if (ActivityBase.printerId.equalsIgnoreCase(presettings.loadPrePrinter())) {
|
|
|
+ presettings.setCopyOptions(copyOptionItems);
|
|
|
} else {
|
|
|
- CopyActivity.this.buildCopyOptions(copyOptionItems);
|
|
|
+ buildCopyOptions(copyOptionItems);
|
|
|
}
|
|
|
} else {
|
|
|
ActivityBase.errorDialog unused = copyActivity.errordialog = new ActivityBase.errorDialog(copyActivity);
|
|
|
- String[] reasonText = CopyActivity.this.errordialog.getReasonText(contextCreationError);
|
|
|
- CopyActivity.this.errordialog.showErrorDialog(reasonText[0], reasonText[1], ActivityBase.DialogButtons.Ok, new ActivityBase.IClose() {
|
|
|
+ String[] reasonText = errordialog.getReasonText(contextCreationError);
|
|
|
+ errordialog.showErrorDialog(reasonText[0], reasonText[1], ActivityBase.DialogButtons.Ok, new ActivityBase.IClose() {
|
|
|
public void onClose(ActivityBase.ClickButton clickButton) {
|
|
|
- CopyActivity.this.finish();
|
|
|
+ finish();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -389,58 +380,58 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
ECopyOptionItem.ECopyOptionItemKey key = next.getKey();
|
|
|
switch (key) {
|
|
|
case ColorEffectsType:
|
|
|
- String str = this.TAG;
|
|
|
+ String str = TAG;
|
|
|
EPLog.i(str, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_color_info, next);
|
|
|
break;
|
|
|
case ScanContentType:
|
|
|
- String str2 = this.TAG;
|
|
|
+ String str2 = TAG;
|
|
|
EPLog.i(str2, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_document_type_info, next);
|
|
|
break;
|
|
|
case PrintMediaType:
|
|
|
- String str3 = this.TAG;
|
|
|
+ String str3 = TAG;
|
|
|
EPLog.i(str3, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_paper_type_info, next);
|
|
|
break;
|
|
|
case PrintMediaSize:
|
|
|
- String str4 = this.TAG;
|
|
|
+ String str4 = TAG;
|
|
|
EPLog.i(str4, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_paper_size_info, next);
|
|
|
break;
|
|
|
case PrintMediaSource:
|
|
|
- String str5 = this.TAG;
|
|
|
+ String str5 = TAG;
|
|
|
EPLog.i(str5, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_paper_source_info, next);
|
|
|
break;
|
|
|
case PrintQuality:
|
|
|
- String str6 = this.TAG;
|
|
|
+ String str6 = TAG;
|
|
|
EPLog.i(str6, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_quality_info, next);
|
|
|
break;
|
|
|
case XScale:
|
|
|
- String str7 = this.TAG;
|
|
|
+ String str7 = TAG;
|
|
|
EPLog.i(str7, "show " + key.name() + ":" + next.getSelectedChoice() + " setting");
|
|
|
updateSetting(R.id.copy_scale_info, next);
|
|
|
break;
|
|
|
case XDensity:
|
|
|
- this.optionValueMap.put(key, new XDensityValue(next));
|
|
|
+ optionValueMap.put(key, new XDensityValue(next));
|
|
|
break;
|
|
|
case CopyMagnification:
|
|
|
- this.optionValueMap.put(key, new ActivityBase.CopyMagnificationValue(next));
|
|
|
+ optionValueMap.put(key, new ActivityBase.CopyMagnificationValue(next));
|
|
|
break;
|
|
|
case Copies:
|
|
|
- this.optionValueMap.put(key, new CopiesValue(next));
|
|
|
+ optionValueMap.put(key, new CopiesValue(next));
|
|
|
break;
|
|
|
}
|
|
|
- this.loading.dismiss();
|
|
|
+ loading.dismiss();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void updateSetting(int i, ECopyOptionItem eCopyOptionItem) {
|
|
|
- TextView textView = (TextView) this.mLayout.findViewById(i);
|
|
|
+ TextView textView = (TextView) mLayout.findViewById(i);
|
|
|
if (eCopyOptionItem.getSelectedChoice() == ECopyOptionItem.ECopyOptionItemChoice.XScale_Custom) {
|
|
|
- textView.setText(getString(R.string.XScale_CustomSetting) + String.valueOf(((ActivityBase.NumberOptionValue) this.optionValueMap.get(ECopyOptionItem.ECopyOptionItemKey.CopyMagnification)).value) + " %");
|
|
|
+ textView.setText(getString(R.string.XScale_CustomSetting) + String.valueOf(((ActivityBase.NumberOptionValue) optionValueMap.get(ECopyOptionItem.ECopyOptionItemKey.CopyMagnification)).value) + " %");
|
|
|
return;
|
|
|
}
|
|
|
textView.setText(string(eCopyOptionItem.getSelectedChoice().name()));
|
|
@@ -452,47 +443,47 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
bindOption(R.id.SettingEditCopies, eCopyOptionItem);
|
|
|
bindCountUp(R.id.SettingButonCopiesCountUp);
|
|
|
bindCountDown(R.id.SettingButonCopiesCountDown);
|
|
|
- setOptionValueChangedListener(CopyActivity.this.optionValueChangedListener);
|
|
|
+ setOptionValueChangedListener(optionValueChangedListener);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
class XDensityValue extends ActivityBase.NumberOptionValue {
|
|
|
ImageView image;
|
|
|
- TypedArray images = CopyActivity.this.getResources().obtainTypedArray(R.array.density_images);
|
|
|
+ TypedArray images = getResources().obtainTypedArray(R.array.density_images);
|
|
|
|
|
|
public XDensityValue(ECopyOptionItem eCopyOptionItem) {
|
|
|
super();
|
|
|
bindOption(R.id.density_image, eCopyOptionItem);
|
|
|
bindCountUp(R.id.SettingButonXDensityCountUp);
|
|
|
bindCountDown(R.id.SettingButonXDensityCountDown);
|
|
|
- setOptionValueChangedListener(CopyActivity.this.optionValueChangedListener);
|
|
|
+ setOptionValueChangedListener(optionValueChangedListener);
|
|
|
}
|
|
|
|
|
|
private void bindOption(int i, ECopyOptionItem eCopyOptionItem) {
|
|
|
- this.optionItem = eCopyOptionItem;
|
|
|
- this.value = eCopyOptionItem.getSelectedValue();
|
|
|
- this.image = (ImageView) CopyActivity.this.findViewById(i);
|
|
|
- this.image.setImageDrawable(this.images.getDrawable(this.value + 4));
|
|
|
- this.image.setEnabled(eCopyOptionItem.isEnabled());
|
|
|
+ optionItem = eCopyOptionItem;
|
|
|
+ value = eCopyOptionItem.getSelectedValue();
|
|
|
+ image = (ImageView) findViewById(i);
|
|
|
+ image.setImageDrawable(images.getDrawable(value + 4));
|
|
|
+ image.setEnabled(eCopyOptionItem.isEnabled());
|
|
|
}
|
|
|
|
|
|
private void bindCountUp(int i) {
|
|
|
- this.countUp = (Button) CopyActivity.this.findViewById(i);
|
|
|
- this.countUp.setOnClickListener(new CounterImage(1));
|
|
|
- if (this.value == this.optionItem.getMaximumValue()) {
|
|
|
- this.countUp.setEnabled(false);
|
|
|
+ countUp = (Button) findViewById(i);
|
|
|
+ countUp.setOnClickListener(new CounterImage(1));
|
|
|
+ if (value == optionItem.getMaximumValue()) {
|
|
|
+ countUp.setEnabled(false);
|
|
|
} else {
|
|
|
- this.countUp.setEnabled(true);
|
|
|
+ countUp.setEnabled(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void bindCountDown(int i) {
|
|
|
- this.countDown = (Button) CopyActivity.this.findViewById(i);
|
|
|
- this.countDown.setOnClickListener(new CounterImage(-1));
|
|
|
- if (this.value == this.optionItem.getMinimumValue()) {
|
|
|
- this.countDown.setEnabled(false);
|
|
|
+ countDown = (Button) findViewById(i);
|
|
|
+ countDown.setOnClickListener(new CounterImage(-1));
|
|
|
+ if (value == optionItem.getMinimumValue()) {
|
|
|
+ countDown.setEnabled(false);
|
|
|
} else {
|
|
|
- this.countDown.setEnabled(true);
|
|
|
+ countDown.setEnabled(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -502,15 +493,15 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
}
|
|
|
|
|
|
private void updateImage(int i) {
|
|
|
- XDensityValue.this.value += i;
|
|
|
- XDensityValue.this.optionItem.selectValue(XDensityValue.this.value);
|
|
|
- if (XDensityValue.this.changedListener != null) {
|
|
|
- XDensityValue.this.changedListener.onOptionItemChanged(XDensityValue.this.optionItem);
|
|
|
+ XDensityValue.value += i;
|
|
|
+ XDensityValue.optionItem.selectValue(XDensityValue.value);
|
|
|
+ if (XDensityValue.changedListener != null) {
|
|
|
+ XDensityValue.changedListener.onOptionItemChanged(XDensityValue.optionItem);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void onClick(View view) {
|
|
|
- updateImage(this.amount);
|
|
|
+ updateImage(amount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -519,7 +510,7 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
MyPrinter curPrinter = MyPrinter.getCurPrinter(this);
|
|
|
printerId = curPrinter.getPrinterId();
|
|
|
printerIp = curPrinter.getIp();
|
|
|
- this.printerLocation = curPrinter.getLocation();
|
|
|
+ printerLocation = curPrinter.getLocation();
|
|
|
}
|
|
|
|
|
|
private class ProbePrinter extends AsyncTask<Void, Void, Boolean> {
|
|
@@ -532,25 +523,25 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
}
|
|
|
|
|
|
protected Boolean doInBackground(Void... voidArr) {
|
|
|
- EPLog.i(CopyActivity.this.TAG, "ProbePrinter doInBackground");
|
|
|
- this.mRepeatCopyAvailable = false;
|
|
|
- if ((CopyActivity.this.printerLocation != 1 && CopyActivity.this.printerLocation != 3) || ActivityBase.printerId == null) {
|
|
|
+ EPLog.i(TAG, "ProbePrinter doInBackground");
|
|
|
+ mRepeatCopyAvailable = false;
|
|
|
+ if ((printerLocation != 1 && printerLocation != 3) || ActivityBase.printerId == null) {
|
|
|
return false;
|
|
|
}
|
|
|
- CopyActivity.this.mPrinter.doInitDriver(CopyActivity.this, 2);
|
|
|
- if (CopyActivity.this.mPrinter.doProbePrinter(60, ActivityBase.printerId, ActivityBase.printerIp, CopyActivity.this.printerLocation) != 0) {
|
|
|
+ mPrinter.doInitDriver(CopyActivity.this, 2);
|
|
|
+ if (mPrinter.doProbePrinter(60, ActivityBase.printerId, ActivityBase.printerIp, printerLocation) != 0) {
|
|
|
return false;
|
|
|
}
|
|
|
- int doSetPrinter = CopyActivity.this.mPrinter.doSetPrinter();
|
|
|
- String access$200 = CopyActivity.this.TAG;
|
|
|
+ int doSetPrinter = mPrinter.doSetPrinter();
|
|
|
+ String access$200 = TAG;
|
|
|
EPLog.i(access$200, "Set Printer result: " + doSetPrinter);
|
|
|
if (doSetPrinter != 0) {
|
|
|
return false;
|
|
|
}
|
|
|
CopyActivity copyActivity = CopyActivity.this;
|
|
|
String unused = copyActivity.ipAdress = copyActivity.mPrinter.doGetIp();
|
|
|
- String access$2002 = CopyActivity.this.TAG;
|
|
|
- EPLog.i(access$2002, "IPAdress : " + CopyActivity.this.ipAdress);
|
|
|
+ String access$2002 = TAG;
|
|
|
+ EPLog.i(access$2002, "IPAdress : " + ipAdress);
|
|
|
CopyActivity copyActivity2 = CopyActivity.this;
|
|
|
copyActivity2.bProbedPrinter = true;
|
|
|
copyActivity2.systemSettings = new ECopyComponent.ICopySystemSettings() {
|
|
@@ -559,46 +550,44 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
}
|
|
|
|
|
|
public String getPrinterIPAddress() {
|
|
|
- String access$200 = CopyActivity.this.TAG;
|
|
|
- EPLog.i(access$200, "getPrinterIPAddress : " + CopyActivity.this.ipAdress);
|
|
|
- return CopyActivity.this.ipAdress;
|
|
|
+ String access$200 = TAG;
|
|
|
+ EPLog.i(access$200, "getPrinterIPAddress : " + ipAdress);
|
|
|
+ return ipAdress;
|
|
|
}
|
|
|
};
|
|
|
ECopyComponent sharedComponent = ECopyComponent.sharedComponent();
|
|
|
- sharedComponent.setSystemSettings(CopyActivity.this.systemSettings);
|
|
|
+ sharedComponent.setSystemSettings(systemSettings);
|
|
|
sharedComponent.setProperty(ECopyComponent.Property.RequestConnectionTimeout, CopyActivity.CONNECTION_TIMEOUT);
|
|
|
- this.mRepeatCopyAvailable = CopyActivity.this.checkRepeatCopyFunction();
|
|
|
+ mRepeatCopyAvailable = checkRepeatCopyFunction();
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
protected void onCancelled() {
|
|
|
- EPLog.i(CopyActivity.this.TAG, "ProbePrinter onCancelled");
|
|
|
+ EPLog.i(TAG, "ProbePrinter onCancelled");
|
|
|
super.onCancelled();
|
|
|
- CopyActivity.this.mPrinter.doCancelFindPrinter();
|
|
|
+ mPrinter.doCancelFindPrinter();
|
|
|
}
|
|
|
|
|
|
protected void onPostExecute(Boolean bool) {
|
|
|
- EPLog.i(CopyActivity.this.TAG, "ProbePrinter onPostExecute");
|
|
|
- CopyActivity.this.changeRepeatCopyButtonState(this.mRepeatCopyAvailable);
|
|
|
+ EPLog.i(TAG, "ProbePrinter onPostExecute");
|
|
|
+ changeRepeatCopyButtonState(mRepeatCopyAvailable);
|
|
|
if (bool.booleanValue()) {
|
|
|
- CopyActivity.this.mHandler.sendEmptyMessage(2);
|
|
|
+ mHandler.sendEmptyMessage(2);
|
|
|
} else {
|
|
|
- CopyActivity.this.mHandler.sendEmptyMessage(1);
|
|
|
+ mHandler.sendEmptyMessage(1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public boolean checkRepeatCopyFunction() {
|
|
|
+ private boolean checkRepeatCopyFunction() {
|
|
|
ERemoteDevice eRemoteDevice = new ERemoteDevice();
|
|
|
- eRemoteDevice.setHostIP(this.ipAdress);
|
|
|
+ eRemoteDevice.setHostIP(ipAdress);
|
|
|
eRemoteDevice.setRequestConnectionTimeout(CONNECTION_TIMEOUT);
|
|
|
ERemoteDevice.ERemoteDeviceFunctionsResult executeGetFunctionsCommand = eRemoteDevice.executeGetFunctionsCommand(Utils.getRemoteOperationUUID(getApplicationContext()));
|
|
|
return executeGetFunctionsCommand.success() && executeGetFunctionsCommand.functions().contains(ERemoteOperation.ERemoteParam.repeat_copy);
|
|
|
}
|
|
|
|
|
|
- /* access modifiers changed from: private */
|
|
|
- public void changeRepeatCopyButtonState(boolean z) {
|
|
|
+ private void changeRepeatCopyButtonState(boolean z) {
|
|
|
int i;
|
|
|
boolean z2 = false;
|
|
|
if (z) {
|
|
@@ -607,8 +596,8 @@ public class CopyActivity extends ActivityBase implements View.OnClickListener {
|
|
|
} else {
|
|
|
i = 8;
|
|
|
}
|
|
|
- this.mCopyTypeGroup.setVisibility(i);
|
|
|
- this.mRepeatCopyButton.setEnabled(z2);
|
|
|
+ mCopyTypeGroup.setVisibility(i);
|
|
|
+ mRepeatCopyButton.setEnabled(z2);
|
|
|
}
|
|
|
|
|
|
protected void deleteLongTapMessage() {
|