Suggestion strip will honor haptic feedback settings of keyboard

Bug: 7313372
Change-Id: I427da8de68be3d2a78e810556340b96ab4edcc2d
main
Tadashi G. Takaoka 2012-10-15 13:59:35 -07:00
parent 8e360c68f1
commit 5faf419519
2 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,8 @@
*/ */
--> -->
<!-- Provide a haptic feedback by ourselves based on the keyboard settings.
We just need to ignore the system's haptic feedback settings. -->
<TextView <TextView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -29,6 +31,7 @@
android:paddingTop="0dp" android:paddingTop="0dp"
android:paddingRight="@dimen/suggestion_padding" android:paddingRight="@dimen/suggestion_padding"
android:paddingBottom="0dp" android:paddingBottom="0dp"
android:hapticFeedbackEnabled="false"
android:focusable="false" android:focusable="false"
android:clickable="false" android:clickable="false"
android:singleLine="true" android:singleLine="true"

View File

@ -61,6 +61,7 @@ import com.android.inputmethod.keyboard.PointerTracker;
import com.android.inputmethod.keyboard.ViewLayoutUtils; import com.android.inputmethod.keyboard.ViewLayoutUtils;
import com.android.inputmethod.latin.AutoCorrection; import com.android.inputmethod.latin.AutoCorrection;
import com.android.inputmethod.latin.CollectionUtils; import com.android.inputmethod.latin.CollectionUtils;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.ResourceUtils; import com.android.inputmethod.latin.ResourceUtils;
@ -752,6 +753,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
@Override @Override
public boolean onLongClick(final View view) { public boolean onLongClick(final View view) {
KeyboardSwitcher.getInstance().hapticAndAudioFeedback(Constants.NOT_A_CODE);
return showMoreSuggestions(); return showMoreSuggestions();
} }