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(); } }