Fix the creation of empty file when screenshot is failed.

The doInBackground function does not check the return value from
compress method in Bitmap class. So an empty file is created when
compress fails.

The original code does not clean up file and DB when it fails to
create a screenshot.

This fix adds check the return value and cleans up file and DB
when compress method fails.

Change-Id: I80182a1cba8dde74a11a84e718a8a93770b1597b
[ScreentShot]: change the implementation of get image file size

Because File can't get permission to get file size of screenshot image.
So use InputStream to get file size correctly of screenshot image.

Change-Id: I1c3df40ddd526d3431bc899642d00f4021d7eeb3
Author: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: shi yang <yang.a.shi@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 30940

Conflicts:
	packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java