Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2469] Android: orientation - unexpected results for "set portrait" after setting "allow landscape only"

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:11.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M07
ComponentsAndroid
Labelsandroid, orientation, regression, release-1.6.0
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:20:35.000+0000
Updated2011-04-17T01:59:11.000+0000

Description

Titanium SDK version: 1.5.0 (11/29/10 08:10 faa27c7). G2 (2.2) some G1 (1.6) some droid 1 (2.2) and a bit of sim (2.1)

change in behavior since last weeks 1.5.0.591838a pull

1.Phone > orientation
2.hold it in portrait
3.Tap "allow landscape only"
4.tap "set portrait"

results (you may need to repeat this once if you don't see it first time, it is a little bit intermittent) the app briefly draws in portrait, then returns to landscape. broke between 1.5.0.591838a and now

Comments

  1. Marshall Culpepper 2011-04-15

    Hrm.. this is similar to the way the iPhone test works. "Set Portrait" works as long as you don't rotate back to landscape (or near it). Once rotated back, the lock goes back into effect. The sensor sensitivity might be a little high for the switch back.. thoughts?

  2. Thomas Huelbert 2011-04-15

    Hey Marshall, I omitted some important info - how you hold the phone will affect this test. If you lay the phone on a flat surface (in portrait) you won't see it flash to portrait then back to landscape. If you hold it up in portrait, when do step 4 you should see it briefly draw in portrait before it draws in landscape again. sorry for the missing steps.

  3. Bill Dawson 2011-04-15

    Logic in TiBaseActivity.onOrientationChanged was wiping out info about the orientation "override" -- an orientation that is not one of the "allowable" but is set explicitly. That's the use case described in this ticket: setting "landscape only" then explicitly setting to portrait. That information about the explicit set to portrait was being wiped out as soon as you move the device while in portrait. Thereafter, any further move inside portrait would look like it's not allowable and therefore get flipped to landscape (the allowable).

    Hard to explain. But with this fix, it doesn't jerk back to landscape (as was the fail case) right when you move it. Instead it waits until it actually is landscape (when tilting toward the left; apparently we don't support tilting toward the right in this arrangement.)

  4. Bill Dawson 2011-04-15

    (from [ba41eca7d89e0a7db6183b2d5556abd194ef4a9a]) [#2469 state:fixed-in-qa] don't wipe out information about an 'override' orientation until an allowable orientation is reached. https://github.com/appcelerator/titanium_mobile/commit/ba41eca7d89e0a7db6183b2d5556abd194ef4a9a"> https://github.com/appcelerator/titanium_mobile/commit/ba41eca7d89e...

  5. Opie Cyrus 2011-04-15

    verified 2.2 on droid2

JSON Source