Adjustable charge current from programming resistor for Li-Ion charger - how to change on demand?
I searched for "Li-Ion battery charger dual current".

It looks like ICs are designed for exactly this task, e.g. ISL9221.

Or much of the task, e.g. LTC4077

And finally LM3658 which can be preset to 100mA or 500mA for USB.

They adjust the battery charging current when when one source is disconnected (they assume a high current wall outlet is on one), and assume the other is USB, where the default current is 100mA.

I think disabling the buck converter when USB is detected may be optional for the ISL9221, but might still be needed for the LTC4077.