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

Commit 07b138b1 authored by More Kuo's avatar More Kuo Committed by Gerrit Code Review
Browse files

Merge "Rename for updating BluetoothA2dp API naming"

parents f779b505 2e807440
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1262,8 +1262,8 @@ static jbyteArray obfuscateAddressNative(JNIEnv* env, jobject obj,
  return output_bytes;
}

static jboolean setBufferMillisNative(JNIEnv* env, jobject obj, jint codec,
                                      jint size) {
static jboolean setBufferLengthMillisNative(JNIEnv* env, jobject obj,
                                            jint codec, jint size) {
  ALOGV("%s", __func__);

  if (!sBluetoothInterface) return JNI_FALSE;
@@ -1398,7 +1398,8 @@ static JNINativeMethod sMethods[] = {
    {"interopDatabaseClearNative", "()V", (void*)interopDatabaseClearNative},
    {"interopDatabaseAddNative", "(I[BI)V", (void*)interopDatabaseAddNative},
    {"obfuscateAddressNative", "([B)[B", (void*)obfuscateAddressNative},
    {"setBufferMillisNative", "(II)Z", (void*)setBufferMillisNative},
    {"setBufferLengthMillisNative", "(II)Z",
     (void*)setBufferLengthMillisNative},
    {"getMetricIdNative", "([B)I", (void*)getMetricIdNative},
    {"connectSocketNative", "([BI[BIII)I", (void*)connectSocketNative},
    {"createSocketChannelNative", "(ILjava/lang/String;[BIII)I",
+4 −4
Original line number Diff line number Diff line
@@ -906,10 +906,10 @@ public class A2dpService extends ProfileService {
     * @param value buffer millis
     * @return true if the settings is successful, false otherwise
     */
    public boolean setBufferMillis(int codec, int value) {
    public boolean setBufferLengthMillis(int codec, int value) {
        enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED,
                "Need BLUETOOTH_PRIVILEGED permission");
        return mAdapterService.setBufferMillis(codec, value);
        return mAdapterService.setBufferLengthMillis(codec, value);
    }

    // Handle messages from native (JNI) to Java
@@ -1441,12 +1441,12 @@ public class A2dpService extends ProfileService {
            return service.getBufferConstraints();
        }

        public boolean setBufferMillis(int codec, int value) {
        public boolean setBufferLengthMillis(int codec, int value) {
            A2dpService service = getService();
            if (service == null) {
                return false;
            }
            return service.setBufferMillis(codec, value);
            return service.setBufferLengthMillis(codec, value);
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -555,8 +555,8 @@ class AdapterProperties {
     * @param codec the codecs to set
     * @param size the size to set
     */
    boolean setBufferMillis(int codec, int value) {
        return mService.setBufferMillisNative(codec, value);
    boolean setBufferLengthMillis(int codec, int value) {
        return mService.setBufferLengthMillisNative(codec, value);
    }

    /**
+3 −3
Original line number Diff line number Diff line
@@ -3368,8 +3368,8 @@ public class AdapterService extends Service {
     * @param value buffer millis
     * @return true if the settings is successful, false otherwise
     */
    public boolean setBufferMillis(int codec, int value) {
        return mAdapterProperties.setBufferMillis(codec, value);
    public boolean setBufferLengthMillis(int codec, int value) {
        return mAdapterProperties.setBufferLengthMillis(codec, value);
    }

    /**
@@ -3465,7 +3465,7 @@ public class AdapterService extends Service {

    private native byte[] obfuscateAddressNative(byte[] address);

    native boolean setBufferMillisNative(int codec, int value);
    native boolean setBufferLengthMillisNative(int codec, int value);

    private native int getMetricIdNative(byte[] address);