code: def restore_app_connection(self, port=None):
          
          self.host_port = port or utils.get_available_host_port()
          self._retry_connect()
          self.ed = self._start_event_client()
docs: Restores the sl4a after device got disconnected.
  
          Instead of creating new instance of the client:
            - Uses the given port (or find a new available host_port if none is
              given).
            - Tries to connect to remote server with selected port.
  
          Args:
            port: If given, this is the host port from which to connect to remote
                device port. If not provided, find a new available port as host
                port.
  
          Raises:
              AppRestoreConnectionError: When the app was not able to be started.