Loading core/java/android/os/IVibratorManagerService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -41,5 +41,5 @@ interface IVibratorManagerService { // There is no order guarantee with respect to the two-way APIs above like // vibrate/isVibrating/cancel. oneway void performHapticFeedback(int uid, int deviceId, String opPkg, int constant, boolean always, String reason, boolean fromIme); String reason, int flags, int privFlags); } core/java/android/os/SystemVibrator.java +2 −3 Original line number Diff line number Diff line Loading @@ -206,13 +206,12 @@ public class SystemVibrator extends Vibrator { } @Override public void performHapticFeedback( int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, int flags, int privFlags) { if (mVibratorManager == null) { Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager."); return; } mVibratorManager.performHapticFeedback(constant, always, reason, fromIme); mVibratorManager.performHapticFeedback(constant, reason, flags, privFlags); } @Override Loading core/java/android/os/SystemVibratorManager.java +5 −7 Original line number Diff line number Diff line Loading @@ -147,15 +147,14 @@ public class SystemVibratorManager extends VibratorManager { } @Override public void performHapticFeedback(int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, int flags, int privFlags) { if (mService == null) { Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager service."); return; } try { mService.performHapticFeedback( mUid, mContext.getDeviceId(), mPackageName, constant, always, reason, fromIme); mService.performHapticFeedback(mUid, mContext.getDeviceId(), mPackageName, constant, reason, flags, privFlags); } catch (RemoteException e) { Log.w(TAG, "Failed to perform haptic feedback.", e); } Loading Loading @@ -245,9 +244,8 @@ public class SystemVibratorManager extends VibratorManager { } @Override public void performHapticFeedback(int effectId, boolean always, String reason, boolean fromIme) { SystemVibratorManager.this.performHapticFeedback(effectId, always, reason, fromIme); public void performHapticFeedback(int effectId, String reason, int flags, int privFlags) { SystemVibratorManager.this.performHapticFeedback(effectId, reason, flags, privFlags); } @Override Loading core/java/android/os/Vibrator.java +6 −7 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.media.AudioAttributes; import android.os.vibrator.VibrationConfig; import android.os.vibrator.VibratorFrequencyProfile; import android.util.Log; import android.view.HapticFeedbackConstants; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -519,17 +520,15 @@ public abstract class Vibrator { * * @param constant the ID for the haptic feedback. This should be one of the constants defined * in {@link HapticFeedbackConstants}. * @param always {@code true} if the haptic feedback should be played regardless of the user * vibration intensity settings applicable to the corresponding vibration. * {@code false} if the vibration for the haptic feedback should respect the applicable * vibration intensity settings. * @param reason the reason for this haptic feedback. * @param fromIme the haptic feedback is performed from an IME. * @param flags Additional flags as per {@link HapticFeedbackConstants}. * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}. * * @hide */ public void performHapticFeedback(int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, @HapticFeedbackConstants.Flags int flags, @HapticFeedbackConstants.PrivateFlags int privFlags) { Log.w(TAG, "performHapticFeedback is not supported"); } Loading core/java/android/os/VibratorManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.SystemService; import android.app.ActivityThread; import android.content.Context; import android.util.Log; import android.view.HapticFeedbackConstants; /** * Provides access to all vibrators from the device, as well as the ability to run them Loading Loading @@ -142,15 +143,14 @@ public abstract class VibratorManager { * * @param constant the ID of the requested haptic feedback. Should be one of the constants * defined in {@link HapticFeedbackConstants}. * @param always {@code true} if the haptic feedback should be played regardless of the user * vibration intensity settings applicable to the corresponding vibration. * {@code false} otherwise. * @param reason the reason for this haptic feedback. * @param fromIme the haptic feedback is performed from an IME. * @param flags Additional flags as per {@link HapticFeedbackConstants}. * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}. * @hide */ public void performHapticFeedback(int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, @HapticFeedbackConstants.Flags int flags, @HapticFeedbackConstants.PrivateFlags int privFlags) { Log.w(TAG, "performHapticFeedback is not supported"); } Loading Loading
core/java/android/os/IVibratorManagerService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -41,5 +41,5 @@ interface IVibratorManagerService { // There is no order guarantee with respect to the two-way APIs above like // vibrate/isVibrating/cancel. oneway void performHapticFeedback(int uid, int deviceId, String opPkg, int constant, boolean always, String reason, boolean fromIme); String reason, int flags, int privFlags); }
core/java/android/os/SystemVibrator.java +2 −3 Original line number Diff line number Diff line Loading @@ -206,13 +206,12 @@ public class SystemVibrator extends Vibrator { } @Override public void performHapticFeedback( int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, int flags, int privFlags) { if (mVibratorManager == null) { Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager."); return; } mVibratorManager.performHapticFeedback(constant, always, reason, fromIme); mVibratorManager.performHapticFeedback(constant, reason, flags, privFlags); } @Override Loading
core/java/android/os/SystemVibratorManager.java +5 −7 Original line number Diff line number Diff line Loading @@ -147,15 +147,14 @@ public class SystemVibratorManager extends VibratorManager { } @Override public void performHapticFeedback(int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, int flags, int privFlags) { if (mService == null) { Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager service."); return; } try { mService.performHapticFeedback( mUid, mContext.getDeviceId(), mPackageName, constant, always, reason, fromIme); mService.performHapticFeedback(mUid, mContext.getDeviceId(), mPackageName, constant, reason, flags, privFlags); } catch (RemoteException e) { Log.w(TAG, "Failed to perform haptic feedback.", e); } Loading Loading @@ -245,9 +244,8 @@ public class SystemVibratorManager extends VibratorManager { } @Override public void performHapticFeedback(int effectId, boolean always, String reason, boolean fromIme) { SystemVibratorManager.this.performHapticFeedback(effectId, always, reason, fromIme); public void performHapticFeedback(int effectId, String reason, int flags, int privFlags) { SystemVibratorManager.this.performHapticFeedback(effectId, reason, flags, privFlags); } @Override Loading
core/java/android/os/Vibrator.java +6 −7 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.media.AudioAttributes; import android.os.vibrator.VibrationConfig; import android.os.vibrator.VibratorFrequencyProfile; import android.util.Log; import android.view.HapticFeedbackConstants; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -519,17 +520,15 @@ public abstract class Vibrator { * * @param constant the ID for the haptic feedback. This should be one of the constants defined * in {@link HapticFeedbackConstants}. * @param always {@code true} if the haptic feedback should be played regardless of the user * vibration intensity settings applicable to the corresponding vibration. * {@code false} if the vibration for the haptic feedback should respect the applicable * vibration intensity settings. * @param reason the reason for this haptic feedback. * @param fromIme the haptic feedback is performed from an IME. * @param flags Additional flags as per {@link HapticFeedbackConstants}. * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}. * * @hide */ public void performHapticFeedback(int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, @HapticFeedbackConstants.Flags int flags, @HapticFeedbackConstants.PrivateFlags int privFlags) { Log.w(TAG, "performHapticFeedback is not supported"); } Loading
core/java/android/os/VibratorManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.SystemService; import android.app.ActivityThread; import android.content.Context; import android.util.Log; import android.view.HapticFeedbackConstants; /** * Provides access to all vibrators from the device, as well as the ability to run them Loading Loading @@ -142,15 +143,14 @@ public abstract class VibratorManager { * * @param constant the ID of the requested haptic feedback. Should be one of the constants * defined in {@link HapticFeedbackConstants}. * @param always {@code true} if the haptic feedback should be played regardless of the user * vibration intensity settings applicable to the corresponding vibration. * {@code false} otherwise. * @param reason the reason for this haptic feedback. * @param fromIme the haptic feedback is performed from an IME. * @param flags Additional flags as per {@link HapticFeedbackConstants}. * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}. * @hide */ public void performHapticFeedback(int constant, boolean always, String reason, boolean fromIme) { public void performHapticFeedback(int constant, String reason, @HapticFeedbackConstants.Flags int flags, @HapticFeedbackConstants.PrivateFlags int privFlags) { Log.w(TAG, "performHapticFeedback is not supported"); } Loading