Can you programmatically check to determine if your android device is in deep sleep mode?
Reason being, if it is, you may obtain a wake lock or a wifi lock... however, is it is not, you wouldn't want to obtain a wifi lock if it is not necessary. Since, I also have a delay created when a wifi lock is obtained in order to allow the device time to connect to the network. If it is not needed, I do not want to get the wifi lock and add a delay.