Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2123)

Unified Diff: ash/system/screen_layout_observer.cc

Issue 2861953002: [Merge to M59] Avoid Showing rotation change notification when source is accelerometer (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/system/screen_layout_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/screen_layout_observer.cc
diff --git a/ash/system/screen_layout_observer.cc b/ash/system/screen_layout_observer.cc
index c7ea0e5f89313181e426e16cb7fec05355fa4cb1..001154b7cb8793a38a9f729f26edb33dd7c8682a 100644
--- a/ash/system/screen_layout_observer.cc
+++ b/ash/system/screen_layout_observer.cc
@@ -296,8 +296,12 @@ bool ScreenLayoutObserver::GetDisplayMessageForNotification(
GetDisplayName(iter.first), GetDisplaySize(iter.first));
return true;
}
- if (iter.second.GetActiveRotation() !=
- old_iter->second.GetActiveRotation()) {
+ // We don't show rotation change notification when the rotation source is
+ // the accelerometer.
+ if (iter.second.active_rotation_source() !=
+ display::Display::ROTATION_SOURCE_ACCELEROMETER &&
+ iter.second.GetActiveRotation() !=
+ old_iter->second.GetActiveRotation()) {
int rotation_text_id = 0;
switch (iter.second.GetActiveRotation()) {
case display::Display::ROTATE_0:
« no previous file with comments | « no previous file | ash/system/screen_layout_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698