Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be108573 authored by Wilson Wu's avatar Wilson Wu Committed by Android (Google) Code Review
Browse files

Merge "Fix non-ime apps use keyboard category" into main

parents f1b65f66 5b487b9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 always, String reason, boolean fromIme);
}
+3 −2
Original line number Diff line number Diff line
@@ -206,12 +206,13 @@ public class SystemVibrator extends Vibrator {
    }

    @Override
    public void performHapticFeedback(int constant, boolean always, String reason) {
    public void performHapticFeedback(
            int constant, boolean always, String reason, boolean fromIme) {
        if (mVibratorManager == null) {
            Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager.");
            return;
        }
        mVibratorManager.performHapticFeedback(constant, always, reason);
        mVibratorManager.performHapticFeedback(constant, always, reason, fromIme);
    }

    @Override
+6 −4
Original line number Diff line number Diff line
@@ -147,14 +147,15 @@ public class SystemVibratorManager extends VibratorManager {
    }

    @Override
    public void performHapticFeedback(int constant, boolean always, String reason) {
    public void performHapticFeedback(int constant, boolean always, String reason,
            boolean fromIme) {
        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);
                    mUid, mContext.getDeviceId(), mPackageName, constant, always, reason, fromIme);
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to perform haptic feedback.", e);
        }
@@ -244,8 +245,9 @@ public class SystemVibratorManager extends VibratorManager {
        }

        @Override
        public void performHapticFeedback(int effectId, boolean always, String reason) {
            SystemVibratorManager.this.performHapticFeedback(effectId, always, reason);
        public void performHapticFeedback(int effectId, boolean always, String reason,
                boolean fromIme) {
            SystemVibratorManager.this.performHapticFeedback(effectId, always, reason, fromIme);
        }

        @Override
+3 −1
Original line number Diff line number Diff line
@@ -534,10 +534,12 @@ public abstract class Vibrator {
     *          {@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.
     *
     * @hide
     */
    public void performHapticFeedback(int constant, boolean always, String reason) {
    public void performHapticFeedback(int constant, boolean always, String reason,
            boolean fromIme) {
        Log.w(TAG, "performHapticFeedback is not supported");
    }

+3 −1
Original line number Diff line number Diff line
@@ -146,9 +146,11 @@ public abstract class VibratorManager {
     *          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.
     * @hide
     */
    public void performHapticFeedback(int constant, boolean always, String reason) {
    public void performHapticFeedback(int constant, boolean always, String reason,
            boolean fromIme) {
        Log.w(TAG, "performHapticFeedback is not supported");
    }

Loading