radio turns on and off randomly
So these few past days have been hell for my mustang. i was pulling out of the gas station when everything in my cabin turned off, i drove home and checked it out. the alternator went, car was runnin off battery. so i just replaced it, everything runs fine but the aftermarket radio i installed. i have an avic d2, it sometimes is turning on now and sometimes isnt, even if the car is off and just running of the battery it will sometimes turn on and off. it never stays on for more then 30 seconds and will keep just doing it over and over. while the car is running itll just keep turning on and off at random times. its been installed for over 2 years now and has never done this. i cant figure out why its doing this. ive extensively looked through multiple threads and nothing came up like this. i havent moved or even touched the radio in over a few months so i dont think its a bad connection.