Gallery2: Fix Gallery Crash when click Information menu.

In UpdatePreviewTask,the condition in the doInBackground
is not correct which cause the NullPointerException happened.

Only judge the buffer.getProducer() before it is used.

CRs-Fixed: 619081

Conflicts:
	src/com/android/gallery3d/filtershow/pipeline/UpdatePreviewTask.java

Change-Id: Iac3152328abeb72002785cfa2eb28830ea87f439
Gallery2: Fix crash sometimes when delete video in Gallery.

It's the IndexOutOfBoundsException which causes the app crash.
According to log, it's the size of list is 0, but still want to
get the first item in list.

Add extra judgement before get item from ArrayList, if the size
is 0, skip it as the item is null.

CRs-Fixed: 622574

Change-Id: Ide839b2a73954b9da052a6fece46c864dfa42a21