diff options
Diffstat (limited to 'emulator')
-rw-r--r-- | emulator/screen-sharing-agent/app/src/main/cpp/controller.cc | 5 | ||||
-rw-r--r-- | emulator/screen-sharing-agent/app/src/main/cpp/controller.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/emulator/screen-sharing-agent/app/src/main/cpp/controller.cc b/emulator/screen-sharing-agent/app/src/main/cpp/controller.cc index 0f06f6bb77c..61e9768087f 100644 --- a/emulator/screen-sharing-agent/app/src/main/cpp/controller.cc +++ b/emulator/screen-sharing-agent/app/src/main/cpp/controller.cc @@ -56,7 +56,8 @@ Controller::Controller(int socket_fd) pointer_helper_(), motion_event_start_time_(0), key_character_map_(), - stay_on_(Settings::Table::GLOBAL, "stay_on_while_plugged_in") { + stay_on_(Settings::Table::GLOBAL, "stay_on_while_plugged_in"), + accelerometer_rotation_(Settings::Table::SYSTEM, "accelerometer_rotation") { assert(socket_fd > 0); } @@ -105,6 +106,8 @@ void Controller::Initialize() { // Keep the screen on as long as the device has power. stay_on_.Set(StringPrintf("%d", BATTERY_PLUGGED_AC | BATTERY_PLUGGED_USB | BATTERY_PLUGGED_WIRELESS).c_str()); + // Turn off "Auto-rotate screen". + accelerometer_rotation_.Set("0"); } void Controller::Run() { diff --git a/emulator/screen-sharing-agent/app/src/main/cpp/controller.h b/emulator/screen-sharing-agent/app/src/main/cpp/controller.h index bcecee7df5d..cf15c4d25b5 100644 --- a/emulator/screen-sharing-agent/app/src/main/cpp/controller.h +++ b/emulator/screen-sharing-agent/app/src/main/cpp/controller.h @@ -60,6 +60,7 @@ private: int64_t motion_event_start_time_; KeyCharacterMap* key_character_map_; ScopedSetting stay_on_; + ScopedSetting accelerometer_rotation_; DISALLOW_COPY_AND_ASSIGN(Controller); }; |