Esempio n. 1
0
 @Override
 public void onChange(State state) {
   if (mFrontMessenger != null) {
     sendStateToUI(state);
   }
   if (state.getState() == State.STATE_CONFICT) {
     mQRcode = "";
     connectType = -1;
   }
 }
Esempio n. 2
0
 private void sendStateToUI(State state) {
   try {
     Message msgBack = Message.obtain(null, Constants.MSG_SERVICE_STATE);
     if (msgBack != null) {
       msgBack.arg1 = state.getState();
       msgBack.arg2 = connectType;
       mFrontMessenger.send(msgBack);
       FLog.i(TAG, "sendStateToUI:" + state.toString());
     }
   } catch (RemoteException e) {
     e.printStackTrace();
   }
 }