Removed haptic feedback

pull/145/head
M66B 7 years ago
parent 29702304d9
commit ef621f3481

@ -538,8 +538,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
}
private void onExpandMessage(int pos, EntityMessage message) {
Helper.hapticFeedback(itemView);
if (expanded.get(message.id) == null)
expanded.put(message.id, true);
else

@ -195,8 +195,6 @@ public class FragmentCompose extends FragmentEx {
public void onFocusChange(View view, boolean hasFocus) {
free = hasFocus;
Helper.hapticFeedback(view);
getActivity().invalidateOptionsMenu();
grpHeader.setVisibility(hasFocus ? View.GONE : View.VISIBLE);

@ -352,8 +352,6 @@ public class FragmentMessage extends FragmentEx {
public void onClick(View view) {
free = true;
Helper.hapticFeedback(view);
getActivity().invalidateOptionsMenu();
grpHeader.setVisibility(View.GONE);

@ -379,7 +379,6 @@ public class FragmentMessages extends FragmentEx {
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.hapticFeedback(view);
startActivity(new Intent(getContext(), ActivityCompose.class)
.putExtra("action", "new")
.putExtra("account", (Long) fab.getTag())

@ -37,7 +37,6 @@ public class FragmentOptions extends FragmentEx {
private CheckBox cbLight;
private CheckBox cbBrowse;
private CheckBox cbSwipe;
private CheckBox cbHaptic;
private CheckBox cbDebug;
@Override
@ -53,7 +52,6 @@ public class FragmentOptions extends FragmentEx {
cbLight = view.findViewById(R.id.cbLight);
cbBrowse = view.findViewById(R.id.cbBrowse);
cbSwipe = view.findViewById(R.id.cbSwipe);
cbHaptic = view.findViewById(R.id.cbHaptic);
cbDebug = view.findViewById(R.id.cbDebug);
// Wire controls
@ -104,14 +102,6 @@ public class FragmentOptions extends FragmentEx {
}
});
cbHaptic.setChecked(prefs.getBoolean("haptic", true));
cbHaptic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("haptic", checked).apply();
}
});
cbDebug.setChecked(prefs.getBoolean("debug", false));
cbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override

@ -23,7 +23,6 @@ import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.TypedArray;
@ -32,7 +31,6 @@ import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
@ -84,12 +82,6 @@ public class Helper {
}
};
static void hapticFeedback(View view) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(view.getContext());
if (prefs.getBoolean("haptic", true))
view.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
}
static void view(Context context, Intent intent) {
Uri uri = intent.getData();
if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme()))

@ -61,16 +61,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbBrowse" />
<CheckBox
android:id="@+id/cbHaptic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_haptic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbSwipe" />
<CheckBox
android:id="@+id/cbDebug"
android:layout_width="wrap_content"
@ -79,6 +69,6 @@
android:layout_marginTop="12dp"
android:text="@string/title_advanced_debug"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbHaptic" />
app:layout_constraintTop_toBottomOf="@id/cbSwipe" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

@ -84,7 +84,6 @@
<string name="title_advanced_light">Use notification light</string>
<string name="title_advanced_browse">Browse messages on the server</string>
<string name="title_advanced_swipe">Swipe actions</string>
<string name="title_advanced_haptic">Haptic feedback</string>
<string name="title_advanced_debug">Debug mode</string>
<string name="title_select">Select &#8230;</string>

Loading…
Cancel
Save