autopilot.platform

autopilot.platform.model()

Get the model name of the current platform.

For desktop / laptop installations, this will return “Desktop”. Otherwise, the current hardware model will be returned. For example:

platform.model()
... "Galaxy Nexus"
autopilot.platform.image_codename()

Get the image codename.

For desktop / laptop installations this will return “Desktop”. Otherwise, the codename of the image that was installed will be returned. For example:

platform.image_codename()

... “maguro”

autopilot.platform.is_tablet()

Indicate whether system is a tablet.

The ‘ro.build.characteristics’ property is checked for ‘tablet’. For example:

platform.tablet()

... True

Returns:boolean indicating whether this is a tablet
autopilot.platform.get_display_server()

Returns display server type.

Returns:string indicating display server type. Either “X11”, “MIR” or “UNKNOWN”

  翻译: