code: def stop_app(self):
          
          try:
              if self._conn:
                  # Be polite; let the dest know we're shutting down.
                  try:
                      self.closeSl4aSession()
                  except:
                      self.log.exception('Failed to gracefully shut down %s.',
                                         self.app_name)
  
                  # Close the socket connection.
                  self.disconnect()
                  self.stop_event_dispatcher()
  
              # Terminate the app
              self._adb.shell('am force-stop com.googlecode.android_scripting')
          finally:
              # Always clean up the adb port
              self.clear_host_port()
docs: Overrides superclass.