Use this code to unlock in an emergency call: *#812#
. After calling it, the phone unlocked and I was shown the home screen. After that, I went to the setting and added a new Google account. Since then, the phone works perfectly and thus is absolutely safe.
If you have the same problem, just try it. If it unlocks, then good for you. If it does not, then just nothing happens.
It worked beautifully on amy OnePlus2.