Deallocate gesture trail bitmap when unneeded further
Follow up to I5bc980c4dc41bc304be3c190934c1f7c55c9d244 bug: 8967766 Change-Id: I7b916daa5269cfde359a77555e8ffadf0e4a8f92
This commit is contained in:
parent
5c057b3241
commit
724db04495
3 changed files with 14 additions and 10 deletions
|
@ -838,10 +838,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
mSlidingKeyInputPreview.dismissSlidingKeyInputPreview();
|
mSlidingKeyInputPreview.dismissSlidingKeyInputPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGesturePreviewMode(final boolean drawsGestureTrail,
|
private void setGesturePreviewMode(final boolean isGestureTrailEnabled,
|
||||||
final boolean drawsGestureFloatingPreviewText) {
|
final boolean isGestureFloatingPreviewTextEnabled) {
|
||||||
mGestureFloatingPreviewText.setPreviewEnabled(drawsGestureFloatingPreviewText);
|
mGestureFloatingPreviewText.setPreviewEnabled(isGestureFloatingPreviewTextEnabled);
|
||||||
mGestureTrailsPreview.setPreviewEnabled(drawsGestureTrail);
|
mGestureTrailsPreview.setPreviewEnabled(isGestureTrailEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showGestureFloatingPreviewText(final SuggestedWords suggestedWords) {
|
public void showGestureFloatingPreviewText(final SuggestedWords suggestedWords) {
|
||||||
|
@ -869,8 +869,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
PointerTracker.setMainDictionaryAvailability(mainDictionaryAvailable);
|
PointerTracker.setMainDictionaryAvailability(mainDictionaryAvailable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGestureHandlingEnabledByUser(final boolean gestureHandlingEnabledByUser) {
|
public void setGestureHandlingEnabledByUser(final boolean isGestureHandlingEnabledByUser,
|
||||||
PointerTracker.setGestureHandlingEnabledByUser(gestureHandlingEnabledByUser);
|
final boolean isGestureTrailEnabled,
|
||||||
|
final boolean isGestureFloatingPreviewTextEnabled) {
|
||||||
|
PointerTracker.setGestureHandlingEnabledByUser(isGestureHandlingEnabledByUser);
|
||||||
|
setGesturePreviewMode(isGestureHandlingEnabledByUser && isGestureTrailEnabled,
|
||||||
|
isGestureHandlingEnabledByUser && isGestureFloatingPreviewTextEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -846,8 +846,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
mainKeyboardView.setSlidingKeyInputPreviewEnabled(
|
mainKeyboardView.setSlidingKeyInputPreviewEnabled(
|
||||||
currentSettingsValues.mSlidingKeyInputPreviewEnabled);
|
currentSettingsValues.mSlidingKeyInputPreviewEnabled);
|
||||||
mainKeyboardView.setGestureHandlingEnabledByUser(
|
mainKeyboardView.setGestureHandlingEnabledByUser(
|
||||||
currentSettingsValues.mGestureInputEnabled);
|
currentSettingsValues.mGestureInputEnabled,
|
||||||
mainKeyboardView.setGesturePreviewMode(currentSettingsValues.mGesturePreviewTrailEnabled,
|
currentSettingsValues.mGestureTrailEnabled,
|
||||||
currentSettingsValues.mGestureFloatingPreviewTextEnabled);
|
currentSettingsValues.mGestureFloatingPreviewTextEnabled);
|
||||||
|
|
||||||
// If we have a user dictionary addition in progress, we should check now if we should
|
// If we have a user dictionary addition in progress, we should check now if we should
|
||||||
|
|
|
@ -71,7 +71,7 @@ public final class SettingsValues {
|
||||||
// Use bigrams to predict the next word when there is no input for it yet
|
// Use bigrams to predict the next word when there is no input for it yet
|
||||||
public final boolean mBigramPredictionEnabled;
|
public final boolean mBigramPredictionEnabled;
|
||||||
public final boolean mGestureInputEnabled;
|
public final boolean mGestureInputEnabled;
|
||||||
public final boolean mGesturePreviewTrailEnabled;
|
public final boolean mGestureTrailEnabled;
|
||||||
public final boolean mGestureFloatingPreviewTextEnabled;
|
public final boolean mGestureFloatingPreviewTextEnabled;
|
||||||
public final boolean mSlidingKeyInputPreviewEnabled;
|
public final boolean mSlidingKeyInputPreviewEnabled;
|
||||||
public final int mKeyLongpressTimeout;
|
public final int mKeyLongpressTimeout;
|
||||||
|
@ -157,7 +157,7 @@ public final class SettingsValues {
|
||||||
mVoiceKeyEnabled = mVoiceMode != null && !mVoiceMode.equals(voiceModeOff);
|
mVoiceKeyEnabled = mVoiceMode != null && !mVoiceMode.equals(voiceModeOff);
|
||||||
mVoiceKeyOnMain = mVoiceMode != null && mVoiceMode.equals(voiceModeMain);
|
mVoiceKeyOnMain = mVoiceMode != null && mVoiceMode.equals(voiceModeMain);
|
||||||
mGestureInputEnabled = Settings.readGestureInputEnabled(prefs, res);
|
mGestureInputEnabled = Settings.readGestureInputEnabled(prefs, res);
|
||||||
mGesturePreviewTrailEnabled = prefs.getBoolean(Settings.PREF_GESTURE_PREVIEW_TRAIL, true);
|
mGestureTrailEnabled = prefs.getBoolean(Settings.PREF_GESTURE_PREVIEW_TRAIL, true);
|
||||||
mGestureFloatingPreviewTextEnabled = prefs.getBoolean(
|
mGestureFloatingPreviewTextEnabled = prefs.getBoolean(
|
||||||
Settings.PREF_GESTURE_FLOATING_PREVIEW_TEXT, true);
|
Settings.PREF_GESTURE_FLOATING_PREVIEW_TEXT, true);
|
||||||
mCorrectionEnabled = mAutoCorrectEnabled && !mInputAttributes.mInputTypeNoAutoCorrect;
|
mCorrectionEnabled = mAutoCorrectEnabled && !mInputAttributes.mInputTypeNoAutoCorrect;
|
||||||
|
|
Loading…
Reference in a new issue