New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 643102 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

arc: Android apps cannot get a fixed display rotation by setting an appropriate orientation constraint

Project Member Reported by nya@chromium.org, Sep 1 2016

Issue description

Currently, when an Android app calls setRequestedOrientation(SCREEN_ORIENTATION_LANDSCAPE) in tablet mode, the screen never rotates to portrait mode, but it can be upside-down (rotated 180 deg.). This behavior is expected for SCREEN_ORIENTATION_SENSOR_LANDSCAPE but not for SCREEN_ORIENTATION_LANDSCAPE. The same applies for PORTRAIT. In fact, we observed some apps (e.g. portrait mode camera apps) get broken without locking orientation.

There are many other orientation constants we should support eventually, but meanwhile we want to support following constants properly:

- SCREEN_ORIENTATION_PORTRAIT
- SCREEN_ORIENTATION_REVERSE_PORTRAIT
- SCREEN_ORIENTATION_LANDSCAPE
- SCREEN_ORIENTATION_REVERSE_LANDSCAPE

Internal bug: b/31101025

 

Comment 1 by nya@chromium.org, Sep 1 2016

Labels: Merge-Request-53 ARC-Merge-Request
Considering the deadline, I'm requesting merge speculatively.

Comment 2 by nya@chromium.org, Sep 1 2016

The change under review is: https://codereview.chromium.org/2300943002/
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d01b59e76b012baac3a45caf0adf744950cc2ce7

commit d01b59e76b012baac3a45caf0adf744950cc2ce7
Author: nya <nya@chromium.org>
Date: Fri Sep 02 02:08:23 2016

arc: Support more orientation lock types.

Four orientation lock types are added for specific rotation
angles (0, 90, 180, 270 degrees).

Also, Orientation::CURRENT is improved to really lock to the
current orientation, not allowing upside-down orientation.

BUG= chromium:643102 
TEST=Manually tested with a small Android app which calls
     Activity.setRequestedOrientation().

Review-Url: https://codereview.chromium.org/2300943002
Cr-Commit-Position: refs/heads/master@{#416164}

[modify] https://crrev.com/d01b59e76b012baac3a45caf0adf744950cc2ce7/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
[modify] https://crrev.com/d01b59e76b012baac3a45caf0adf744950cc2ce7/components/arc/common/app.mojom

Comment 4 by dimu@chromium.org, Sep 2 2016

Labels: -Merge-Request-53 Merge-Review-53 Hotlist-Merge-Review
[Automated comment] There appears to be on-going work (i.e. bugroid changes), needs manual review.

Comment 5 by nya@chromium.org, Sep 5 2016

FYI, #3 is the only change needed for this issue.
Labels: -Merge-Review-53 Merge-Approved-53
Approving merge to M53. please merge in the next hour if possible.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 6 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0a9bc9d362b2bc061d88ebab35ccd4d1a4e9719

commit f0a9bc9d362b2bc061d88ebab35ccd4d1a4e9719
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Sep 06 17:08:48 2016

arc: Support more orientation lock types.

Four orientation lock types are added for specific rotation
angles (0, 90, 180, 270 degrees).

Also, Orientation::CURRENT is improved to really lock to the
current orientation, not allowing upside-down orientation.

BUG= chromium:643102 
TEST=Manually tested with a small Android app which calls
     Activity.setRequestedOrientation().

Review-Url: https://codereview.chromium.org/2300943002
Cr-Commit-Position: refs/heads/master@{#416164}
(cherry picked from commit d01b59e76b012baac3a45caf0adf744950cc2ce7)

Review URL: https://codereview.chromium.org/2316713002 .

Cr-Commit-Position: refs/branch-heads/2785@{#831}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/f0a9bc9d362b2bc061d88ebab35ccd4d1a4e9719/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
[modify] https://crrev.com/f0a9bc9d362b2bc061d88ebab35ccd4d1a4e9719/components/arc/common/app.mojom

Comment 8 by nya@chromium.org, Sep 6 2016

Labels: Merge-Request-54
Merged to M53 branch. Thanks for approval.

BTW I realized I also need to cherry-pick this to M54 too. Let me request merge again...

Comment 9 by dimu@chromium.org, Sep 7 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 10 by bugdroid1@chromium.org, Sep 8 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e451fa899aa2cdee0243da30c60f89642f714d6

commit 2e451fa899aa2cdee0243da30c60f89642f714d6
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Sep 08 07:15:00 2016

arc: Support more orientation lock types.

Four orientation lock types are added for specific rotation
angles (0, 90, 180, 270 degrees).

Also, Orientation::CURRENT is improved to really lock to the
current orientation, not allowing upside-down orientation.

BUG= chromium:643102 
TEST=Manually tested with a small Android app which calls
     Activity.setRequestedOrientation().

Review-Url: https://codereview.chromium.org/2300943002
Cr-Commit-Position: refs/heads/master@{#416164}
(cherry picked from commit d01b59e76b012baac3a45caf0adf744950cc2ce7)

Review URL: https://codereview.chromium.org/2320963002 .

Cr-Commit-Position: refs/branch-heads/2840@{#230}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/2e451fa899aa2cdee0243da30c60f89642f714d6/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
[modify] https://crrev.com/2e451fa899aa2cdee0243da30c60f89642f714d6/components/arc/common/app.mojom

Comment 11 by nya@chromium.org, Sep 8 2016

Status: Fixed (was: Started)
Merge done.
Status: Verified (was: Fixed)
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e451fa899aa2cdee0243da30c60f89642f714d6

commit 2e451fa899aa2cdee0243da30c60f89642f714d6
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Sep 08 07:15:00 2016

arc: Support more orientation lock types.

Four orientation lock types are added for specific rotation
angles (0, 90, 180, 270 degrees).

Also, Orientation::CURRENT is improved to really lock to the
current orientation, not allowing upside-down orientation.

BUG= chromium:643102 
TEST=Manually tested with a small Android app which calls
     Activity.setRequestedOrientation().

Review-Url: https://codereview.chromium.org/2300943002
Cr-Commit-Position: refs/heads/master@{#416164}
(cherry picked from commit d01b59e76b012baac3a45caf0adf744950cc2ce7)

Review URL: https://codereview.chromium.org/2320963002 .

Cr-Commit-Position: refs/branch-heads/2840@{#230}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/2e451fa899aa2cdee0243da30c60f89642f714d6/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
[modify] https://crrev.com/2e451fa899aa2cdee0243da30c60f89642f714d6/components/arc/common/app.mojom

Sign in to add a comment