mirror of https://github.com/M66B/NetGuard.git
Fixed unintentional vibrates
This commit is contained in:
parent
4d2fd917bf
commit
f92994e4f4
|
@ -62,9 +62,11 @@ public class Widget extends AppWidgetProvider {
|
|||
am.cancel(pi);
|
||||
|
||||
// Vibrate
|
||||
Vibrator vs = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (vs.hasVibrator())
|
||||
vs.vibrate(50);
|
||||
if (INTENT_OFF.equals(intent.getAction()) || INTENT_ON.equals(intent.getAction())) {
|
||||
Vibrator vs = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (vs.hasVibrator())
|
||||
vs.vibrate(50);
|
||||
}
|
||||
|
||||
if (INTENT_OFF.equals(intent.getAction())) {
|
||||
prefs.edit().putBoolean("enabled", false).apply();
|
||||
|
|
Loading…
Reference in New Issue