aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-02-19 01:49:29 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-19 01:49:29 -0800
commit433651a228fcb0cb3a517efe024d978e7f1eb0ce (patch)
tree12c10803f08ce6510c39beb35e481f357b3ba32f /java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
parenta58431003c99f9f592a50a4d7eac13f5ad7a6698 (diff)
parented616083dda090775c6d17ca073ccb80aaa1c4bd (diff)
downloadlatinime-433651a228fcb0cb3a517efe024d978e7f1eb0ce.tar.gz
latinime-433651a228fcb0cb3a517efe024d978e7f1eb0ce.tar.xz
latinime-433651a228fcb0cb3a517efe024d978e7f1eb0ce.zip
am ed616083: Merge "Turn personalization on when important notice dialog is displayed"
* commit 'ed616083dda090775c6d17ca073ccb80aaa1c4bd': Turn personalization on when important notice dialog is displayed
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java')
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index 1f80c4cca..2966a8bba 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.support.v4.view.ViewCompat;
+import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.GestureDetector;
@@ -236,7 +237,12 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
if (width <= 0) {
return false;
}
- mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, width);
+ final String importantNoticeTitle = ImportantNoticeUtils.getImportantNoticeTitle(
+ getContext());
+ if (TextUtils.isEmpty(importantNoticeTitle)) {
+ return false;
+ }
+ mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, width, importantNoticeTitle);
mStripVisibilityGroup.showImportantNoticeStrip();
mImportantNoticeStrip.setOnClickListener(this);
return true;