aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-12 16:52:44 +0900
committerJean Chalard <jchalard@google.com>2014-02-12 17:30:04 +0900
commit8adedbf47c7ac150d4ac7e6cdbee3ece38f346e7 (patch)
tree29ab0d1170949941020ba55ce13477e7556770b5 /java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
parent351c8e6185a3b301a7469358cc1df5d075fc1b01 (diff)
downloadlatinime-8adedbf47c7ac150d4ac7e6cdbee3ece38f346e7.tar.gz
latinime-8adedbf47c7ac150d4ac7e6cdbee3ece38f346e7.tar.xz
latinime-8adedbf47c7ac150d4ac7e6cdbee3ece38f346e7.zip
Show the suggestion strip for the important notice
Bug: 10587358 Change-Id: Ia060a9ca9dfc2e7fe0750536a9fea3b9cc5900c4
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
index 4a0823155..604c36488 100644
--- a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
@@ -42,7 +42,7 @@ public final class ImportantNoticeUtils {
// This utility class is not publicly instantiable.
}
- public static boolean isInSystemSetupWizard(final Context context) {
+ private static boolean isInSystemSetupWizard(final Context context) {
try {
final int userSetupComplete = Settings.Secure.getInt(
context.getContentResolver(), Settings_Secure_USER_SETUP_COMPLETE);
@@ -62,10 +62,11 @@ public final class ImportantNoticeUtils {
return context.getResources().getInteger(R.integer.config_important_notice_version);
}
- public static boolean hasNewImportantNotice(final Context context) {
+ public static boolean hasNewImportantNoticeAndNotInSetupWizard(final Context context) {
final SharedPreferences prefs = getImportantNoticePreferences(context);
final int lastVersion = prefs.getInt(KEY_IMPORTANT_NOTICE_VERSION, 0);
- return getCurrentImportantNoticeVersion(context) > lastVersion;
+ return getCurrentImportantNoticeVersion(context) > lastVersion
+ && !isInSystemSetupWizard(context);
}
public static void updateLastImportantNoticeVersion(final Context context) {