Properly handle null URIs.

Change-Id: Ib81044686f40284bacf6ee645c671679f62be843
Fix for screenshot animation glitch in portrait

edits by Stefano Semeraro aka Suxsem.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6