Merge "Adjust a test for a new default setting"
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 804ccf6..2d587ad 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -713,9 +713,9 @@
         final int keyWidth = key.mWidth - key.mVisualInsetsLeft - key.mVisualInsetsRight;
         final int keyHeight = key.mHeight;
 
+        paint.setTypeface(params.mKeyTextStyle);
         paint.setTextSize(params.mKeyHintLetterSize);
         paint.setColor(params.mKeyHintLabelColor);
-        params.blendAlpha(paint);
         paint.setTextAlign(Align.CENTER);
         final float hintX = keyWidth - params.mKeyHintLetterPadding
                 - getCharWidth(KEY_LABEL_REFERENCE_CHAR, paint) / 2;
diff --git a/java/src/com/android/inputmethod/latin/SettingsActivity.java b/java/src/com/android/inputmethod/latin/SettingsActivity.java
index b85a936..5567013 100644
--- a/java/src/com/android/inputmethod/latin/SettingsActivity.java
+++ b/java/src/com/android/inputmethod/latin/SettingsActivity.java
@@ -17,7 +17,6 @@
 package com.android.inputmethod.latin;
 
 import android.content.Intent;
-import android.os.Bundle;
 import android.preference.PreferenceActivity;
 
 public class SettingsActivity extends PreferenceActivity {
@@ -25,12 +24,7 @@
     public Intent getIntent() {
         final Intent modIntent = new Intent(super.getIntent());
         modIntent.putExtra(EXTRA_SHOW_FRAGMENT, Settings.class.getName());
+        modIntent.putExtra(EXTRA_NO_HEADERS, true);
         return modIntent;
     }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setTitle(R.string.english_ime_settings);
-    }
 }
diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java
index 0485c88..036ff74 100644
--- a/java/src/com/android/inputmethod/latin/Utils.java
+++ b/java/src/com/android/inputmethod/latin/Utils.java
@@ -466,11 +466,12 @@
     }
 
     private static final String HARDWARE_PREFIX = Build.HARDWARE + ",";
-    private static final HashMap<Integer, String> sDeviceOverrideValueMap =
-            new HashMap<Integer, String>();
+    private static final HashMap<String, String> sDeviceOverrideValueMap =
+            new HashMap<String, String>();
 
     public static String getDeviceOverrideValue(Resources res, int overrideResId, String defValue) {
-        final Integer key = overrideResId;
+        final int orientation = res.getConfiguration().orientation;
+        final String key = overrideResId + "-" + orientation;
         if (!sDeviceOverrideValueMap.containsKey(key)) {
             String overrideValue = defValue;
             for (final String element : res.getStringArray(overrideResId)) {
diff --git a/native/jni/src/words_priority_queue_pool.h b/native/jni/src/words_priority_queue_pool.h
index 5b50e8f..210b5a8 100644
--- a/native/jni/src/words_priority_queue_pool.h
+++ b/native/jni/src/words_priority_queue_pool.h
@@ -26,6 +26,7 @@
 class WordsPriorityQueuePool {
  public:
     WordsPriorityQueuePool(int mainQueueMaxWords, int subQueueMaxWords, int maxWordLength) {
+        // Note: using placement new() requires the caller to call the destructor explicitly.
         mMasterQueue = new(mMasterQueueBuf) WordsPriorityQueue(mainQueueMaxWords, maxWordLength);
         for (int i = 0, subQueueBufOffset = 0;
                 i < MULTIPLE_WORDS_SUGGESTION_MAX_WORDS * SUB_QUEUE_MAX_COUNT;
@@ -36,6 +37,11 @@
     }
 
     virtual ~WordsPriorityQueuePool() {
+        // Note: these explicit calls to the destructor match the calls to placement new() above.
+        if (mMasterQueue) mMasterQueue->~WordsPriorityQueue();
+        for (int i = 0; i < MULTIPLE_WORDS_SUGGESTION_MAX_WORDS * SUB_QUEUE_MAX_COUNT; ++i) {
+            if (mSubQueues[i]) mSubQueues[i]->~WordsPriorityQueue();
+        }
     }
 
     WordsPriorityQueue* getMasterQueue() {