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
Gallery2: support loop/single video play mode

(cherry picked new files from commit id
990c6d43ea7c184846e19d41bef0d93aee4e581b)

Change-Id: I0f55dfdfe812262804e7e45c99c7c9bbc5fb7503
Gallery2: Support HSCI screencolor settings use

Support to change HSCI values of the picture from Gallery2 in
screencolor settings, and set a picture as screen color.

Change-Id: If45adfca632083f297a58f3431ce9177bd4433c4
Gallery2: support GIF animation

(cherry picked new files from commit
2b133c9747af26701a12d60caef3e7e14cf55536)

Change-Id: I227cef76cbacd66b7e87bc59b4f07d518b70a859
Signed-off-by: Xiaojing Zhang <zhangx@codeaurora.org>
Gallery2: support GIF animation

This change implements a Java GIF decoder.

Change-Id: I72b6e8eb25572bba77a2a46e1754d8db8c47a0cc
Signed-off-by: Xiaojing Zhang <zhangx@codeaurora.org>
Gallery2: support audio effects during video play.

Porting from kk with fixes

Conflicts:
	res/values/strings.xml

Change-Id: I267c3c7e402fd5cf2bb223547003af491dd8289e
Signed-off-by: Xiaojing Zhang <zhangx@codeaurora.org>
Gallery2: support loop/single video play mode

This change allows a video to be played repeatedly. It also
introduces an extension framework.

Change-Id: I5566192f138c1f0fd889b85496dd27fbf2aed10d
CRs-Fixed: 507973
Gallery2: support stereo/single track play mode

(cherry picked new files from commit id
990c6d43ea7c184846e19d41bef0d93aee4e581b)

Change-Id: I2d7d523ca586a031c3fb139eda321d5073b30589
Gallery2: support stereo/single track play mode

User can select stereo/single track play mode.

Change-Id: I8225739815484f3c288823802f68478cb457725e
Gallery2: support live streaming and bookmarks

(cherry picked new files from commit id
990c6d43ea7c184846e19d41bef0d93aee4e581b)

Change-Id: Idc254cf0f7e8a9b492203313fa63349d07d19d5c
Gallery2: support live streaming and bookmarks

Users can input a URL for streaming display.
URL bookmarking is supported.

Change-Id: Ia69497cdcfee963ba2209119a5b9dc82b64497da
Gallery2: add some video features

(cherry picked files from commit id
990c6d43ea7c184846e19d41bef0d93aee4e581b)

Change-Id: Ifdcc4e9ab14d1f8b273faa97f0f66ba2f4034bea
Gallery2: add some video features

including: previous/next video play mode, screen mode,
fast forward/rewind button, step settings.

Change-Id: I3f4890c4dd95956e0eca889a5fd8b8d83b8d542e
Gallery2: Customize features for regional package

- Support user link to net to see more images.

Change-Id: I4c095bd124057c996d4bf0d3a4a035b6587db640
Gallery2: Fix batches of issues in movie effects

Fix following issues:
- All settings aren't restored to previous state when user cancel
his operations.
- Check the validity to avoid calling member function of an already
released object.
- Recycle effect instance when MovieActivity pauses.
- Don't restore strength from pref when toggling switch.
- Force the Effect's dialog to be uncancelable.
- Fix null pointer and effect leak issue due to CMCC features.
- Fix audio effects dialog display on small screens.
- Recognize bluetooth headset.
- Update visual design.

Conflicts:
	src/com/android/gallery3d/ui/Knob.java

Change-Id: I803897508c0c1a6723170b7691e3ece03680e4f1