Last Comment Bug 736073 - Implement ANSystem::setPowerState for Flash
: Implement ANSystem::setPowerState for Flash
Status: VERIFIED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: Trunk
: ARM Android
: P2 normal (vote)
: Firefox 16
Assigned To: James Willcox (:snorp) (jwillcox@mozilla.com)
:
Mentors:
: 750522 (view as bug list)
Depends on: 759799
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-15 07:39 PDT by James Willcox (:snorp) (jwillcox@mozilla.com)
Modified: 2012-06-19 08:37 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
verified
verified
verified
.N+


Attachments
Implement power state interface for Flash on Android (13.06 KB, patch)
2012-03-15 07:41 PDT, James Willcox (:snorp) (jwillcox@mozilla.com)
no flags Details | Diff | Splinter Review
Hook up Hal WakeLocks on Android and Flash (12.47 KB, patch)
2012-05-24 07:30 PDT, James Willcox (:snorp) (jwillcox@mozilla.com)
blassey.bugs: review-
Details | Diff | Splinter Review
Implement power state support for Flash on Android (5.88 KB, patch)
2012-05-30 09:46 PDT, James Willcox (:snorp) (jwillcox@mozilla.com)
blassey.bugs: review+
blassey.bugs: approval‑mozilla‑aurora+
blassey.bugs: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description James Willcox (:snorp) (jwillcox@mozilla.com) 2012-03-15 07:39:13 PDT
This allows Flash to keep the screen on while playing videos, for instance.
Comment 1 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-03-15 07:41:14 PDT
Created attachment 606208 [details] [diff] [review]
Implement power state interface for Flash on Android
Comment 2 Brad Lassey [:blassey] (use needinfo?) 2012-03-15 09:24:27 PDT
Comment on attachment 606208 [details] [diff] [review]
Implement power state interface for Flash on Android

Review of attachment 606208 [details] [diff] [review]:
-----------------------------------------------------------------

have a look and dom/power and hal/android to see what can be shared
Comment 3 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-05-01 11:42:40 PDT
*** Bug 750522 has been marked as a duplicate of this bug. ***
Comment 4 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-05-24 07:30:46 PDT
Created attachment 626798 [details] [diff] [review]
Hook up Hal WakeLocks on Android and Flash
Comment 5 Brad Lassey [:blassey] (use needinfo?) 2012-05-24 15:11:57 PDT
Comment on attachment 626798 [details] [diff] [review]
Hook up Hal WakeLocks on Android and Flash

Review of attachment 626798 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/chrome/content/browser.js
@@ +244,5 @@
> +            state: state == "locked-foreground"
> +          }
> +        });
> +      }
> +    });

I don't like this indirection, just called sendMessageToJava directly from the plugin code. Or (if you don't want to construct JSON in C++) add a new method to the bridge
Comment 6 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-05-24 15:29:24 PDT
(In reply to Brad Lassey [:blassey] from comment #5)
> Comment on attachment 626798 [details] [diff] [review]
> Hook up Hal WakeLocks on Android and Flash
> 
> Review of attachment 626798 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: mobile/android/chrome/content/browser.js
> @@ +244,5 @@
> > +            state: state == "locked-foreground"
> > +          }
> > +        });
> > +      }
> > +    });
> 
> I don't like this indirection, just called sendMessageToJava directly from
> the plugin code. Or (if you don't want to construct JSON in C++) add a new
> method to the bridge

I did it that way the first time around, but in comment #2 you said you'd rather go through hal...
Comment 7 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-05-30 09:46:34 PDT
Created attachment 628364 [details] [diff] [review]
Implement power state support for Flash on Android
Comment 8 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-06-06 20:09:08 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/d8243c3234fe
Comment 9 Ed Morley [:emorley] 2012-06-07 05:45:04 PDT
https://hg.mozilla.org/mozilla-central/rev/d8243c3234fe
Comment 10 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-06-14 08:44:13 PDT
Comment on attachment 628364 [details] [diff] [review]
Implement power state support for Flash on Android

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): 
String or UUID changes made by this patch:
Comment 11 Brad Lassey [:blassey] (use needinfo?) 2012-06-14 11:38:59 PDT
Comment on attachment 628364 [details] [diff] [review]
Implement power state support for Flash on Android

we're going to take this for the .N release, so please land on aurora and beta but not the beta 7 release branch on beta
Comment 12 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-06-14 13:02:39 PDT
https://hg.mozilla.org/releases/mozilla-beta/rev/6b309ab6a0b2
Comment 13 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-06-14 13:23:07 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/4f4776ead212
Comment 14 Adrian Tamas (:AdrianT) 2012-06-19 08:37:51 PDT
Setting screen timeout to a short interval and leaving youtube flash video player in fullscreen mode causes the timeout to be disabled and leaves the device awake until the video completes. 

Tested on:
Nightly 16.0a1 2012-06-19/ Aurora 15.0a2 2012-06-19/ Firefox Mobile 14 beta 7
HTC Desire
Android 2.2

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