Looks like found a way to stop restarting activity when screen goes off.
Need to find the same thing for USB