Gallery2: add support for the DASH mimetype

Add support for the DASH mimetype

CRs-Fixed: 539815
Change-Id: Ibbd03a2e4e3b1ca9224d4651e1c518e2ba51ba77
Gallery2: Fix crash for unsupported format on mute operation

MPEG4Writer does not support formats other than mp4/h264/h263. The
app needs to check for unsupported formats before starting any mute
operation. Add a condition in the app to check for unsupported
formats and display a toast message.

CRs-Fixed: 514347 696137
Change-Id: Ib2ce48d2b8ebaef80936bc7a446e1c97e3a10c31
Use WeakReferenes to reduce Bitmap memory footprint

Use HashMap<Integer, WeakReference<Drawable>> instead of just
    HashMap<Integer, Drawable>

Without this, references are still being held for Bitmap drawables,
thereby after few Photo edits, OutOfMemoryException is raised and
Gallery crashes

Change-Id: If91f950986bd816d5571a0d51a7cb9522226e270
Handle exception thrown for invalid track formats

MediaMuxer's addTrack() function can throw IllegalArgumentException
if the track added is invalid or not supported. Catch this exception
to out nicely and avoid an app crash.

Change-Id: Id837179c56878dd7fef96d3b798bf427d82d7175
Fixed NullPointerException when EXIF data is invalid

For some images with no / invalid EXIF data, Gallery crashes
Fixed this bug by catching NullPointerException

Change-Id: I656fe6d526c981933c3d6eeefe67cda860206e2d
Gallery2: avoid the crash of gallery during trimming video

- Google only provides the lib of mp4 parser to support
  the video-trim feature. But some files would fail to
  trim and cause the gallery crash
- catch the IllegalStateException to avoid the crash of gallery

Change-Id: Iadda7a42d4d694c102d50d2c52a93979ba2907a7
CRs-Fixed: 523986