title: Keep screen off when power supply is connected/disconnected
body: <p>A rooted device I use, namely HTC 10 running stock Android 8 firmware, has annoying behavior: when power supply is connected/disconnected, its screen goes on for about 15 seconds.</p>
  <p>I know it for sure that other devices (even different models from HTC itself) could keep screen off in this situation. So I don't think it's a HTC 10 specific issue and I guess the behavior depends on some (hidden?) OS settings.</p>
  <p>Also, LineageOS has an option for controlling this in its Settings.</p>
  <p>Could someone (probably, experienced in ROM development) point me to a location of system flag(s) controlling whether the screen goes on when power supply is connected/disconnected?</p>