Opened 8 years ago

Closed 8 years ago

#13816 closed defect (wontfix)

redundant has tests in dojox/mobile

Reported by: Douglas Hays Owned by: ykami
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

dojox/mobile has several tests for
has('android') >= 2.2 && has('android') < 3 (or 3.1)
but I think it should be just
has('android') < 3 (or 3.1). A value of undefined fails both conditional tests.
Also I noticed that both dojo/_base/sniff AND dojox/mobile/sniff define has('android'), and they appear to be the same test. It might be worth moving the Blackberry has.add to dojo/ as well.

Change History (3)

comment:1 Changed 8 years ago by ykami

Doug, I am not sure what you mean. has('android') < 3 (or 3.1) is not our intention. We didn't want to apply the code to 2.1.
I knew about has('android') in dojo/_base/sniff. It had been returning true/false until Bill changed it to return a version number recently. But basically the policy is to return only true/false. So I intentionally left it so as not to be affected by possible dojo/_base/sniff changes. (dojox.mobile was once broken by such a change.. (#13754))

comment:2 Changed 8 years ago by Douglas Hays

We don't support Android 2.1 so I was suggesting a code savings.

comment:3 Changed 8 years ago by ykami

Resolution: wontfix
Status: newclosed

OK, I understood what you meant. We had been taking care of 2.1 with minimum effort even though it was not officially supported. Let us leave the condition this time. It is not so harmful, since we do not have any 2.1 specific code blocks.

Note: See TracTickets for help on using tickets.