how do I restrict my android phone to just my home and work wifi? My android phone keeps connecting to random public wifi's that don't work very well. So I turned off wifi completely. Is there a way to say: use wifi if either my home wifi or work wifi is available, otherwise never use wifi?
Android won't connect to a wifi access point without you specifying that you want to and saving it. 

Under settings, wifi, long-press on the names of any access points you don't want to connect to and choose "Forget Network".