summaryrefslogtreecommitdiffstats
path: root/ash/rotator
diff options
context:
space:
mode:
authorjonross <jonross@chromium.org>2015-05-15 09:02:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-15 16:02:55 +0000
commit274e83a41a63c1746203bc1cee8cefd07ae821c9 (patch)
tree195a84721a639a594295a2437f211f3bfc7122d8 /ash/rotator
parentc343193276d07ebb2b184a790e5c0f60d2f98cd3 (diff)
downloadchromium_src-274e83a41a63c1746203bc1cee8cefd07ae821c9.zip
chromium_src-274e83a41a63c1746203bc1cee8cefd07ae821c9.tar.gz
chromium_src-274e83a41a63c1746203bc1cee8cefd07ae821c9.tar.bz2
This change is intended to M-43. Currently screen rotation animations expose a bug, causing the login screen to not be useable.
Disable rotation animations while a user is not logged in. This will be later reverted on M-44 where a fix to the underlying issue will be landed. TEST=manual testing on device BUG=chrome-os-partner:40118 Review URL: https://codereview.chromium.org/1139793003 Cr-Commit-Position: refs/heads/master@{#330100}
Diffstat (limited to 'ash/rotator')
-rw-r--r--ash/rotator/screen_rotation_animator.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc
index 9b746b6..742ade9 100644
--- a/ash/rotator/screen_rotation_animator.cc
+++ b/ash/rotator/screen_rotation_animator.cc
@@ -12,6 +12,7 @@
#include "ash/display/display_info.h"
#include "ash/display/display_manager.h"
#include "ash/rotator/screen_rotation_animation.h"
+#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "base/command_line.h"
#include "base/time/time.h"
@@ -280,10 +281,19 @@ ScreenRotationAnimator::~ScreenRotationAnimator() {
}
bool ScreenRotationAnimator::CanAnimate() const {
+ // Animations are currently broken on the login screen.
+ // (chrome-os-partners:40118). Disabling the animations on this screen for
+ // M-43
return Shell::GetInstance()
- ->display_manager()
- ->GetDisplayForId(display_id_)
- .is_valid();
+ ->display_manager()
+ ->GetDisplayForId(display_id_)
+ .is_valid() &&
+ Shell::GetInstance()
+ ->session_state_delegate()
+ ->IsActiveUserSessionStarted() &&
+ !Shell::GetInstance()->session_state_delegate()->IsScreenLocked() &&
+ Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
+ SessionStateDelegate::SESSION_STATE_ACTIVE;
}
void ScreenRotationAnimator::Rotate(gfx::Display::Rotation new_rotation,