Fix LinkedNode members with public access
Gallery2: support audio effects during video play.

Change-Id: I1706a1aaa9d76bc84b2e0720991fad9f7c45c336
CRs-Fixed: 516108
CRs-Fixed: 516113
CRs-Fixed: 516114

Conflicts:
	res/values/strings.xml
Gallery2: Check the validity of effect

There's a contention when effect is released but user still adjust it.
we need check the validity to avoid call member function of an already released object.

Change-Id: Ifdc637f5211670b63dc8ec6b42f3756195d1e88d
CRs-Fixed: 516911
 Gallery2: Add mimetype of AVI,DIVX to support streaming.

 -Mimetype of avi and divx is not added in AndroidManifest.xml
  to support streaming.
 -Avi Mimetype "video/x-msvideo" and Divx mimetype "video/divx"
  needs to be added in AndroidManifest.xml.
 -Fix is to add avi and divx mimetypes in AndriodManifest.xml.

 CRs-Fixed: 517049

Change-Id: Ibda05a258096d6730163ea0d73897d985aad99dc
Gallery2: if selected count is 0, leave selection mode.

If the selected count is 0, no need stay in selection
mode.

After we toggle a item, if selected count is 0，leave
the selection mode.

CRs-Fixed: 412492

Change-Id: Ia3ecd1c77f4074f21b1f906050b4a7bc2dc37c6e
Gallery2: update selected title in Chinese language

When the lanuage is Chinese, will put the selected number
in selected title from back to front to improve user
experience.

Correct the chinese string of number_of_items_selected.

CRs-Fixed: 429550

Change-Id: I5686ba7dd78537f6126bb8ac56f19f26628bf65d
Gallery2: force close happens when remove Gallery widget

The mSource may be null if we destroyed the widget.

So we make the function return null if we remove the
widget to make gallery avoid force closing.

CRs-Fixed: 362477

Change-Id: Ied227235f4dc78aeed69a70c264e523268c344d0
Gallery2: cut some menu items if current page is single item

There is no need to show those items in the menu when we
view this picture in the Mms

Cut some menu items if current page is single item

CRs-Fixed: 379918

Change-Id: I73f7070aebb576c2fe783cbb24f4e6c97a3fc36a
Gallery2: update selected number for database change

mSourceMediaSet will be updated for database changed
But mTotal will not if it is more than zero.

Update mTotal all the time for database changed

CRs-Fixed: 407961

Change-Id: I432b33ba62c04b18c6a1628b6b10dc9b77a72fc1
Gallery2: set the progress bar when we pause the video

The progress bar isn't set when we pause the video.

Set the progress bar when we pause the video

CRs-Fixed: BZ1623

Change-Id: I3d450df6fdf8195983692ed8a71ab42717e9c36c
Gallery2: dismiss delete-confirm dialog when pause

If user choose delete operation in camera page mode,
then a confirm dialog will show,then user pause and
resume from pause,will find the dialog still exists
in camera preview.

To prevent confusing user,we will change to dismiss
confirm dialog when pause.

CRs-Fixed: BZ737

Change-Id: Ib22cf78cc6c7e513208f57e502eaf0a4d1f50917
Gallery2: invalidate album view even only size changed

After deleting the pictures, it didn't request to
update the view. so the left pictures can not be
updated and displayed instantly.

Invalidate album view even only size changed to
make it shown correctly.

CRs-Fixed: 393995

Change-Id: I9924edf3a1d0e46d045425b9d078758e8cb50685
Gallery2: keep selection mode when deSelectAll

Origin code will call leaveSelectionMode function in
deSelectAll and will not keep in selected status on
this situation.

Add DESELECT_ALL_MODE in AlbumPage and
AlbumSetPage to make stay in selection mode even if
choose deSelectAll.

CRs-Fixed: 342469

Change-Id: Ia8819ba197444c33b1641ad33dd8602ecca0075c
Gallery2: request thumb if fail to get region decoder

When fail to get region decoder in SinglePhotoAdapter, try to
request thumb image rather than return null directly.

CRs-Fixed: 369231

Change-Id: I11fe4b4f3ac10550f10e0391a919c0ea18fe47e0
Gallery2: update time-cluster albums for database change

When in time clustering and picture/video added,the page
is not updated for current cluster album will ignore this
change.

We add to reload cluster albums on this solution,meanwhile
change time clustering method from dynamic to static which
makes same month and same year items into same cluster.

CRs-Fixed: 383896

Change-Id: I59b592d91c045290b4b2a0ff4279f5a95fa83706
Gallery2: update content start/end once getUpdateinfo

When viewing last picture in screenshot album and do screenshot, the
new picture will become the first one in album and the album has
changed, but this time current index and content start/end is still
old value, so user will find change to previous picture from current
one in current page.

To aviod this situation, will update content start and content end
once after getUpdateinfo and then can get correct current index and
item path.

CRs-Fixed: 420908

Change-Id: If0da8f8b2ea25d4aed9b8a73f6050e58aadae5de
Gallery2: add strings resource for Chinese language

Lack "headset plug" and "audio effects dialog title"
Chinese strings resources.

Add the Chinese strings in value-zh-rCN and value-zh-rTW.

CRs-Fixed: 494287

Change-Id: I669022f532fe0ca0ffa1803478f0b2c026f6a553
Gallery2: if phone is locked, pause the video, if not, start it.

If there was a video playing before locking the phone,
After pressing the emergency call option in lock screen,
and then presses back key, the MovieActivity will resume,
so the video will play background.

Set a listener, if Keyguard is locked,pause the video,
if not, start it.

CRs-Fixed: 427283

Change-Id: Ia825afee691ee53f53eebf1f96efe09ef88ca743

Conflicts:
	src/com/android/gallery3d/app/MoviePlayer.java
Gallery2: finish MovieActivity when click back-up button

Gallery activity will be started after we clicked back
button during the video is being played.

If click back up button we will always finish current
activity and back to previous one.

CRs-Fixed: 421740

Change-Id: If061af81c7aecabccd65825fc841ff2726ba61e2
Gallery2:fix NPE when cannot load image in FilterShowActivity

When DRM image file can not be loaded, it still uses the
load-failed pointer(null) to get information. The
NullPointerException causes the unexpected result.

When load image failed, return directly from onPostExecute().

CRs-Fixed: 516899

Change-Id: Ib8f6903941aca8ef3f6b8a128fac9551aa03db27