Added handling of RemoteException during postMessage() and sendMessage()