If you find that your screen is locked and you are not able to do anything in your device. You cannot open any of the applications or do any task. There might be a chance that there had been a Ransom attack. If this would have been the case then remember to never give the Ransom to the attackers as it does not guarantee that your phone or data would be safe and you would get the access back, in fact, it will give the attackers an advantage and greed to take a good ransom from you even the other time. If you are in such a situation then do not worry; just follow the method which is- reboot the device in safe mode> revoke device administrator privileges> delete the app or program that has caused the trouble.