The default bug view has changed. See this FAQ.

osversion in chrome.manifest files should query android os version

VERIFIED FIXED

Status

Fennec Graveyard
General
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: wesj, Assigned: mfinkle)

Tracking

Trunk
All
Android

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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.
(Reporter)

Updated

6 years ago
Blocks: 649820
Let's examine this approach vs bug 650388
Whiteboard: [fennec-6]
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
(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.
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.
Assignee: nobody → mark.finkle
Attachment #529626 - Flags: review?(dtownsend)
tracking-fennec: --- → 6+
Whiteboard: [fennec-6]
Attachment #529626 - Flags: review?(dtownsend) → review+
pushed:
http://hg.mozilla.org/mozilla-central/rev/6fe900aa4679
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 6

6 years ago
Can someone please verify this bug?
(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.
Status: RESOLVED → VERIFIED
(Assignee)

Updated

6 years ago
status-firefox6: --- → fixed
You need to log in before you can comment on or make changes to this bug.