parameters: (abi, api_level=DEFAULT_ANDROID_API_LEVEL, google=False)
docstring: Check if Android system images have been installed.
  
    Args:
      abi: target abi, x86 or arm
      api_level: the Android API level to check for; defaults to the latest API.
      google: use Google build system image instead of AOSP build
  
    Returns:
      True if x86 image has been previously downloaded.
docstring_summary: Check if Android system images have been installed.
docstring_tokens: Check if Android system images have been installed .
function: def CheckSystemImage(abi, api_level=DEFAULT_ANDROID_API_LEVEL, google=False):
    """Check if Android system images have been installed.
  
    Args:
      abi: target abi, x86 or arm
      api_level: the Android API level to check for; defaults to the latest API.
      google: use Google build system image instead of AOSP build
  
    Returns:
      True if x86 image has been previously downloaded.
    """
    api_target = 'android-%d' % api_level
    system_image_root = os.path.join(constants.ANDROID_SDK_ROOT,
                                     'system-images', api_target)
    if abi == 'x86':
      if google:
        return os.path.exists(os.path.join(system_image_root, 'google_apis',
                                           'x86'))
      else:
        return os.path.exists(os.path.join(system_image_root, 'default', 'x86'))
    elif abi == 'arm':
      if google:
        return os.path.exists(os.path.join(system_image_root, 'google_apis',
                                           'armeabi-v7a'))
      else:
        return os.path.exists(os.path.join(system_image_root, 'default',
                                           'armeabi-v7a'))
    else:
      raise Exception("abi option invalid")
function_tokens: def CheckSystemImage ( abi , api_level = DEFAULT_ANDROID_API_LEVEL , google = False ) : api_target = 'android-%d' % api_level system_image_root = os . path . join ( constants . ANDROID_SDK_ROOT , 'system-images' , api_target ) if abi == 'x86' : if google : return os . path . exists ( os . path . join ( system_image_root , 'google_apis' , 'x86' ) ) else : return os . path . exists ( os . path . join ( system_image_root , 'default' , 'x86' ) ) elif abi == 'arm' : if google : return os . path . exists ( os . path . join ( system_image_root , 'google_apis' , 'armeabi-v7a' ) ) else : return os . path . exists ( os . path . join ( system_image_root , 'default' , 'armeabi-v7a' ) ) else : raise Exception ( "abi option invalid" )