Remove a slew of Eclipse warnings.
Change-Id: I03236386aea13fbd4fb8eaeee18e0008aa136502
This commit is contained in:
parent
ab96376c9e
commit
7214617622
10 changed files with 11 additions and 12 deletions
|
@ -873,6 +873,7 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
|
|||
keyPreview, ViewLayoutUtils.newLayoutParam(mPreviewPlacer, 0, 0));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // setBackgroundDrawable is replaced by setBackground in API16
|
||||
@Override
|
||||
public void showKeyPreview(PointerTracker tracker) {
|
||||
if (!mShowKeyPreviewPopup) return;
|
||||
|
|
|
@ -21,8 +21,6 @@ import android.util.Log;
|
|||
|
||||
import com.android.inputmethod.keyboard.Keyboard;
|
||||
import com.android.inputmethod.latin.Constants;
|
||||
import com.android.inputmethod.latin.ResearchLogger;
|
||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||
|
||||
/**
|
||||
* Keyboard state machine.
|
||||
|
|
|
@ -514,8 +514,10 @@ public class ExpandableDictionary extends Dictionary {
|
|||
|
||||
/**
|
||||
* Adds bigrams to the in-memory trie structure that is being used to retrieve any word
|
||||
* @param word1 the first word of this bigram
|
||||
* @param word2 the second word of this bigram
|
||||
* @param frequency frequency for this bigram
|
||||
* @param addFrequency if true, it adds to current frequency, else it overwrites the old value
|
||||
* @param fcp an instance of ForgettingCurveParams to use for decay policy
|
||||
* @return returns the final bigram frequency
|
||||
*/
|
||||
private int setBigramAndGetFrequency(
|
||||
|
|
|
@ -747,6 +747,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
if (TRACE) Debug.startMethodTracing("/data/trace/latinime");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTargetApplicationKnown(final ApplicationInfo info) {
|
||||
mTargetApplicationInfo = info;
|
||||
}
|
||||
|
|
|
@ -101,13 +101,13 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
|||
private static class NullOutputStream extends OutputStream {
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public void write(byte[] buffer, int offset, int count) throws IOException {
|
||||
public void write(byte[] buffer, int offset, int count) {
|
||||
// nop
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public void write(byte[] buffer) throws IOException {
|
||||
public void write(byte[] buffer) {
|
||||
// nop
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you call the constructor of this class, you may want to change the current system locale by
|
||||
|
|
|
@ -440,7 +440,7 @@ public class UserHistoryDictionary extends ExpandableDictionary {
|
|||
if (nw != null) {
|
||||
final ForgettingCurveParams fcp = nw.getFcParams();
|
||||
final byte prevFc = word1Bigrams.get(word2);
|
||||
final byte fc = (byte)fcp.getFc();
|
||||
final byte fc = fcp.getFc();
|
||||
final boolean isValid = fcp.isValid();
|
||||
if (prevFc > 0 && prevFc == fc) {
|
||||
// No need to update since we found no changes for this entry.
|
||||
|
|
|
@ -50,7 +50,7 @@ public class UserHistoryForgettingCurveUtils {
|
|||
}
|
||||
|
||||
private ForgettingCurveParams(long now, boolean isValid) {
|
||||
this((int)pushCount((byte)0, isValid), now, now, isValid);
|
||||
this(pushCount((byte)0, isValid), now, now, isValid);
|
||||
}
|
||||
|
||||
/** This constructor is called when the user history bigram dictionary is being restored. */
|
||||
|
@ -201,7 +201,7 @@ public class UserHistoryForgettingCurveUtils {
|
|||
for (int i = 0; i < FC_LEVEL_MAX; ++i) {
|
||||
final double initialFreq;
|
||||
if (i >= 2) {
|
||||
initialFreq = (double)FC_FREQ_MAX;
|
||||
initialFreq = FC_FREQ_MAX;
|
||||
} else if (i == 1) {
|
||||
initialFreq = (double)FC_FREQ_MAX / 2;
|
||||
} else if (i == 0) {
|
||||
|
|
|
@ -44,10 +44,8 @@ import java.io.IOException;
|
|||
import java.io.PrintWriter;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Utils {
|
||||
private Utils() {
|
||||
|
|
|
@ -788,7 +788,7 @@ public class BinaryDictInputOutput {
|
|||
// which is the best approximation. This is how we get the most precise result with
|
||||
// only four bits.
|
||||
final double stepSize =
|
||||
(double)(MAX_TERMINAL_FREQUENCY - unigramFrequency) / (1.5 + MAX_BIGRAM_FREQUENCY);
|
||||
(MAX_TERMINAL_FREQUENCY - unigramFrequency) / (1.5 + MAX_BIGRAM_FREQUENCY);
|
||||
final double firstStepStart = 1 + unigramFrequency + (stepSize / 2.0);
|
||||
final int discretizedFrequency = (int)((bigramFrequency - firstStepStart) / stepSize);
|
||||
// If the bigram freq is less than half-a-step higher than the unigram freq, we get -1
|
||||
|
|
Loading…
Reference in a new issue