diff options
author | 2013-06-28 13:06:59 +0900 | |
---|---|---|
committer | 2013-07-01 14:47:30 +0900 | |
commit | 3f0858eb2bcb9414dd94e01991b02c785af7b871 (patch) | |
tree | 12d7f458cc550e8163e1e33ea0c52e21cd57b6bd /java/src/com/android/inputmethod/dictionarypack/DictionaryService.java | |
parent | 8142a7b637326e8fe8736de94246b1fffb4f2886 (diff) | |
download | latinime-3f0858eb2bcb9414dd94e01991b02c785af7b871.tar.gz latinime-3f0858eb2bcb9414dd94e01991b02c785af7b871.tar.xz latinime-3f0858eb2bcb9414dd94e01991b02c785af7b871.zip |
Fix a bug where no URL means refresh never ends
This patch does two things:
- If there is no URL to download new data from, then the
Refresh button is not shown.
- Even if for some reason refresh starts for a client for
which there is no URL, loading correctly finishes.
Bug: 9388602
Change-Id: I3fd9214da50faa4b59d0bd3e775293dd34f07547
Diffstat (limited to 'java/src/com/android/inputmethod/dictionarypack/DictionaryService.java')
-rw-r--r-- | java/src/com/android/inputmethod/dictionarypack/DictionaryService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java b/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java index 6e3dd7109..3b00723e3 100644 --- a/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java +++ b/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java @@ -170,7 +170,7 @@ public final class DictionaryService extends Service { checkTimeAndMaybeSetupUpdateAlarm(context); } else if (DictionaryPackConstants.UPDATE_NOW_INTENT_ACTION.equals(intent.getAction())) { // Intent to trigger an update now. - UpdateHandler.update(context, false); + UpdateHandler.tryUpdate(context, false); } else { UpdateHandler.downloadFinished(context, intent); } @@ -221,7 +221,7 @@ public final class DictionaryService extends Service { */ public static void updateNowIfNotUpdatedInAVeryLongTime(final Context context) { if (!isLastUpdateAtLeastThisOld(context, VERY_LONG_TIME)) return; - UpdateHandler.update(context, false); + UpdateHandler.tryUpdate(context, false); } /** |