Fix for Backup Services

Change-Id: I7cd572b85648bca6a7777f026be4933e7d71a9f0
Fix for screenshot animation glitch in protrait.

Edit suggested by users Suxsem and AbhishekS on XDA.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6
Improve screenshot animation glitch fix.

New patchset by Stefano Semeraro aka Suxsem.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Missing break in switch statement

Change-Id: I462c0c5fec96a850032266b04419ec409ad02174
Fixed incorrect calculation of dirty invalidation area

Padding was already taken into consideration before calling
invalidateDrawable in ProgressBar.

Change-Id: I75f25b0b7ee87d394422c58888ed3a1cca5d06a8
Fix error checking in MemoryFile.

mmap returns MAP_FAILED on failures, not 0 (NULL).
Also, convert some C style casts to C++ since they
make intent clearer.

Change-Id: I367993c73e9ee576f11ebe76e530d2c2f27c662d