@adventure_tense No, we don't do any of this based on OS updates and we always allow charging by default. An attacker could physically provide power without that much effort.
By default, we disable any new USB-C connections as soon as the device is locked and fully disable USB-C data when existing connections end. If there are no connections, data is disabled right away.
There's an opt-in to a stronger mode where USB data is always disabled and an even stronger mode where charging is disabled.
@adventure_tense The even stronger mode for disabling charging exists to eliminate the firmware and kernel attack surface from charging including USB-PD rather than to serve the purpose of actually stopping the device being charged.
It does still allow USB including charging when the device is powered off, booted into fastboot mode or one of the special OS boot modes (charging, fastbootd, recovery) so you can't brick a device by setting the USB-C mode to Off. Off is intended for temporary use.