aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-06-12 18:11:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-12 18:11:17 +0000
commit3d9ebf213cf795958bca1c036002eb657d1a8366 (patch)
tree6041fa06dbb662b3d3dea9df30a01905ee9767ff /java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
parent14dd52b8c058b27adb17777536ff11c4b69616fc (diff)
parent2c1796c22698a4d8771cc15cf3d5e7a39a9a57df (diff)
downloadlatinime-3d9ebf213cf795958bca1c036002eb657d1a8366.tar.gz
latinime-3d9ebf213cf795958bca1c036002eb657d1a8366.tar.xz
latinime-3d9ebf213cf795958bca1c036002eb657d1a8366.zip
Merge "Make intents unique to AOSP"
Diffstat (limited to 'java/src/com/android/inputmethod/dictionarypack/DictionaryService.java')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/DictionaryService.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java b/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
index 46bb5543a..6e3dd7109 100644
--- a/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
+++ b/java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
@@ -54,12 +54,7 @@ public final class DictionaryService extends Service {
/**
* The package name, to use in the intent actions.
*/
- private static final String PACKAGE_NAME = "com.android.android.inputmethod.latin";
-
- /**
- * The action of the intent to tell the dictionary provider to update now.
- */
- private static final String UPDATE_NOW_INTENT_ACTION = PACKAGE_NAME + ".UPDATE_NOW";
+ private static final String PACKAGE_NAME = "com.android.inputmethod.latin";
/**
* The action of the date changing, used to schedule a periodic freshness check
@@ -173,7 +168,7 @@ public final class DictionaryService extends Service {
// at midnight local time, but it may happen if the user changes the date
// by hand or something similar happens.
checkTimeAndMaybeSetupUpdateAlarm(context);
- } else if (UPDATE_NOW_INTENT_ACTION.equals(intent.getAction())) {
+ } else if (DictionaryPackConstants.UPDATE_NOW_INTENT_ACTION.equals(intent.getAction())) {
// Intent to trigger an update now.
UpdateHandler.update(context, false);
} else {
@@ -196,7 +191,7 @@ public final class DictionaryService extends Service {
// It doesn't matter too much if this is very inexact.
final long now = System.currentTimeMillis();
final long alarmTime = now + new Random().nextInt(MAX_ALARM_DELAY);
- final Intent updateIntent = new Intent(DictionaryService.UPDATE_NOW_INTENT_ACTION);
+ final Intent updateIntent = new Intent(DictionaryPackConstants.UPDATE_NOW_INTENT_ACTION);
final PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0,
updateIntent, PendingIntent.FLAG_CANCEL_CURRENT);