Merge pull request #56 from AdrianLxM/hapticFeedback

Haptic feedback
This commit is contained in:
Milos Kozak 2016-11-10 10:02:26 +01:00 committed by GitHub
commit 770f44118b
2 changed files with 3 additions and 0 deletions

View file

@ -13,6 +13,7 @@
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.SEND_MMS" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- To receive data from xdrip. -->
<uses-permission android:name="com.eveningoutpost.dexdrip.permissions.RECEIVE_BG_ESTIMATE" />

View file

@ -12,6 +12,7 @@ import android.os.HandlerThread;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AlertDialog;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -421,6 +422,7 @@ public class OverviewFragment extends Fragment {
apsModeView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
if (activeloop == null){
log.error("no active loop?");
return true;