I have written an app (AutoWifiSwitch) and one of the features I plan to add is automatically disabling the wifi scanning service in my app if power saving mode is enabled.<
It did not work for me on my Samsung S8, Android 9, instead I used:
$adb shell settings put global low_power 1$adb shell settings get global low_power...and it worked!
Translating it into java it goes something like this:
final String result = Settings.Global.getString(getContentResolver(),"low_power");