Closed Bug 557642 Opened 14 years ago Closed 14 years ago

An option should be added to disable auto-rotation

Categories

(Firefox for Android Graveyard :: General, defect)

Other
Linux
defect
Not set
normal

Tracking

(status1.9.2 .4-fixed)

VERIFIED FIXED
Tracking Status
status1.9.2 --- .4-fixed

People

(Reporter: venemo, Assigned: mfinkle)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.3a4pre) Gecko/20100405 Namoroka/3.7a4pre Fennec/1.1a2pre
Build Identifier: Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.3a4pre) Gecko/20100405 Namoroka/3.7a4pre Fennec/1.1a2pre

I use the nightly builds of Fennec on my Nokia N900 because it is snappier than the 1.0 release, and also because I like to help testing projects such as this.

Yesterday after I updated to the newest build, I noticed a new feature which makes the browser UI rotate when I tilt the phone. This can be useful, but I'd like to disable it.
There is no option on the settings UI which can disable it.

I tried searching about:config.
The only option that seemingly affects this is accelerometer.enable, which I set to false, and restarted the application (and also rebooted the device), but it doesnt't disable the auto-rotation.

Reproducible: Always

Steps to Reproduce:
1. Start the latest nightly Fennec on a Nokia N900
2. Go to about:config
3. Set accelerometer.enable to false
4. Close the application, and restart it (Or reboot the N900)
5. Tilt the device
Actual Results:  
The browser UI rotates to portrait orientation.

Expected Results:  
The browser UI should NOT have rotated, since accelerometer.enable is set to false.

about:buildconfig

Source

Built from http://hg.mozilla.org/mozilla-central/rev/c4df407008b5
Build platform
target
arm-unknown-linux-gnueabi

Build tools
Compiler 	Version 	Compiler flags
gcc 	gcc version 4.2.1 	-Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -Wno-long-long -pedantic -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -finline-limit=50
c++ 	gcc version 4.2.1 	-fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -pedantic -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -finline-limit=50

Configure arguments
--with-maemo-version=5 --prefix=/opt/mozilla --libdir=/opt/mozilla --enable-application=xulrunner --disable-javaxpcom --with-arm-kuser --disable-updater
MicroB in the next update will (according to the reports on the SDK) have a switch to toggle this feature. I suggest setting parity MicroB and also perhaps checking out their solution for inspiration.
Attached patch patch (platform)Splinter Review
This patch just ignores orientation requests if "toolkit.lockScreen" is true
Assignee: nobody → mark.finkle
Attachment #437639 - Flags: review?(dougt)
Comment on attachment 437639 [details] [diff] [review]
patch (platform)

other toolkit preferences do something like:

toolkit.thing.function.

for example:

toolkit.scrollbox.scrollIncrement


How about changing the pref name to:

toolkit.screen.lock?
Attachment #437639 - Flags: review?(dougt) → review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 437639 [details] [diff] [review]
patch (platform)

Maemo-only change
Attachment #437639 - Flags: approval1.9.2.4?
Attached patch patch (browser)Splinter Review
This patch adds a screen lock toggle to the browser. It adds a <command> and a <key> (shift+ctrl+o)

Addons can use the <command> in other ways to toggle the screen lock.
Attachment #437850 - Flags: review?(21)
Comment on attachment 437639 [details] [diff] [review]
patch (platform)

a=beltzner for 1.9.2.4, Al, no need to verify this one.
Attachment #437639 - Flags: approval1.9.2.4? → approval1.9.2.4+
pushed to m-c:
http://hg.mozilla.org/mozilla-central/rev/0770fe34e535

pushed to m-192:
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/a82195fe433e

Still need to push patch to m-b when it's reviewed
Comment on attachment 437850 [details] [diff] [review]
patch (browser)

wfm on device
Attachment #437850 - Flags: review?(21) → review+
pushed to m-b:
http://hg.mozilla.org/mobile-browser/rev/5b13f763707f
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
verified FIXED on build:
Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2.4pre) Gecko/20100413 Namoroka/3.6.4pre Fennec/1.1a2pre
Status: RESOLVED → VERIFIED
I'm still having trouble: when closing the N900 keyboard while the phone is held as for portrait, the screen still switches (and keeps switching back and forth if you tilt back and forth; the lock only seems to work with open keyboard, which is kinda useless - IMHO it should always stay landscape with open keyboard, and the lock should only be needed on a closed keyboard)

toolkit.screen.lock is true

about:buildconfig

Source

Built from http://hg.mozilla.org/releases/mozilla-1.9.2/rev/91e79f7e8b96
Build platform
target
arm-unknown-linux-gnueabi

Build tools
Compiler 	Version 	Compiler flags
gcc 	gcc version 4.2.1 	-Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -Wno-long-long -pedantic -gdwarf-2 -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -finline-limit=50
c++ 	gcc version 4.2.1 	-fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -pedantic -gdwarf-2 -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -finline-limit=50

Configure arguments
--with-maemo-version=5 --prefix=/opt/mozilla --libdir=/opt/mozilla --disable-javaxpcom --with-arm-kuser --disable-updater --disable-ipc --enable-application=mobile --enable-official-branding
"toolkit.screen.lock = true" is not working on N900 and fennec-4.0-beta4 (4.0~b4~20110111014946)

Using (shift+ctrl+o) shows nice notification:
"Screen Orientation
Locked / Unlocked"
But screen is still oriented when device is tilted.

Happens keyboard open and keyboard closed.
This bug is closed. Please open a new bug for a regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: