Loading services/core/java/com/android/server/VibratorService.java +12 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class VibratorService extends IVibratorService.Stub private final LinkedList<VibrationInfo> mPreviousRingVibrations; private final LinkedList<VibrationInfo> mPreviousNotificationVibrations; private final LinkedList<VibrationInfo> mPreviousAlarmVibrations; private final LinkedList<ExternalVibration> mPreviousExternalVibrations; private final LinkedList<VibrationInfo> mPreviousVibrations; private final int mPreviousVibrationsLimit; private final boolean mAllowPriorityVibrationsInLowPowerMode; Loading Loading @@ -368,6 +369,7 @@ public class VibratorService extends IVibratorService.Stub mPreviousNotificationVibrations = new LinkedList<>(); mPreviousAlarmVibrations = new LinkedList<>(); mPreviousVibrations = new LinkedList<>(); mPreviousExternalVibrations = new LinkedList<>(); IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_OFF); Loading Loading @@ -1418,6 +1420,12 @@ public class VibratorService extends IVibratorService.Stub pw.print(" "); pw.println(info.toString()); } pw.println(" Previous external vibrations:"); for (ExternalVibration vib : mPreviousExternalVibrations) { pw.print(" "); pw.println(vib.toString()); } } } Loading Loading @@ -1462,6 +1470,10 @@ public class VibratorService extends IVibratorService.Stub // Note that this doesn't support multiple concurrent external controls, as we // would need to mute the old one still if it came from a different controller. mCurrentExternalVibration = vib; if (mPreviousExternalVibrations.size() > mPreviousVibrationsLimit) { mPreviousExternalVibrations.removeFirst(); } mPreviousExternalVibrations.addLast(vib); if (DEBUG) { Slog.e(TAG, "Playing external vibration: " + vib); } Loading Loading
services/core/java/com/android/server/VibratorService.java +12 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class VibratorService extends IVibratorService.Stub private final LinkedList<VibrationInfo> mPreviousRingVibrations; private final LinkedList<VibrationInfo> mPreviousNotificationVibrations; private final LinkedList<VibrationInfo> mPreviousAlarmVibrations; private final LinkedList<ExternalVibration> mPreviousExternalVibrations; private final LinkedList<VibrationInfo> mPreviousVibrations; private final int mPreviousVibrationsLimit; private final boolean mAllowPriorityVibrationsInLowPowerMode; Loading Loading @@ -368,6 +369,7 @@ public class VibratorService extends IVibratorService.Stub mPreviousNotificationVibrations = new LinkedList<>(); mPreviousAlarmVibrations = new LinkedList<>(); mPreviousVibrations = new LinkedList<>(); mPreviousExternalVibrations = new LinkedList<>(); IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_OFF); Loading Loading @@ -1418,6 +1420,12 @@ public class VibratorService extends IVibratorService.Stub pw.print(" "); pw.println(info.toString()); } pw.println(" Previous external vibrations:"); for (ExternalVibration vib : mPreviousExternalVibrations) { pw.print(" "); pw.println(vib.toString()); } } } Loading Loading @@ -1462,6 +1470,10 @@ public class VibratorService extends IVibratorService.Stub // Note that this doesn't support multiple concurrent external controls, as we // would need to mute the old one still if it came from a different controller. mCurrentExternalVibration = vib; if (mPreviousExternalVibrations.size() > mPreviousVibrationsLimit) { mPreviousExternalVibrations.removeFirst(); } mPreviousExternalVibrations.addLast(vib); if (DEBUG) { Slog.e(TAG, "Playing external vibration: " + vib); } Loading