That's why a factory reset is crucial before you sell, recycle, or donate your Android phone or tablet. It can also be a last-ditch attempt at troubleshooting persistent issues with your device.
You should also perform a factory reset if you are selling the phone, or giving it to someone ... Hold all three buttons until you see the Android logo appear. Then let go of the buttons.