Can not continue to download after powering on the phone
authorBenson Huang <benson.huang@mediatek.com>
Thu, 15 Jan 2015 01:58:45 +0000 (09:58 +0800)
committerleozwang <leozwang@google.com>
Thu, 15 Jan 2015 22:02:38 +0000 (14:02 -0800)
commitf3679d0367cd8a0e72875800decf9f63033645a0
tree63a1429615b3d1584d33d8a103123dc37f6dc5a9
parent1bb7a08a3df915e84647bc8a5ca87cc157378e61
Can not continue to download after powering on the phone

    1. Launch chrome and open www.baidu.com -> Choose "software"
    in the site navigation -> Tap "games" option, choose one apk
    to download -> During downloading, power off the phone -> Power
    on the phone and check, it can't continue to download apk.

    The fix is to add one condition for retrying to download when
    IO exception happens (i.e. Failed to open for writing:
    java.io.FileNotFoundException).

    Bug 18834618

    Review: https://partner-android-review.git.corp.google.com/#/c/193436

Signed-off-by: Benson Huang <benson.huang@mediatek.com>

Change-Id: I2f975ff7ffedfc4136fb250dcb5ef8fdca4a367d
src/com/android/providers/downloads/DownloadThread.java