I recently upgraded my Nexus S to Nexus 4. Unfortunately, new Nexus 4 is switching off at random, by itself. One observation is that it happens more often while charging - when it reaches 99%. It is also switching off while not in use.
Because of this, I missed many wake-up calls / alarms and...