Cell phones generally use a Lithium-Ion battery.
Lithium-Ion batteries should never be charged from a 5 V supply with an adjustable current limit. Lithium-Ion batteries need to be charged by a proper Lithium-Ion battery charger circuit. This circuit charges the battery to (usually) 4.2 V with a current depending on the voltage (and thus charge-state) of the battery and of course the battery's capacity.
When a Lithium-Ion battery is almost empty and also when it is almost full it needs to be charged with a small current. Only when the charge level is between 40 % and 70% (these numbers can vary) is charging with the maximum current safe to do.
So your assumption that you can charge a cell phone battery like you're suggesting this is wrong, it doesn't work like that and if you did proceed you run the risk of damaging the battery.
It is unclear if you are trying to make something which is fed from mains voltage. I hope not because that is very dangerous and you must know what you're doing before you can do this safely. Usually only engineers with some years of experience in that field know what is required. So don't make anything mains connected, for your own (and other people's) safety.