Ive been using my galaxy S7 for years now and I am mostly pleased with it (other than battery life). Until few days ago that is. It started freezing and restarting on its own in different apps (whatsapp, chrome, games..). One time it even froze when I wanted to check what time it is by only pressing home button. I have cleared system cache and cache and data of few apps that I was using when it restarted but it didnt help. I dont see any other option than reseting to factory settings which I will do later on. Does anyone have any idea what could be causing this and any fix for it?