Program: 32258
Project: 32258
Buggy source:
private void handleRPCMessage(Hashtable<String,Object> hash){
  RPCMessage rpcMsg=new RPCMessage(hash);
  String functionName=rpcMsg.getFunctionName();
  String messageType=rpcMsg.getMessageType();
  if (messageType.equals(RPCMessage.KEY_RESPONSE)) {
    SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive,new RPCResponse(rpcMsg),SDL_LIB_TRACE_KEY);
    if (isCorrelationIDProtected((new RPCResponse(hash)).getCorrelationID())) {
      if ((new RPCResponse(hash)).getCorrelationID() == REGISTER_APP_INTERFACE_CORRELATION_ID && _advancedLifecycleManagementEnabled && functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
        final RegisterAppInterfaceResponse msg=new RegisterAppInterfaceResponse(hash);
        if (msg.getSuccess()) {
          _appInterfaceRegisterd=true;
        }
        processRaiResponse(msg);
        _systemCapabilityManager.parseRAIResponse(msg);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.REGISTER_APP_INTERFACE.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        sendBroadcastIntent(sendIntent);
        _autoActivateIdReturned="String_Node_Str";
        _prerecordedSpeech=msg.getPrerecordedSpeech();
        _sdlLanguage=msg.getLanguage();
        _hmiDisplayLanguage=msg.getHmiDisplayLanguage();
        _sdlMsgVersion=msg.getSdlMsgVersion();
        _vehicleType=msg.getVehicleType();
        _systemSoftwareVersion=msg.getSystemSoftwareVersion();
        _proxyVersionInfo=msg.getProxyVersionInfo();
        if (_bAppResumeEnabled) {
          if ((_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess())&& (msg.getResultCode() != Result.RESUME_FAILED))           _bResumeSuccess=true;
 else {
            _bResumeSuccess=false;
            _lastHashID=null;
          }
        }
        _diagModes=msg.getSupportedDiagModes();
        String sVersionInfo="String_Node_Str" + _proxyVersionInfo;
        if (!isDebugEnabled()) {
          enableDebugTool();
          DebugTool.logInfo(sVersionInfo,false);
          disableDebugTool();
        }
 else         DebugTool.logInfo(sVersionInfo,false);
        sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str","String_Node_Str");
        updateBroadcastIntent(sendIntent,"String_Node_Str",sVersionInfo);
        sendBroadcastIntent(sendIntent);
        _sdlConnectionState=SdlConnectionState.SDL_CONNECTED;
        if (!msg.getSuccess()) {
          notifyProxyClosed("String_Node_Str",new SdlException("String_Node_Str" + msg.getResultCode(),SdlExceptionCause.SDL_REGISTRATION_ERROR),SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
        }
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              if (_proxyListener instanceof IProxyListener) {
                ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
              }
              onRPCResponseReceived(msg);
            }
          }
);
        }
 else {
          if (_proxyListener instanceof IProxyListener) {
            ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
          }
          onRPCResponseReceived(msg);
        }
      }
 else       if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID && functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
        Log.i("String_Node_Str","String_Node_Str");
        final OnSystemRequest msg=new OnSystemRequest(hash);
        if ((msg.getUrl() != null)) {
          Thread handleOffboardTransmissionThread=new Thread(){
            @Override public void run(){
              sendOnSystemRequestToUrl(msg);
            }
          }
;
          handleOffboardTransmissionThread.start();
        }
      }
 else       if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID && functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
        Log.i("String_Node_Str","String_Node_Str");
        final SystemRequestResponse msg=new SystemRequestResponse(hash);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.SYSTEM_REQUEST.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        sendBroadcastIntent(sendIntent);
      }
 else       if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID && functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
        final SystemRequestResponse msg=new SystemRequestResponse(hash);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.SYSTEM_REQUEST.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
        sendBroadcastIntent(sendIntent);
      }
 else       if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
        _appInterfaceRegisterd=false;
synchronized (APP_INTERFACE_REGISTERED_LOCK) {
          APP_INTERFACE_REGISTERED_LOCK.notify();
        }
        final UnregisterAppInterfaceResponse msg=new UnregisterAppInterfaceResponse(hash);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.UNREGISTER_APP_INTERFACE.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        sendBroadcastIntent(sendIntent);
      }
      return;
    }
    if (functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
      final RegisterAppInterfaceResponse msg=new RegisterAppInterfaceResponse(hash);
      if (msg.getSuccess()) {
        _appInterfaceRegisterd=true;
      }
      processRaiResponse(msg);
      _systemCapabilityManager.parseRAIResponse(msg);
      _autoActivateIdReturned="String_Node_Str";
      _prerecordedSpeech=msg.getPrerecordedSpeech();
      _sdlLanguage=msg.getLanguage();
      _hmiDisplayLanguage=msg.getHmiDisplayLanguage();
      _sdlMsgVersion=msg.getSdlMsgVersion();
      _vehicleType=msg.getVehicleType();
      _systemSoftwareVersion=msg.getSystemSoftwareVersion();
      _proxyVersionInfo=msg.getProxyVersionInfo();
      if (_bAppResumeEnabled) {
        if ((_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess())&& (msg.getResultCode() != Result.RESUME_FAILED))         _bResumeSuccess=true;
 else {
          _bResumeSuccess=false;
          _lastHashID=null;
        }
      }
      _diagModes=msg.getSupportedDiagModes();
      if (!isDebugEnabled()) {
        enableDebugTool();
        DebugTool.logInfo("String_Node_Str" + _proxyVersionInfo);
        disableDebugTool();
      }
 else       DebugTool.logInfo("String_Node_Str" + _proxyVersionInfo);
      if (_advancedLifecycleManagementEnabled) {
        _sdlConnectionState=SdlConnectionState.SDL_CONNECTED;
        if (!msg.getSuccess()) {
          notifyProxyClosed("String_Node_Str",new SdlException("String_Node_Str" + msg.getResultCode(),SdlExceptionCause.SDL_REGISTRATION_ERROR),SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
        }
      }
 else {
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              if (_proxyListener instanceof IProxyListener) {
                ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
              }
              onRPCResponseReceived(msg);
            }
          }
);
        }
 else {
          if (_proxyListener instanceof IProxyListener) {
            ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
          }
          onRPCResponseReceived(msg);
        }
      }
    }
 else     if (functionName.equals(FunctionID.SPEAK.toString())) {
      final SpeakResponse msg=new SpeakResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSpeakResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSpeakResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ALERT.toString())) {
      final AlertResponse msg=new AlertResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAlertResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAlertResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SHOW.toString())) {
      final ShowResponse msg=new ShowResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onShowResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onShowResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ADD_COMMAND.toString())) {
      final AddCommandResponse msg=new AddCommandResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAddCommandResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAddCommandResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_COMMAND.toString())) {
      final DeleteCommandResponse msg=new DeleteCommandResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteCommandResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteCommandResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ADD_SUB_MENU.toString())) {
      final AddSubMenuResponse msg=new AddSubMenuResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAddSubMenuResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAddSubMenuResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_SUB_MENU.toString())) {
      final DeleteSubMenuResponse msg=new DeleteSubMenuResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteSubMenuResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteSubMenuResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SUBSCRIBE_BUTTON.toString())) {
      final SubscribeButtonResponse msg=new SubscribeButtonResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSubscribeButtonResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSubscribeButtonResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNSUBSCRIBE_BUTTON.toString())) {
      final UnsubscribeButtonResponse msg=new UnsubscribeButtonResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUnsubscribeButtonResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUnsubscribeButtonResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_MEDIA_CLOCK_TIMER.toString())) {
      final SetMediaClockTimerResponse msg=new SetMediaClockTimerResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetMediaClockTimerResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetMediaClockTimerResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
      final SystemRequestResponse msg=new SystemRequestResponse(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.SYSTEM_REQUEST.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
      sendBroadcastIntent(sendIntent);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSystemRequestResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSystemRequestResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString())) {
      final CreateInteractionChoiceSetResponse msg=new CreateInteractionChoiceSetResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onCreateInteractionChoiceSetResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onCreateInteractionChoiceSetResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString())) {
      final DeleteInteractionChoiceSetResponse msg=new DeleteInteractionChoiceSetResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteInteractionChoiceSetResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteInteractionChoiceSetResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.PERFORM_INTERACTION.toString())) {
      final PerformInteractionResponse msg=new PerformInteractionResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onPerformInteractionResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onPerformInteractionResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_GLOBAL_PROPERTIES.toString())) {
      final SetGlobalPropertiesResponse msg=new SetGlobalPropertiesResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetGlobalPropertiesResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetGlobalPropertiesResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.RESET_GLOBAL_PROPERTIES.toString())) {
      final ResetGlobalPropertiesResponse msg=new ResetGlobalPropertiesResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onResetGlobalPropertiesResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onResetGlobalPropertiesResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
      _appInterfaceRegisterd=false;
synchronized (APP_INTERFACE_REGISTERED_LOCK) {
        APP_INTERFACE_REGISTERED_LOCK.notify();
      }
      final UnregisterAppInterfaceResponse msg=new UnregisterAppInterfaceResponse(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.UNREGISTER_APP_INTERFACE.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
      sendBroadcastIntent(sendIntent);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            if (_proxyListener instanceof IProxyListener) {
              ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
            }
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        if (_proxyListener instanceof IProxyListener) {
          ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
        }
        onRPCResponseReceived(msg);
      }
      notifyProxyClosed("String_Node_Str",null,SdlDisconnectedReason.APP_INTERFACE_UNREG);
    }
 else     if (functionName.equals(FunctionID.GENERIC_RESPONSE.toString())) {
      final GenericResponse msg=new GenericResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGenericResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGenericResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SLIDER.toString())) {
      final SliderResponse msg=new SliderResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSliderResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSliderResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.PUT_FILE.toString())) {
      final PutFileResponse msg=new PutFileResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onPutFileResponse(msg);
            onRPCResponseReceived(msg);
            notifyPutFileStreamResponse(msg);
          }
        }
);
      }
 else {
        _proxyListener.onPutFileResponse(msg);
        onRPCResponseReceived(msg);
        notifyPutFileStreamResponse(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_FILE.toString())) {
      final DeleteFileResponse msg=new DeleteFileResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteFileResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteFileResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.LIST_FILES.toString())) {
      final ListFilesResponse msg=new ListFilesResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onListFilesResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onListFilesResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_APP_ICON.toString())) {
      final SetAppIconResponse msg=new SetAppIconResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetAppIconResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetAppIconResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SCROLLABLE_MESSAGE.toString())) {
      final ScrollableMessageResponse msg=new ScrollableMessageResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onScrollableMessageResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onScrollableMessageResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.CHANGE_REGISTRATION.toString())) {
      final ChangeRegistrationResponse msg=new ChangeRegistrationResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onChangeRegistrationResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onChangeRegistrationResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_DISPLAY_LAYOUT.toString())) {
      final SetDisplayLayoutResponse msg=new SetDisplayLayoutResponse(hash);
      if (msg.getSuccess() && _systemCapabilityManager != null) {
        _systemCapabilityManager.setCapability(SystemCapabilityType.DISPLAY,msg.getDisplayCapabilities());
        _systemCapabilityManager.setCapability(SystemCapabilityType.BUTTON,msg.getButtonCapabilities());
        _systemCapabilityManager.setCapability(SystemCapabilityType.PRESET_BANK,msg.getPresetBankCapabilities());
        _systemCapabilityManager.setCapability(SystemCapabilityType.SOFTBUTTON,msg.getSoftButtonCapabilities());
      }
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetDisplayLayoutResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetDisplayLayoutResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.PERFORM_AUDIO_PASS_THRU.toString())) {
      final PerformAudioPassThruResponse msg=new PerformAudioPassThruResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onPerformAudioPassThruResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onPerformAudioPassThruResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.END_AUDIO_PASS_THRU.toString())) {
      final EndAudioPassThruResponse msg=new EndAudioPassThruResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onEndAudioPassThruResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onEndAudioPassThruResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString())) {
      final SubscribeVehicleDataResponse msg=new SubscribeVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSubscribeVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSubscribeVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString())) {
      final UnsubscribeVehicleDataResponse msg=new UnsubscribeVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUnsubscribeVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUnsubscribeVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_VEHICLE_DATA.toString())) {
      final GetVehicleDataResponse msg=new GetVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SUBSCRIBE_WAY_POINTS.toString())) {
      final SubscribeWayPointsResponse msg=new SubscribeWayPointsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSubscribeWayPointsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSubscribeWayPointsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNSUBSCRIBE_WAY_POINTS.toString())) {
      final UnsubscribeWayPointsResponse msg=new UnsubscribeWayPointsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUnsubscribeWayPointsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUnsubscribeWayPointsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_WAY_POINTS.toString())) {
      final GetWayPointsResponse msg=new GetWayPointsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetWayPointsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetWayPointsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.READ_DID.toString())) {
      final ReadDIDResponse msg=new ReadDIDResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onReadDIDResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onReadDIDResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_DTCS.toString())) {
      final GetDTCsResponse msg=new GetDTCsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetDTCsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetDTCsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DIAGNOSTIC_MESSAGE.toString())) {
      final DiagnosticMessageResponse msg=new DiagnosticMessageResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDiagnosticMessageResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDiagnosticMessageResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
      final SystemRequestResponse msg=new SystemRequestResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSystemRequestResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSystemRequestResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SEND_LOCATION.toString())) {
      final SendLocationResponse msg=new SendLocationResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSendLocationResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSendLocationResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DIAL_NUMBER.toString())) {
      final DialNumberResponse msg=new DialNumberResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDialNumberResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDialNumberResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SHOW_CONSTANT_TBT.toString())) {
      final ShowConstantTbtResponse msg=new ShowConstantTbtResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onShowConstantTbtResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onShowConstantTbtResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ALERT_MANEUVER.toString())) {
      final AlertManeuverResponse msg=new AlertManeuverResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAlertManeuverResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAlertManeuverResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UPDATE_TURN_LIST.toString())) {
      final UpdateTurnListResponse msg=new UpdateTurnListResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUpdateTurnListResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUpdateTurnListResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_INTERIOR_VEHICLE_DATA.toString())) {
      final SetInteriorVehicleDataResponse msg=new SetInteriorVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetInteriorVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetInteriorVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_INTERIOR_VEHICLE_DATA.toString())) {
      final GetInteriorVehicleDataResponse msg=new GetInteriorVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetInteriorVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetInteriorVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_SYSTEM_CAPABILITY.toString())) {
      final GetSystemCapabilityResponse msg=new GetSystemCapabilityResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetSystemCapabilityResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetSystemCapabilityResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.BUTTON_PRESS.toString())) {
      final ButtonPressResponse msg=new ButtonPressResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onButtonPressResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onButtonPressResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SEND_HAPTIC_DATA.toString())) {
      final SendHapticDataResponse msg=new SendHapticDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSendHapticDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSendHapticDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else {
      if (_sdlMsgVersion != null) {
        DebugTool.logError("String_Node_Str" + functionName + "String_Node_Str"+ _sdlMsgVersion);
      }
 else {
        DebugTool.logError("String_Node_Str" + functionName);
      }
    }
  }
 else   if (messageType.equals(RPCMessage.KEY_NOTIFICATION)) {
    SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive,new RPCNotification(rpcMsg),SDL_LIB_TRACE_KEY);
    if (functionName.equals(FunctionID.ON_HMI_STATUS.toString())) {
      final OnHMIStatus msg=new OnHMIStatus(hash);
      if (sdlSession != null) {
        sdlSession.getLockScreenMan().setHMILevel(msg.getHmiLevel());
      }
      msg.setFirstRun(firstTimeFull);
      if (msg.getHmiLevel() == HMILevel.HMI_FULL)       firstTimeFull=false;
      if (msg.getHmiLevel() != _hmiLevel || msg.getAudioStreamingState() != _audioStreamingState) {
        _hmiLevel=msg.getHmiLevel();
        _audioStreamingState=msg.getAudioStreamingState();
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              _proxyListener.onOnHMIStatus(msg);
              _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
              onRPCNotificationReceived(msg);
            }
          }
);
        }
 else {
          _proxyListener.onOnHMIStatus(msg);
          _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
          onRPCNotificationReceived(msg);
        }
      }
    }
 else     if (functionName.equals(FunctionID.ON_COMMAND.toString())) {
      final OnCommand msg=new OnCommand(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnCommand(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnCommand(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_DRIVER_DISTRACTION.toString())) {
      final OnDriverDistraction msg=new OnDriverDistraction(hash);
      if (sdlSession != null) {
        DriverDistractionState drDist=msg.getState();
        sdlSession.getLockScreenMan().setDriverDistStatus(drDist == DriverDistractionState.DD_ON);
      }
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnDriverDistraction(msg);
            _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnDriverDistraction(msg);
        _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
      final OnSystemRequest msg=new OnSystemRequest(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.ON_SYSTEM_REQUEST.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_NOTIFICATION);
      if (msg.getUrl() == null) {
        updateBroadcastIntent(sendIntent,"String_Node_Str","String_Node_Str");
        sendBroadcastIntent(sendIntent);
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              _proxyListener.onOnSystemRequest(msg);
              onRPCNotificationReceived(msg);
            }
          }
);
        }
 else {
          _proxyListener.onOnSystemRequest(msg);
          onRPCNotificationReceived(msg);
        }
      }
 else {
        updateBroadcastIntent(sendIntent,"String_Node_Str","String_Node_Str" + msg.getUrl());
        sendBroadcastIntent(sendIntent);
        Log.i("String_Node_Str","String_Node_Str");
        if ((msg.getUrl() != null)) {
          Thread handleOffboardTransmissionThread=new Thread(){
            @Override public void run(){
              sendOnSystemRequestToUrl(msg);
            }
          }
;
          handleOffboardTransmissionThread.start();
        }
      }
    }
 else     if (functionName.equals(FunctionID.ON_PERMISSIONS_CHANGE.toString())) {
      final OnPermissionsChange msg=new OnPermissionsChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnPermissionsChange(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnPermissionsChange(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_TBT_CLIENT_STATE.toString())) {
      final OnTBTClientState msg=new OnTBTClientState(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnTBTClientState(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnTBTClientState(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_BUTTON_PRESS.toString())) {
      final OnButtonPress msg=new OnButtonPress(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnButtonPress(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnButtonPress(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_BUTTON_EVENT.toString())) {
      final OnButtonEvent msg=new OnButtonEvent(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnButtonEvent(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnButtonEvent(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_LANGUAGE_CHANGE.toString())) {
      final OnLanguageChange msg=new OnLanguageChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnLanguageChange(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnLanguageChange(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_HASH_CHANGE.toString())) {
      final OnHashChange msg=new OnHashChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnHashChange(msg);
            onRPCNotificationReceived(msg);
            if (_bAppResumeEnabled) {
              _lastHashID=msg.getHashID();
            }
          }
        }
);
      }
 else {
        _proxyListener.onOnHashChange(msg);
        onRPCNotificationReceived(msg);
        if (_bAppResumeEnabled) {
          _lastHashID=msg.getHashID();
        }
      }
    }
 else     if (functionName.equals(FunctionID.ON_SYSTEM_REQUEST.toString())) {
      final OnSystemRequest msg=new OnSystemRequest(hash);
      if ((msg.getUrl() != null) && (((msg.getRequestType() == RequestType.PROPRIETARY) && (msg.getFileType() == FileType.JSON)) || ((msg.getRequestType() == RequestType.HTTP) && (msg.getFileType() == FileType.BINARY)))) {
        Thread handleOffboardTransmissionThread=new Thread(){
          @Override public void run(){
            sendOnSystemRequestToUrl(msg);
          }
        }
;
        handleOffboardTransmissionThread.start();
      }
      if (msg.getRequestType() == RequestType.LOCK_SCREEN_ICON_URL && msg.getUrl() != null) {
        lockScreenIconRequest=msg;
      }
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnSystemRequest(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnSystemRequest(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_AUDIO_PASS_THRU.toString())) {
      final OnAudioPassThru msg=new OnAudioPassThru(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnAudioPassThru(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnAudioPassThru(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_VEHICLE_DATA.toString())) {
      final OnVehicleData msg=new OnVehicleData(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnVehicleData(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnVehicleData(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString())) {
      _appInterfaceRegisterd=false;
synchronized (APP_INTERFACE_REGISTERED_LOCK) {
        APP_INTERFACE_REGISTERED_LOCK.notify();
      }
      final OnAppInterfaceUnregistered msg=new OnAppInterfaceUnregistered(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_NOTIFICATION);
      updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
      sendBroadcastIntent(sendIntent);
      if (_advancedLifecycleManagementEnabled) {
        cycleProxy(SdlDisconnectedReason.convertAppInterfaceUnregisteredReason(msg.getReason()));
      }
 else {
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
              onRPCNotificationReceived(msg);
            }
          }
);
        }
 else {
          ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
          onRPCNotificationReceived(msg);
        }
        notifyProxyClosed("String_Node_Str",null,SdlDisconnectedReason.APP_INTERFACE_UNREG);
      }
    }
 else     if (functionName.equals(FunctionID.ON_KEYBOARD_INPUT.toString())) {
      final OnKeyboardInput msg=new OnKeyboardInput(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnKeyboardInput(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnKeyboardInput(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_TOUCH_EVENT.toString())) {
      final OnTouchEvent msg=new OnTouchEvent(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnTouchEvent(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnTouchEvent(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_WAY_POINT_CHANGE.toString())) {
      final OnWayPointChange msg=new OnWayPointChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnWayPointChange(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnWayPointChange(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_INTERIOR_VEHICLE_DATA.toString())) {
      final OnInteriorVehicleData msg=new OnInteriorVehicleData(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnInteriorVehicleData(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnInteriorVehicleData(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else {
      if (_sdlMsgVersion != null) {
        DebugTool.logInfo("String_Node_Str" + functionName + "String_Node_Str"+ _sdlMsgVersion.getMajorVersion()+ "String_Node_Str"+ _sdlMsgVersion.getMinorVersion());
      }
 else {
        DebugTool.logInfo("String_Node_Str" + functionName);
      }
    }
  }
  SdlTrace.logProxyEvent("String_Node_Str" + functionName,SDL_LIB_TRACE_KEY);
}

Fixed version (ground truth):
private void handleRPCMessage(Hashtable<String,Object> hash){
  RPCMessage rpcMsg=new RPCMessage(hash);
  String functionName=rpcMsg.getFunctionName();
  String messageType=rpcMsg.getMessageType();
  if (messageType.equals(RPCMessage.KEY_RESPONSE)) {
    SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive,new RPCResponse(rpcMsg),SDL_LIB_TRACE_KEY);
    if (isCorrelationIDProtected((new RPCResponse(hash)).getCorrelationID())) {
      if ((new RPCResponse(hash)).getCorrelationID() == REGISTER_APP_INTERFACE_CORRELATION_ID && _advancedLifecycleManagementEnabled && functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
        final RegisterAppInterfaceResponse msg=new RegisterAppInterfaceResponse(hash);
        if (msg.getSuccess()) {
          _appInterfaceRegisterd=true;
        }
        processRaiResponse(msg);
        _systemCapabilityManager.parseRAIResponse(msg);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.REGISTER_APP_INTERFACE.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        sendBroadcastIntent(sendIntent);
        _autoActivateIdReturned="String_Node_Str";
        _prerecordedSpeech=msg.getPrerecordedSpeech();
        _sdlLanguage=msg.getLanguage();
        _hmiDisplayLanguage=msg.getHmiDisplayLanguage();
        _sdlMsgVersion=msg.getSdlMsgVersion();
        _vehicleType=msg.getVehicleType();
        _systemSoftwareVersion=msg.getSystemSoftwareVersion();
        _proxyVersionInfo=msg.getProxyVersionInfo();
        if (_bAppResumeEnabled) {
          if ((_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess())&& (msg.getResultCode() != Result.RESUME_FAILED))           _bResumeSuccess=true;
 else {
            _bResumeSuccess=false;
            _lastHashID=null;
          }
        }
        _diagModes=msg.getSupportedDiagModes();
        String sVersionInfo="String_Node_Str" + _proxyVersionInfo;
        if (!isDebugEnabled()) {
          enableDebugTool();
          DebugTool.logInfo(sVersionInfo,false);
          disableDebugTool();
        }
 else         DebugTool.logInfo(sVersionInfo,false);
        sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str","String_Node_Str");
        updateBroadcastIntent(sendIntent,"String_Node_Str",sVersionInfo);
        sendBroadcastIntent(sendIntent);
        _sdlConnectionState=SdlConnectionState.SDL_CONNECTED;
        if (!msg.getSuccess()) {
          notifyProxyClosed("String_Node_Str",new SdlException("String_Node_Str" + msg.getResultCode(),SdlExceptionCause.SDL_REGISTRATION_ERROR),SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
        }
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              if (_proxyListener instanceof IProxyListener) {
                ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
              }
              onRPCResponseReceived(msg);
            }
          }
);
        }
 else {
          if (_proxyListener instanceof IProxyListener) {
            ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
          }
          onRPCResponseReceived(msg);
        }
      }
 else       if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID && functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
        Log.i("String_Node_Str","String_Node_Str");
        final OnSystemRequest msg=new OnSystemRequest(hash);
        if ((msg.getUrl() != null)) {
          Thread handleOffboardTransmissionThread=new Thread(){
            @Override public void run(){
              sendOnSystemRequestToUrl(msg);
            }
          }
;
          handleOffboardTransmissionThread.start();
        }
      }
 else       if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID && functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
        Log.i("String_Node_Str","String_Node_Str");
        final SystemRequestResponse msg=new SystemRequestResponse(hash);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.SYSTEM_REQUEST.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        sendBroadcastIntent(sendIntent);
      }
 else       if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID && functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
        final SystemRequestResponse msg=new SystemRequestResponse(hash);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.SYSTEM_REQUEST.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
        sendBroadcastIntent(sendIntent);
      }
 else       if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
        _appInterfaceRegisterd=false;
synchronized (APP_INTERFACE_REGISTERED_LOCK) {
          APP_INTERFACE_REGISTERED_LOCK.notify();
        }
        final UnregisterAppInterfaceResponse msg=new UnregisterAppInterfaceResponse(hash);
        Intent sendIntent=createBroadcastIntent();
        updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.UNREGISTER_APP_INTERFACE.toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
        updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
        updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
        sendBroadcastIntent(sendIntent);
      }
      return;
    }
    if (functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
      final RegisterAppInterfaceResponse msg=new RegisterAppInterfaceResponse(hash);
      if (msg.getSuccess()) {
        _appInterfaceRegisterd=true;
      }
      processRaiResponse(msg);
      _systemCapabilityManager.parseRAIResponse(msg);
      _autoActivateIdReturned="String_Node_Str";
      _prerecordedSpeech=msg.getPrerecordedSpeech();
      _sdlLanguage=msg.getLanguage();
      _hmiDisplayLanguage=msg.getHmiDisplayLanguage();
      _sdlMsgVersion=msg.getSdlMsgVersion();
      _vehicleType=msg.getVehicleType();
      _systemSoftwareVersion=msg.getSystemSoftwareVersion();
      _proxyVersionInfo=msg.getProxyVersionInfo();
      if (_bAppResumeEnabled) {
        if ((_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess())&& (msg.getResultCode() != Result.RESUME_FAILED))         _bResumeSuccess=true;
 else {
          _bResumeSuccess=false;
          _lastHashID=null;
        }
      }
      _diagModes=msg.getSupportedDiagModes();
      if (!isDebugEnabled()) {
        enableDebugTool();
        DebugTool.logInfo("String_Node_Str" + _proxyVersionInfo);
        disableDebugTool();
      }
 else       DebugTool.logInfo("String_Node_Str" + _proxyVersionInfo);
      if (_advancedLifecycleManagementEnabled) {
        _sdlConnectionState=SdlConnectionState.SDL_CONNECTED;
        if (!msg.getSuccess()) {
          notifyProxyClosed("String_Node_Str",new SdlException("String_Node_Str" + msg.getResultCode(),SdlExceptionCause.SDL_REGISTRATION_ERROR),SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
        }
      }
 else {
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              if (_proxyListener instanceof IProxyListener) {
                ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
              }
              onRPCResponseReceived(msg);
            }
          }
);
        }
 else {
          if (_proxyListener instanceof IProxyListener) {
            ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
          }
          onRPCResponseReceived(msg);
        }
      }
    }
 else     if (functionName.equals(FunctionID.SPEAK.toString())) {
      final SpeakResponse msg=new SpeakResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSpeakResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSpeakResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ALERT.toString())) {
      final AlertResponse msg=new AlertResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAlertResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAlertResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SHOW.toString())) {
      final ShowResponse msg=new ShowResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onShowResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onShowResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ADD_COMMAND.toString())) {
      final AddCommandResponse msg=new AddCommandResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAddCommandResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAddCommandResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_COMMAND.toString())) {
      final DeleteCommandResponse msg=new DeleteCommandResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteCommandResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteCommandResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ADD_SUB_MENU.toString())) {
      final AddSubMenuResponse msg=new AddSubMenuResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAddSubMenuResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAddSubMenuResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_SUB_MENU.toString())) {
      final DeleteSubMenuResponse msg=new DeleteSubMenuResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteSubMenuResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteSubMenuResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SUBSCRIBE_BUTTON.toString())) {
      final SubscribeButtonResponse msg=new SubscribeButtonResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSubscribeButtonResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSubscribeButtonResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNSUBSCRIBE_BUTTON.toString())) {
      final UnsubscribeButtonResponse msg=new UnsubscribeButtonResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUnsubscribeButtonResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUnsubscribeButtonResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_MEDIA_CLOCK_TIMER.toString())) {
      final SetMediaClockTimerResponse msg=new SetMediaClockTimerResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetMediaClockTimerResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetMediaClockTimerResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
      final SystemRequestResponse msg=new SystemRequestResponse(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.SYSTEM_REQUEST.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
      sendBroadcastIntent(sendIntent);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSystemRequestResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSystemRequestResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString())) {
      final CreateInteractionChoiceSetResponse msg=new CreateInteractionChoiceSetResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onCreateInteractionChoiceSetResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onCreateInteractionChoiceSetResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString())) {
      final DeleteInteractionChoiceSetResponse msg=new DeleteInteractionChoiceSetResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteInteractionChoiceSetResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteInteractionChoiceSetResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.PERFORM_INTERACTION.toString())) {
      final PerformInteractionResponse msg=new PerformInteractionResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onPerformInteractionResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onPerformInteractionResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_GLOBAL_PROPERTIES.toString())) {
      final SetGlobalPropertiesResponse msg=new SetGlobalPropertiesResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetGlobalPropertiesResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetGlobalPropertiesResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.RESET_GLOBAL_PROPERTIES.toString())) {
      final ResetGlobalPropertiesResponse msg=new ResetGlobalPropertiesResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onResetGlobalPropertiesResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onResetGlobalPropertiesResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
      _appInterfaceRegisterd=false;
synchronized (APP_INTERFACE_REGISTERED_LOCK) {
        APP_INTERFACE_REGISTERED_LOCK.notify();
      }
      final UnregisterAppInterfaceResponse msg=new UnregisterAppInterfaceResponse(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.UNREGISTER_APP_INTERFACE.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_RESPONSE);
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getSuccess());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getInfo());
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getResultCode().toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
      updateBroadcastIntent(sendIntent,"String_Node_Str",msg.getCorrelationID());
      sendBroadcastIntent(sendIntent);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            if (_proxyListener instanceof IProxyListener) {
              ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
            }
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        if (_proxyListener instanceof IProxyListener) {
          ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
        }
        onRPCResponseReceived(msg);
      }
      notifyProxyClosed("String_Node_Str",null,SdlDisconnectedReason.APP_INTERFACE_UNREG);
    }
 else     if (functionName.equals(FunctionID.GENERIC_RESPONSE.toString())) {
      final GenericResponse msg=new GenericResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGenericResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGenericResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SLIDER.toString())) {
      final SliderResponse msg=new SliderResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSliderResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSliderResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.PUT_FILE.toString())) {
      final PutFileResponse msg=new PutFileResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onPutFileResponse(msg);
            onRPCResponseReceived(msg);
            notifyPutFileStreamResponse(msg);
          }
        }
);
      }
 else {
        _proxyListener.onPutFileResponse(msg);
        onRPCResponseReceived(msg);
        notifyPutFileStreamResponse(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DELETE_FILE.toString())) {
      final DeleteFileResponse msg=new DeleteFileResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDeleteFileResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDeleteFileResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.LIST_FILES.toString())) {
      final ListFilesResponse msg=new ListFilesResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onListFilesResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onListFilesResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_APP_ICON.toString())) {
      final SetAppIconResponse msg=new SetAppIconResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetAppIconResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetAppIconResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SCROLLABLE_MESSAGE.toString())) {
      final ScrollableMessageResponse msg=new ScrollableMessageResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onScrollableMessageResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onScrollableMessageResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.CHANGE_REGISTRATION.toString())) {
      final ChangeRegistrationResponse msg=new ChangeRegistrationResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onChangeRegistrationResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onChangeRegistrationResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_DISPLAY_LAYOUT.toString())) {
      final SetDisplayLayoutResponse msg=new SetDisplayLayoutResponse(hash);
      if (msg.getSuccess() && _systemCapabilityManager != null) {
        _systemCapabilityManager.setCapability(SystemCapabilityType.DISPLAY,msg.getDisplayCapabilities());
        _systemCapabilityManager.setCapability(SystemCapabilityType.BUTTON,msg.getButtonCapabilities());
        _systemCapabilityManager.setCapability(SystemCapabilityType.PRESET_BANK,msg.getPresetBankCapabilities());
        _systemCapabilityManager.setCapability(SystemCapabilityType.SOFTBUTTON,msg.getSoftButtonCapabilities());
      }
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetDisplayLayoutResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetDisplayLayoutResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.PERFORM_AUDIO_PASS_THRU.toString())) {
      final PerformAudioPassThruResponse msg=new PerformAudioPassThruResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onPerformAudioPassThruResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onPerformAudioPassThruResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.END_AUDIO_PASS_THRU.toString())) {
      final EndAudioPassThruResponse msg=new EndAudioPassThruResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onEndAudioPassThruResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onEndAudioPassThruResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString())) {
      final SubscribeVehicleDataResponse msg=new SubscribeVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSubscribeVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSubscribeVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString())) {
      final UnsubscribeVehicleDataResponse msg=new UnsubscribeVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUnsubscribeVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUnsubscribeVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_VEHICLE_DATA.toString())) {
      final GetVehicleDataResponse msg=new GetVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SUBSCRIBE_WAY_POINTS.toString())) {
      final SubscribeWayPointsResponse msg=new SubscribeWayPointsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSubscribeWayPointsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSubscribeWayPointsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UNSUBSCRIBE_WAY_POINTS.toString())) {
      final UnsubscribeWayPointsResponse msg=new UnsubscribeWayPointsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUnsubscribeWayPointsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUnsubscribeWayPointsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_WAY_POINTS.toString())) {
      final GetWayPointsResponse msg=new GetWayPointsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetWayPointsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetWayPointsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.READ_DID.toString())) {
      final ReadDIDResponse msg=new ReadDIDResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onReadDIDResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onReadDIDResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_DTCS.toString())) {
      final GetDTCsResponse msg=new GetDTCsResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetDTCsResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetDTCsResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DIAGNOSTIC_MESSAGE.toString())) {
      final DiagnosticMessageResponse msg=new DiagnosticMessageResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDiagnosticMessageResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDiagnosticMessageResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
      final SystemRequestResponse msg=new SystemRequestResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSystemRequestResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSystemRequestResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SEND_LOCATION.toString())) {
      final SendLocationResponse msg=new SendLocationResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSendLocationResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSendLocationResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.DIAL_NUMBER.toString())) {
      final DialNumberResponse msg=new DialNumberResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onDialNumberResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onDialNumberResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SHOW_CONSTANT_TBT.toString())) {
      final ShowConstantTbtResponse msg=new ShowConstantTbtResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onShowConstantTbtResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onShowConstantTbtResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ALERT_MANEUVER.toString())) {
      final AlertManeuverResponse msg=new AlertManeuverResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onAlertManeuverResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onAlertManeuverResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.UPDATE_TURN_LIST.toString())) {
      final UpdateTurnListResponse msg=new UpdateTurnListResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onUpdateTurnListResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onUpdateTurnListResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SET_INTERIOR_VEHICLE_DATA.toString())) {
      final SetInteriorVehicleDataResponse msg=new SetInteriorVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSetInteriorVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSetInteriorVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_INTERIOR_VEHICLE_DATA.toString())) {
      final GetInteriorVehicleDataResponse msg=new GetInteriorVehicleDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetInteriorVehicleDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetInteriorVehicleDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.GET_SYSTEM_CAPABILITY.toString())) {
      final GetSystemCapabilityResponse msg=new GetSystemCapabilityResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onGetSystemCapabilityResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onGetSystemCapabilityResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.BUTTON_PRESS.toString())) {
      final ButtonPressResponse msg=new ButtonPressResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onButtonPressResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onButtonPressResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.SEND_HAPTIC_DATA.toString())) {
      final SendHapticDataResponse msg=new SendHapticDataResponse(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onSendHapticDataResponse(msg);
            onRPCResponseReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onSendHapticDataResponse(msg);
        onRPCResponseReceived(msg);
      }
    }
 else {
      if (_sdlMsgVersion != null) {
        DebugTool.logError("String_Node_Str" + functionName + "String_Node_Str"+ _sdlMsgVersion);
      }
 else {
        DebugTool.logError("String_Node_Str" + functionName);
      }
    }
  }
 else   if (messageType.equals(RPCMessage.KEY_NOTIFICATION)) {
    SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive,new RPCNotification(rpcMsg),SDL_LIB_TRACE_KEY);
    if (functionName.equals(FunctionID.ON_HMI_STATUS.toString())) {
      final OnHMIStatus msg=new OnHMIStatus(hash);
      if (sdlSession != null) {
        sdlSession.getLockScreenMan().setHMILevel(msg.getHmiLevel());
      }
      msg.setFirstRun(firstTimeFull);
      if (msg.getHmiLevel() == HMILevel.HMI_FULL)       firstTimeFull=false;
      _hmiLevel=msg.getHmiLevel();
      _audioStreamingState=msg.getAudioStreamingState();
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnHMIStatus(msg);
            _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnHMIStatus(msg);
        _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_COMMAND.toString())) {
      final OnCommand msg=new OnCommand(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnCommand(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnCommand(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_DRIVER_DISTRACTION.toString())) {
      final OnDriverDistraction msg=new OnDriverDistraction(hash);
      if (sdlSession != null) {
        DriverDistractionState drDist=msg.getState();
        sdlSession.getLockScreenMan().setDriverDistStatus(drDist == DriverDistractionState.DD_ON);
      }
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnDriverDistraction(msg);
            _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnDriverDistraction(msg);
        _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
      final OnSystemRequest msg=new OnSystemRequest(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.ON_SYSTEM_REQUEST.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_NOTIFICATION);
      if (msg.getUrl() == null) {
        updateBroadcastIntent(sendIntent,"String_Node_Str","String_Node_Str");
        sendBroadcastIntent(sendIntent);
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              _proxyListener.onOnSystemRequest(msg);
              onRPCNotificationReceived(msg);
            }
          }
);
        }
 else {
          _proxyListener.onOnSystemRequest(msg);
          onRPCNotificationReceived(msg);
        }
      }
 else {
        updateBroadcastIntent(sendIntent,"String_Node_Str","String_Node_Str" + msg.getUrl());
        sendBroadcastIntent(sendIntent);
        Log.i("String_Node_Str","String_Node_Str");
        if ((msg.getUrl() != null)) {
          Thread handleOffboardTransmissionThread=new Thread(){
            @Override public void run(){
              sendOnSystemRequestToUrl(msg);
            }
          }
;
          handleOffboardTransmissionThread.start();
        }
      }
    }
 else     if (functionName.equals(FunctionID.ON_PERMISSIONS_CHANGE.toString())) {
      final OnPermissionsChange msg=new OnPermissionsChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnPermissionsChange(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnPermissionsChange(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_TBT_CLIENT_STATE.toString())) {
      final OnTBTClientState msg=new OnTBTClientState(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnTBTClientState(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnTBTClientState(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_BUTTON_PRESS.toString())) {
      final OnButtonPress msg=new OnButtonPress(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnButtonPress(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnButtonPress(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_BUTTON_EVENT.toString())) {
      final OnButtonEvent msg=new OnButtonEvent(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnButtonEvent(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnButtonEvent(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_LANGUAGE_CHANGE.toString())) {
      final OnLanguageChange msg=new OnLanguageChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnLanguageChange(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnLanguageChange(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_HASH_CHANGE.toString())) {
      final OnHashChange msg=new OnHashChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnHashChange(msg);
            onRPCNotificationReceived(msg);
            if (_bAppResumeEnabled) {
              _lastHashID=msg.getHashID();
            }
          }
        }
);
      }
 else {
        _proxyListener.onOnHashChange(msg);
        onRPCNotificationReceived(msg);
        if (_bAppResumeEnabled) {
          _lastHashID=msg.getHashID();
        }
      }
    }
 else     if (functionName.equals(FunctionID.ON_SYSTEM_REQUEST.toString())) {
      final OnSystemRequest msg=new OnSystemRequest(hash);
      if ((msg.getUrl() != null) && (((msg.getRequestType() == RequestType.PROPRIETARY) && (msg.getFileType() == FileType.JSON)) || ((msg.getRequestType() == RequestType.HTTP) && (msg.getFileType() == FileType.BINARY)))) {
        Thread handleOffboardTransmissionThread=new Thread(){
          @Override public void run(){
            sendOnSystemRequestToUrl(msg);
          }
        }
;
        handleOffboardTransmissionThread.start();
      }
      if (msg.getRequestType() == RequestType.LOCK_SCREEN_ICON_URL && msg.getUrl() != null) {
        lockScreenIconRequest=msg;
      }
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnSystemRequest(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnSystemRequest(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_AUDIO_PASS_THRU.toString())) {
      final OnAudioPassThru msg=new OnAudioPassThru(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnAudioPassThru(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnAudioPassThru(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_VEHICLE_DATA.toString())) {
      final OnVehicleData msg=new OnVehicleData(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnVehicleData(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnVehicleData(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString())) {
      _appInterfaceRegisterd=false;
synchronized (APP_INTERFACE_REGISTERED_LOCK) {
        APP_INTERFACE_REGISTERED_LOCK.notify();
      }
      final OnAppInterfaceUnregistered msg=new OnAppInterfaceUnregistered(hash);
      Intent sendIntent=createBroadcastIntent();
      updateBroadcastIntent(sendIntent,"String_Node_Str",FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString());
      updateBroadcastIntent(sendIntent,"String_Node_Str",RPCMessage.KEY_NOTIFICATION);
      updateBroadcastIntent(sendIntent,"String_Node_Str",serializeJSON(msg));
      sendBroadcastIntent(sendIntent);
      if (_advancedLifecycleManagementEnabled) {
        cycleProxy(SdlDisconnectedReason.convertAppInterfaceUnregisteredReason(msg.getReason()));
      }
 else {
        if (_callbackToUIThread) {
          _mainUIHandler.post(new Runnable(){
            @Override public void run(){
              ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
              onRPCNotificationReceived(msg);
            }
          }
);
        }
 else {
          ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
          onRPCNotificationReceived(msg);
        }
        notifyProxyClosed("String_Node_Str",null,SdlDisconnectedReason.APP_INTERFACE_UNREG);
      }
    }
 else     if (functionName.equals(FunctionID.ON_KEYBOARD_INPUT.toString())) {
      final OnKeyboardInput msg=new OnKeyboardInput(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnKeyboardInput(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnKeyboardInput(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_TOUCH_EVENT.toString())) {
      final OnTouchEvent msg=new OnTouchEvent(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnTouchEvent(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnTouchEvent(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_WAY_POINT_CHANGE.toString())) {
      final OnWayPointChange msg=new OnWayPointChange(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnWayPointChange(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnWayPointChange(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else     if (functionName.equals(FunctionID.ON_INTERIOR_VEHICLE_DATA.toString())) {
      final OnInteriorVehicleData msg=new OnInteriorVehicleData(hash);
      if (_callbackToUIThread) {
        _mainUIHandler.post(new Runnable(){
          @Override public void run(){
            _proxyListener.onOnInteriorVehicleData(msg);
            onRPCNotificationReceived(msg);
          }
        }
);
      }
 else {
        _proxyListener.onOnInteriorVehicleData(msg);
        onRPCNotificationReceived(msg);
      }
    }
 else {
      if (_sdlMsgVersion != null) {
        DebugTool.logInfo("String_Node_Str" + functionName + "String_Node_Str"+ _sdlMsgVersion.getMajorVersion()+ "String_Node_Str"+ _sdlMsgVersion.getMinorVersion());
      }
 else {
        DebugTool.logInfo("String_Node_Str" + functionName);
      }
    }
  }
  SdlTrace.logProxyEvent("String_Node_Str" + functionName,SDL_LIB_TRACE_KEY);
}