e-code nl-1 ol-1"> 223 164
         }
224 165
     }
225 166
 
226
-    private void startAndBindPrintService() {
227
-        Intent intent = new Intent(App.getAppContext(), GpPrintService.class);
228
-        App.getAppContext().startService(intent);
229
-        conn = new PrinterServiceConnection();
230
-        App.getAppContext().bindService(intent, conn, Context.BIND_AUTO_CREATE);
231
-    }
232 167
 
233 168
     // changes the title when discovery is finished
234 169
     private final BroadcastReceiver mFindBlueToothReceiver = new BroadcastReceiver() {
@@ -264,12 +199,11 @@ public class PrinterSettingPresenter implements PrinterSettingContract.Presenter
264 199
         public void onReceive(Context context, Intent intent) {
265 200
             if (GpCom.ACTION_CONNECT_STATUS.equals(intent.getAction())) {
266 201
                 int type = intent.getIntExtra(GpPrintService.CONNECT_STATUS, 0);
267
-                int id = intent.getIntExtra(GpPrintService.PRINTER_ID, 0);
268 202
                 Log.d(TAG, "connect status " + type);
269 203
                 if (type == GpDevice.STATE_CONNECTING) {
270 204
                     view.onPrinterStatusFetched(context.getString(R.string.connecting));
271 205
                 } else if (type == GpDevice.STATE_NONE) {
272
-
206
+                    view.onPrinterStatusFetched(context.getString(R.string.connecting));
273 207
                 } else if (type == GpDevice.STATE_VALID_PRINTER) {
274 208
                     view.onPrinterStatusFetched(context.getString(R.string.printer_is_connected));
275 209
                 } else if (type == GpDevice.STATE_INVALID_PRINTER) {

Entrar - Gogs: Go Git Service

Entrar

Sign In - Gogs: Go Git Service

Sign In