Reset preference state correctly if download initiation failed.

Change-Id: I710ca6597bb874b20ca43588454df1900e2625d1
Merge "Reset preference state correctly if download initiation failed." into cm-10.1