diff options
author | 2014-09-26 12:10:59 +0900 | |
---|---|---|
committer | 2014-09-26 12:16:54 +0900 | |
commit | 90058c3d1f09e37a74bf6f44d9ebd314be3e680b (patch) | |
tree | b914ab36d743b76da3f1d539d181e4d6ddc4c707 /java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java | |
parent | dd052f006b9b22097aa4fa27854bd2ecc62f82cf (diff) | |
download | latinime-90058c3d1f09e37a74bf6f44d9ebd314be3e680b.tar.gz latinime-90058c3d1f09e37a74bf6f44d9ebd314be3e680b.tar.xz latinime-90058c3d1f09e37a74bf6f44d9ebd314be3e680b.zip |
Add an internal state test to ImportantNoticeUtilsTests
On some 32bit-x86 testing emulators, it seems the internal state after
clear the related settings seems like a contradiction state. This CL
adds an test to check such internal state in order to investigate what
is happening on these emulators.
Bug: 17635340
Change-Id: Iba85f06c46959b1dc22e2a9213c50c9e7e30949b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java index ea406fa75..142548b25 100644 --- a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java @@ -53,7 +53,8 @@ public final class ImportantNoticeUtils { // This utility class is not publicly instantiable. } - private static boolean isInSystemSetupWizard(final Context context) { + @UsedForTesting + static boolean isInSystemSetupWizard(final Context context) { try { final int userSetupComplete = Settings.Secure.getInt( context.getContentResolver(), Settings_Secure_USER_SETUP_COMPLETE); @@ -84,7 +85,8 @@ public final class ImportantNoticeUtils { return getLastImportantNoticeVersion(context) + 1; } - private static boolean hasNewImportantNotice(final Context context) { + @UsedForTesting + static boolean hasNewImportantNotice(final Context context) { final int lastVersion = getLastImportantNoticeVersion(context); return getCurrentImportantNoticeVersion(context) > lastVersion; } |