Fix code smells
This commit is contained in:
parent
ce5ace90b3
commit
231f9c5dd2
@ -79,7 +79,7 @@ public class Printer extends CordovaPlugin {
|
||||
/**
|
||||
* Invokes the callback once the job has reached a final state.
|
||||
*/
|
||||
OnPrintJobStateChangeListener listener = new OnPrintJobStateChangeListener() {
|
||||
private OnPrintJobStateChangeListener listener = new OnPrintJobStateChangeListener() {
|
||||
/**
|
||||
* Callback notifying that a print job state changed.
|
||||
*
|
||||
@ -278,6 +278,7 @@ public class Printer extends CordovaPlugin {
|
||||
}
|
||||
|
||||
pm.getInstance().print(docName, adapter, builder.build());
|
||||
view = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -299,8 +300,6 @@ public class Printer extends CordovaPlugin {
|
||||
PluginResult.Status.OK, job.isCompleted());
|
||||
|
||||
command.sendPluginResult(res);
|
||||
|
||||
view = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ public final class PrinterDiscoverySession {
|
||||
* @param session An instance of type
|
||||
* android.print.PrinterDiscoverySession
|
||||
*/
|
||||
public PrinterDiscoverySession (Object session) {
|
||||
PrinterDiscoverySession(Object session) {
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ public final class PrinterDiscoverySession {
|
||||
/**
|
||||
* Stop discovering printers.
|
||||
*/
|
||||
public final void stopPrinterDiscovery() {
|
||||
private void stopPrinterDiscovery() {
|
||||
Meta.invokeMethod(session, "stopPrinterDiscovery");
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ public final class PrinterDiscoverySession {
|
||||
* @return List of their basic infos
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public final List<PrinterInfo> getPrinters() {
|
||||
private List<PrinterInfo> getPrinters() {
|
||||
Method method = Meta.getMethod(session.getClass(), "getPrinters");
|
||||
|
||||
return (List<PrinterInfo>) Meta.invokeMethod(session, method);
|
||||
|
Loading…
Reference in New Issue
Block a user