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

Issue 163433010: Use Display changes for screen orientation changes. (Closed)

Created:
6 years, 10 months ago by mlamouri (slow - plz ping)
Modified:
6 years, 10 months ago
Reviewers:
bulach, timvolodine
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@orientation_tests
Visibility:
Public.

Description

Use Display changes for screen orientation changes. This is the only reliable solution: we get an event from DisplayManager every time a display change. If that change is a rotation change from the display we care about, we can act on it. Using sensors or onConfigurationChange is unreliable. BUG=342714 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252846

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : update tests #

Total comments: 29

Patch Set 4 : review comments #

Total comments: 4

Patch Set 5 : moar review comments #

Total comments: 8

Patch Set 6 : #

Patch Set 7 : fix gc tests #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -129 lines) Patch
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 7 chunks +76 lines, -34 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java View 1 2 3 4 5 5 chunks +79 lines, -95 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
mlamouri (slow - plz ping)
This is fairly temporary given that we are working on a new API that will ...
6 years, 10 months ago (2014-02-18 10:49:36 UTC) #1
mlamouri (slow - plz ping)
FriendlyReviewReminder :)
6 years, 10 months ago (2014-02-19 21:19:33 UTC) #2
bulach
I like it, thanks! just some suggestion to make it even clearer and simpler for ...
6 years, 10 months ago (2014-02-20 11:05:18 UTC) #3
mlamouri (slow - plz ping)
https://codereview.chromium.org/163433010/diff/90001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/163433010/diff/90001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode442 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:442: private static class DisplayOrientationListener On 2014/02/20 11:05:18, bulach wrote: ...
6 years, 10 months ago (2014-02-20 12:06:50 UTC) #4
mlamouri (slow - plz ping)
This new patch should apply the previous comments. PTAL.
6 years, 10 months ago (2014-02-20 12:08:02 UTC) #5
timvolodine
+ some mostly code-stylistic nits: https://codereview.chromium.org/163433010/diff/90001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/163433010/diff/90001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode767 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:767: (DisplayManager) mContext.getSystemService(Context.DISPLAY_SERVICE); should the ...
6 years, 10 months ago (2014-02-20 12:09:02 UTC) #6
bulach
lgtm, tiny nit and feel free to go ahead once tim is happy! thanks! https://codereview.chromium.org/163433010/diff/240001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ...
6 years, 10 months ago (2014-02-20 12:18:58 UTC) #7
mlamouri (slow - plz ping)
All comments applied. Tim, PTAL. https://codereview.chromium.org/163433010/diff/90001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/163433010/diff/90001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode767 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:767: (DisplayManager) mContext.getSystemService(Context.DISPLAY_SERVICE); On 2014/02/20 ...
6 years, 10 months ago (2014-02-20 12:33:30 UTC) #8
timvolodine
lgtm happy modulo nits ;) https://codereview.chromium.org/163433010/diff/290001/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java (right): https://codereview.chromium.org/163433010/diff/290001/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java#newcode62 content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java:62: .getRotation()) { indent +8 ...
6 years, 10 months ago (2014-02-20 12:40:42 UTC) #9
mlamouri (slow - plz ping)
https://codereview.chromium.org/163433010/diff/290001/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java (right): https://codereview.chromium.org/163433010/diff/290001/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java#newcode62 content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationTest.java:62: .getRotation()) { On 2014/02/20 12:40:42, timvolodine wrote: > indent ...
6 years, 10 months ago (2014-02-20 12:47:15 UTC) #10
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 10 months ago (2014-02-20 12:47:21 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/163433010/330001
6 years, 10 months ago (2014-02-20 12:53:08 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-21 00:30:05 UTC) #13
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test on builder ...
6 years, 10 months ago (2014-02-21 00:30:06 UTC) #14
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 10 months ago (2014-02-21 10:17:06 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/163433010/330001
6 years, 10 months ago (2014-02-21 10:17:25 UTC) #16
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 10 months ago (2014-02-22 21:48:04 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/163433010/80002
6 years, 10 months ago (2014-02-22 21:48:16 UTC) #18
commit-bot: I haz the power
Change committed as 252846
6 years, 10 months ago (2014-02-23 08:04:03 UTC) #19
jdduke (slow)
6 years, 10 months ago (2014-02-24 17:42:37 UTC) #20
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/178253002/ by jdduke@chromium.org.

The reason for reverting is: This is causing runtime issues on pre-JB MR1
devices, as
DisplayManager.DisplayListener was added in API level 17.

A compat-layer equivalent will be needed before landing..

Powered by Google App Engine
This is Rietveld 408576698