def start_app_and_connect(self):
        """Overrides superclass."""
        # Check that sl4a is installed
        out = self._adb.shell('pm list package')
        if not utils.grep('com.googlecode.android_scripting', out):
            raise jsonrpc_client_base.AppStartError(
                self._ad, '%s is not installed on %s' % (_APP_NAME,
                                                         self._adb.serial))
        self.disable_hidden_api_blacklist()

        # sl4a has problems connecting after disconnection, so kill the apk and
        # try connecting again.
        try:
            self.stop_app()
        except Exception as e:
            self.log.warning(e)

        # Launch the app
        self.device_port = _DEVICE_SIDE_PORT
        self._adb.shell(_LAUNCH_CMD % self.device_port)

        # Try to start the connection (not restore the connectivity).
        # The function name restore_app_connection is used here is for the
        # purpose of reusing the same code as it does when restoring the
        # connection. And we do not want to come up with another function
        # name to complicate the API. Change the name if necessary.
        self.restore_app_connection()
Overrides superclass.