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

Commit f7e01a4a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add API for querying haptic playback support."

parents 678b7039 66f9e72e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -23060,6 +23060,7 @@ package android.media {
    method public deprecated boolean isBluetoothA2dpOn();
    method public deprecated boolean isBluetoothA2dpOn();
    method public boolean isBluetoothScoAvailableOffCall();
    method public boolean isBluetoothScoAvailableOffCall();
    method public boolean isBluetoothScoOn();
    method public boolean isBluetoothScoOn();
    method public static boolean isHapticPlaybackSupported();
    method public boolean isMicrophoneMute();
    method public boolean isMicrophoneMute();
    method public boolean isMusicActive();
    method public boolean isMusicActive();
    method public static boolean isOffloadedPlaybackSupported(android.media.AudioFormat);
    method public static boolean isOffloadedPlaybackSupported(android.media.AudioFormat);
+7 −0
Original line number Original line Diff line number Diff line
@@ -2061,6 +2061,12 @@ android_media_AudioSystem_setA11yServicesUids(JNIEnv *env, jobject thiz, jintArr
    return (jint)nativeToJavaStatus(status);
    return (jint)nativeToJavaStatus(status);
}
}


static jboolean
android_media_AudioSystem_isHapticPlaybackSupported(JNIEnv *env, jobject thiz)
{
    return AudioSystem::isHapticPlaybackSupported();
}

// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------


static const JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
@@ -2123,6 +2129,7 @@ static const JNINativeMethod gMethods[] = {
    {"setSurroundFormatEnabled", "(IZ)I", (void *)android_media_AudioSystem_setSurroundFormatEnabled},
    {"setSurroundFormatEnabled", "(IZ)I", (void *)android_media_AudioSystem_setSurroundFormatEnabled},
    {"setAssistantUid", "(I)I", (void *)android_media_AudioSystem_setAssistantUid},
    {"setAssistantUid", "(I)I", (void *)android_media_AudioSystem_setAssistantUid},
    {"setA11yServicesUids", "([I)I", (void *)android_media_AudioSystem_setA11yServicesUids},
    {"setA11yServicesUids", "([I)I", (void *)android_media_AudioSystem_setA11yServicesUids},
    {"isHapticPlaybackSupported", "()Z", (void *)android_media_AudioSystem_isHapticPlaybackSupported},
};
};


static const JNINativeMethod gEventHandlerMethods[] = {
static const JNINativeMethod gEventHandlerMethods[] = {
+9 −0
Original line number Original line Diff line number Diff line
@@ -5152,6 +5152,15 @@ public class AudioManager {
        return reportedSurroundFormats;
        return reportedSurroundFormats;
    }
    }


    /**
     * Return if audio haptic coupled playback is supported or not.
     *
     * @return whether audio haptic playback supported.
     */
    public static boolean isHapticPlaybackSupported() {
        return AudioSystem.isHapticPlaybackSupported();
    }



    //---------------------------------------------------------
    //---------------------------------------------------------
    // Inner classes
    // Inner classes
+5 −0
Original line number Original line Diff line number Diff line
@@ -933,6 +933,11 @@ public class AudioSystem
     */
     */
    public static native int setA11yServicesUids(int[] uids);
    public static native int setA11yServicesUids(int[] uids);


    /**
     * @see AudioManager#isHapticPlaybackSupported()
     */
    public static native boolean isHapticPlaybackSupported();

    // Items shared with audio service
    // Items shared with audio service


    /**
    /**