[Android N Multi-window] Make ScreenOrientationProvider MultiWindow/MultiDisplay aware |
|||||
Issue descriptionScreenOrientationProvider is clearly not MultiWindow aware, and looks like it will fail in strange ways with MultiWindow/MultiDisplay. Especially bad is its use of ApplicationStatus.getLastTrackedFocusedActivity() to determine which Activity's orientation to lock/unlock.
,
Oct 26 2016
also it's probably broken already since chrome added ability to reparent tabs
,
Oct 26 2016
All of that did not exist at the time :( I was hoping the multi-window project to take care of Screen Orientation API. boliu@, do you intend to fix this? :)
,
Oct 26 2016
multiwindow vs multidisplay, not the same thing, multi window is already implemented, ie CCT and the reparenting logic anyway, I'm not sure entirely how things should behave, what happens when a tab is reparented to a different activity (which can happen today already)? what happens when a tab is reparented to a different activity on a different display (can't happen, yet)? Is there js callback that says "oops, you just lost your orientation lock" kind of thing?
,
Oct 26 2016
There is no such API but the `screen` object in JS only reflects the current screen so if the window changes display, the lock would no longer apply indeed. How does this work with the Android API?
,
Oct 26 2016
android activities are not allowed to move between displays (afaik)
,
Oct 27 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 27 2017
+tedchoc@, is this something our team could consider?
,
Oct 27 2017
This patch fixed it from using the last tracked activity to getting one from the window android: https://codereview.chromium.org/2696303004 So maybe this is fixed? What is the relationship between web contents and the screen orientation provider? Is it 1:1 or is there one provider for the entire process? There was an open comment in that bug where reparenting could change the activity and cause issue if you locked the orientation in one and then were moved and attempted to unlock in another. I think conceptually we'd want to use a WindowAndroidChangedObserver and keep a list of web contents references or something to help track across activities. Then again, I'm not sure how much work that would be vs the likelihood of it ever being hit.
,
Oct 27 2017
ScreenOrientationProvider only has static methods, so it's global the refactor is probably to remove ScreenOrientationProvider altogether, and add orientation events to DisplayAndroid, and hook all the existing things that uses ScreenOrientationProvider to the new thing
,
Jun 5 2018
,
Jun 5 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by boliu@chromium.org
, Oct 26 2016