Enable/disable data connection timing reversed

view story

http://stackoverflow.com – I am trying to enable/disable the data connection. I specify the (disconnect data connection) "From" & "To" timings which are getting reversed, i.e. The connection gets disconnected when it should actually get back ON. And obviously (because of this), it doesnt get back ON at all. Here is the (relevant) code: MainActivity public void triggerEnable(boolean enableData, int hourInDay, int minInDay) { Calendar calendar = Calendar.getInstance(); if (enableData) { calendar.set(Calendar.HOUR_OF_DAY, hourInDay); } else { calendar.set(Calendar.HOUR_OF_DAY, hourInDay); } calendar.set(Cale (HowTos)