Using SystemVibrator in the cases other than Ringer.java
In ICS, Phone app was creating separate Vibrator instances in
Ringer.java and CallNotifier.java, while in Jellybean they started
relying on one single Vibrator Service.
See also Id928ffef9a87e2563198240e91184cf59ecebbb1.
It means vibrate()/cancel() calls from two files interfere with each
other. When "Emergency tone" is set to "Vibrate" in Sound Setting
(which is only available with CDMA devices), this causes unexpected
trouble; the "Emergency tone" vibration is canceled immediately by
Ringer's Vibrator#cancel() call. onPhoneStateChanged() is indirectly
calling the method.
This change stops using the Vibrator Service in the emergency vibration
case, so that two Vibrator objects won't interfere with each other.
TESTED (use CDMA phone):
- Set "Emergency tone" to "Vibrate", and make a phone call to "911"
-> The device should vibrate for hundreds of mills (even without a
fix, it may vibrate for an instant, so need to check how long)
3 files changed