Add debug code to spell checker settings

Change-Id: Iab3bee33e4d6bd19c30e20591d6a2f08e1cff157
This commit is contained in:
satok
2011-08-26 17:36:47 +09:00
parent e36f1c581b
commit ef283b41b0
2 changed files with 16 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import android.content.res.Resources;
import android.preference.Preference;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.textservice.SpellCheckerInfo;
@@ -36,6 +37,8 @@ import android.widget.TextView;
public class SingleSpellCheckerPreference extends Preference {
private static final float DISABLED_ALPHA = 0.4f;
private static final String TAG = SingleSpellCheckerPreference.class.getSimpleName();
private static final boolean DBG = false;
private final SpellCheckerInfo mSpellCheckerInfo;
@@ -157,6 +160,11 @@ public class SingleSpellCheckerPreference extends Preference {
} else {
mTsm.setSpellCheckerSubtype(mSpellCheckerInfo.getSubtypeAt(which - 1));
}
if (DBG) {
final SpellCheckerSubtype subtype = mTsm.getCurrentSpellCheckerSubtype(true);
Log.d(TAG, "Current spell check locale is "
+ subtype == null ? "null" : subtype.getLocale());
}
dialog.dismiss();
}
});