Fix app crash on emulator

This commit is contained in:
David Development 2015-04-11 14:04:57 +02:00
parent a00d344750
commit 3c078290bc

View file

@ -83,12 +83,16 @@ public class DownloadImagesService extends IntentService {
private void initService()
{
pathToImageCache = FileUtils.getPathImageCache(this);
try {
pathToImageCache = FileUtils.getPathImageCache(this);
maxCount = 0;
if(random == null)
random = new Random();
NOTIFICATION_ID = random.nextInt();
maxCount = 0;
if (random == null)
random = new Random();
NOTIFICATION_ID = random.nextInt();
} catch (Exception ex) {
ex.printStackTrace();
}
}
@Override