diff options
author | Danny Baumann <dannybaumann@web.de> | 2016-09-09 10:01:27 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-12 01:23:35 +0200 |
commit | 7c55bb44f944ea55652e95048afd738b9ff51b53 (patch) | |
tree | e98462371a27ca8b12a6b3a560086e7ec9f1bf57 /java/com/android/incallui/InCallPresenter.java | |
parent | 491fb7a630f69e8d75b4276cf912d46953f573c6 (diff) |
Add back in-call vibration features
Change-Id: Ia30a3c46e9c37d7d73288ec605af8efc3a46a323
Diffstat (limited to 'java/com/android/incallui/InCallPresenter.java')
-rw-r--r-- | java/com/android/incallui/InCallPresenter.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index 17af75691..1bb606ea0 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -127,6 +127,7 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud private StatusBarNotifier statusBarNotifier; private ExternalCallNotifier externalCallNotifier; + private InCallVibrationHandler vibrationHandler; private ContactInfoCache contactInfoCache; private Context context; private final OnCheckBlockedListener onCheckBlockedListener = @@ -364,6 +365,9 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud .getEnrichedCallManager() .registerStateChangedListener(this.statusBarNotifier); + vibrationHandler = new InCallVibrationHandler(context); + addListener(vibrationHandler); + this.proximitySensor = proximitySensor; addListener(this.proximitySensor); @@ -1653,6 +1657,11 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud } statusBarNotifier = null; + if (vibrationHandler != null) { + removeListener(vibrationHandler); + } + vibrationHandler = null; + if (callList != null) { callList.removeListener(this); callList.removeListener(spamCallListListener); |