thanhlong203 / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

[patch] goog.userAgent.product.isVersion broken for Android #279

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
goog.userAgent.product.isVersion is broken for Android. It currently returns 
what looks like a Safari-compatible version number, but advancements in the 
Android version haven't updated this version.

Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Nexus One Build/EPE54B) 
AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Droid Build/FRG83) 
AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Both of those return 4.0 for the product version and so testing for Android 2.1 
returns true no matter what.

The patch I'm proposing changes the functionality to return the Android version 
instead of the rather useless fake version. This is a potentially breaking 
change for anyone relying on getting back "4.0" or "3.0.4", but the alternative 
of having it unexpectedly return true going forward is the worse behavior in my 
opinion.

http://codereview.appspot.com/4220046/

Original issue reported on code.google.com by amat...@gmail.com on 24 Feb 2011 at 8:16

GoogleCodeExporter commented 8 years ago

Original comment by nn...@google.com on 25 Apr 2011 at 11:10

GoogleCodeExporter commented 8 years ago
Can I get a review started on this?

Original comment by amat...@gmail.com on 25 Aug 2011 at 6:29

GoogleCodeExporter commented 8 years ago
It appears this was fixed on 2/18/12 in r1447.

Original comment by amat...@gmail.com on 25 Apr 2012 at 7:14

GoogleCodeExporter commented 8 years ago
I believe you meant r1596? (r1447 was my change and it was unrelated ;)) 
Marking as fixed then. Thanks for the report!

Original comment by chrishe...@google.com on 25 Apr 2012 at 8:48