Merge remote-tracking branch 'upstream/cm-11.0' into cm-11.0
Merge remote-tracking branch 'upstream/cm-11.0' into HEAD
Automatic translation import

Change-Id: I11a38c96da37dd0590fd85132ed0905aa0309d39
Merge remote-tracking branch 'upstream/cm-11.0' into cm-11.0
DownloadProvider: fix the crash when rotate screen.

TrampolineActivity will be recreated when rotate screen,
then the fragment is currently associated with any Activity.
So getActivity() will return a null and caused NullPointerException.

Add the null check before call finish().

CRs-Fixed: 640914

Change-Id: I76f368a597552e824d533b6a66ea23fad4c0cb41
DownloadProvider: add to support download into sdcard storage

When insert into downloads database to start a new download,
will check file uri destination is valid or not, currently it
only support phone storage downloading, what we do is to add
supporting sdcard storage downloading, this will make download
save path setting feature work well.

Change-Id: I7995ae63ec5769103d7ad66bcd677e383ef7f440
Merge commit '43a967add109d0fe1fd2ef335b84532868272e7f' into android-4.4