1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Client for the emulator's gRPC controller: the emulator fast path (design
//! D7, android-driver requirement "Emulator fast path").
//!
//! An emulator started with `-grpc <port> -grpc-use-token` serves the
//! `EmulatorController` service and writes the port and a bearer token into its
//! discovery file. [`resolve`] finds them for an adb serial, and
//! [`Controller::connect`] opens the connections and reads the hardware. When
//! the endpoint cannot be used the error is [`Unavailable`], whose warning says
//! how to enable it: the launch flag, or the console command that needs no
//! restart.
//!
//! The client handles the protocol quirks spike S7 found:
//!
//! - scaling needs both width and height ([`scaled_size`]);
//! - raw rows arrive top-down although the proto says bottom-up ([`Frame`]);
//! - the display size is only in the deprecated `hardwareConfig`
//! ([`Hardware::from_status`]);
//! - every call needs a deadline, because some emulator ports accept TCP and
//! never answer ([`Options`]);
//! - `sendKey` accepts and drops keys when the AVD has no keyboard, so the
//! client sends none and reports [`Hardware::keyboard`] instead;
//! - the stream repeats unchanged frames and the status bar clock changes on
//! its own, so changes are detected on hashes without the status bar
//! ([`ChangeDetector`]).
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// The proto file the client was generated from, as `build.rs` found it.
pub const PROTO_SOURCE: &str = env!;