protected String doInBackground(Void... params) {
Log.v(TAG, "BgUpdate " + updater + " starting");
Utterance result = updater.getResult();
- if (!result.success) {
+ for (int i = 2; !result.success && i <= 3; i++) {
SystemClock.sleep(1000 + random.nextInt(1000));
result = updater.getResult();
}
if (!result.success) {
- Log.e(TAG, "After second attempt still " +
+ Log.e(TAG, "After third attempt still " +
result.message);
}
return result.message;