Last Comment Bug 650390 - osversion in chrome.manifest files should query android os version
: osversion in chrome.manifest files should query android os version
Status: VERIFIED FIXED
:
Product: Fennec Graveyard
Classification: Graveyard
Component: General (show other bugs)
: Trunk
: All Android
: -- normal (vote)
: ---
Assigned To: Mark Finkle (:mfinkle) (use needinfo?)
:
Mentors:
Depends on:
Blocks: 649820
  Show dependency treegraph
 
Reported: 2011-04-15 14:24 PDT by Wesley Johnston (:wesj)
Modified: 2011-07-14 21:35 PDT (History)
5 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (1.55 KB, patch)
2011-05-02 19:16 PDT, Mark Finkle (:mfinkle) (use needinfo?)
dtownsend: review+
Details | Diff | Splinter Review

Description Wesley Johnston (:wesj) 2011-04-15 14:24:52 PDT
For creating themes customized for different android versions, it would also be nice to be able to query the os version in our chrome.manifest files, similar to how we changed themes for windows xp vs. windows vista.
Comment 1 Mark Finkle (:mfinkle) (use needinfo?) 2011-05-02 11:40:41 PDT
Let's examine this approach vs bug 650388
Comment 2 Dave Townsend [:mossop] 2011-05-02 11:42:24 PDT
Simple enough if you can pull the android version in C++. Look to put something here: http://mxr.mozilla.org/mozilla-central/source/xpcom/components/ManifestParser.cpp?force=1#468
Comment 3 Mark Finkle (:mfinkle) (use needinfo?) 2011-05-02 12:01:18 PDT
(In reply to comment #2)
> Simple enough if you can pull the android version in C++. Look to put something
> here:
> http://mxr.mozilla.org/mozilla-central/source/xpcom/components/ManifestParser.cpp?force=1#468

Great! We can do that easily. We also need to add "Android" as a platform too. I see that in the same file.
Comment 4 Mark Finkle (:mfinkle) (use needinfo?) 2011-05-02 19:16:29 PDT
Created attachment 529626 [details] [diff] [review]
patch

Patch uses Android version string in chrome manifest parser. The string returns whatever Android gives us, which can be a limited set of 2 or 3 part version strings, meaning "2.2" or "2.3.3" forms. Using this patch and changes to a jar.mn (not in patch), I was able to test that the osversion flag was correctly handled at runtime. The jar.mn changes I used were modeled after:

http://mxr.mozilla.org/mozilla-central/source/browser/themes/winstripe/browser/jar.mn

except I used:

% skin browser classic/1.0 %skin/ os=Android osversion<2.3
% skin browser classic/1.0 %skin/ os!=Android

...

% skin browser classic/1.0 %skin/ginger/ os=Android osversion>=2.3

I ran the app on 2.2 and 2.3.3 devices. Both worked as expected.
Comment 5 Mark Finkle (:mfinkle) (use needinfo?) 2011-05-05 13:51:29 PDT
pushed:
http://hg.mozilla.org/mozilla-central/rev/6fe900aa4679
Comment 6 Anna (Waverley) 2011-06-02 04:11:13 PDT
Can someone please verify this bug?
Comment 7 Mark Finkle (:mfinkle) (use needinfo?) 2011-06-02 05:32:52 PDT
(In reply to comment #6)
> Can someone please verify this bug?

If you see the theme change on gingerbread (android 2.3 and higher), then this patch is working. I see the theme change.

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