Last Comment Bug 766904 - Make sure unlockOrientation() is a no-op if the orientation wasn't locked
: Make sure unlockOrientation() is a no-op if the orientation wasn't locked
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: Trunk
: ARM Android
-- normal (vote)
: Firefox 16
Assigned To: Mounir Lamouri (:mounir)
: Sebastian Kaspari (:sebastian)
Depends on: 757791
  Show dependency treegraph
Reported: 2012-06-21 03:33 PDT by Mounir Lamouri (:mounir)
Modified: 2012-07-16 00:55 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (1.93 KB, patch)
2012-06-21 03:33 PDT, Mounir Lamouri (:mounir)
no flags Details | Diff | Splinter Review
Patch v2 (2.26 KB, patch)
2012-06-21 05:29 PDT, Mounir Lamouri (:mounir)
blassey.bugs: review+
akeybl: approval‑mozilla‑aurora+
mounir: checkin+
Details | Diff | Splinter Review

Description User image Mounir Lamouri (:mounir) 2012-06-21 03:33:11 PDT
Created attachment 635242 [details] [diff] [review]
Patch v1
Comment 1 User image Brad Lassey [:blassey] (use needinfo?) 2012-06-21 03:51:09 PDT
Comment on attachment 635242 [details] [diff] [review]
Patch v1

Review of attachment 635242 [details] [diff] [review]:

::: mobile/android/base/
@@ +163,5 @@
>    public void unlockScreenOrientation() {
> +    if (!mIsLocked) {
> +      return;
> +    }

how about?
if (GeckoApp.mAppContext.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)

rather than introduce this new state that needs to be maintained.
Comment 2 User image Mounir Lamouri (:mounir) 2012-06-21 05:29:46 PDT
Created attachment 635267 [details] [diff] [review]
Patch v2
Comment 3 User image Mounir Lamouri (:mounir) 2012-06-22 02:09:16 PDT
Comment on attachment 635267 [details] [diff] [review]
Patch v2

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 740190
User impact if declined: with bug 764753, we are going to call unlockOrientation() every time a nsScreen is killed. We want to make sure doing so when there was no orientation lock is a no-op in that case.
Risk to taking this patch (and alternatives if risky): regressions like unlock() not being called but that seems safe enough...
String or UUID changes made by this patch: none
Comment 4 User image Ed Morley [:emorley] 2012-06-22 09:16:03 PDT
Comment 5 User image Alex Keybl [:akeybl] 2012-06-26 10:44:01 PDT
Comment on attachment 635267 [details] [diff] [review]
Patch v2

[Triage Comment]
Low risk, Fennec Native only fix. Approved for Aurora 15.
Comment 6 User image Mounir Lamouri (:mounir) 2012-07-04 10:39:44 PDT
Comment 7 User image Scoobidiver (away) 2012-07-16 00:55:14 PDT
Target Milestone is for m-c.

Note You need to log in before you can comment on or make changes to this bug.