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

Commit b998373e authored by Chienyuan's avatar Chienyuan Committed by android-build-merger
Browse files

Merge "Fix typo of noise reduction" am: b0fd7ff5 am: 5b2d2d42

am: 9d1d42ae

Change-Id: I117a157430d41225e8345e06c790dbf73212f91a
parents bf65b913 9d1d42ae
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ static jmethodID method_onHangupCall;
static jmethodID method_onVolumeChanged;
static jmethodID method_onDialCall;
static jmethodID method_onSendDtmf;
static jmethodID method_onNoiceReductionEnable;
static jmethodID method_onNoiseReductionEnable;
static jmethodID method_onWBS;
static jmethodID method_onAtChld;
static jmethodID method_onAtCnum;
@@ -215,7 +215,7 @@ class JniHeadsetCallbacks : bluetooth::headset::Callbacks {
      ALOGE("Fail to new jbyteArray bd addr for audio state");
      return;
    }
    sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onNoiceReductionEnable,
    sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onNoiseReductionEnable,
                                 nrec == bluetooth::headset::BTHF_NREC_START,
                                 addr.get());
  }
@@ -396,8 +396,8 @@ static void classInitNative(JNIEnv* env, jclass clazz) {
  method_onDialCall =
      env->GetMethodID(clazz, "onDialCall", "(Ljava/lang/String;[B)V");
  method_onSendDtmf = env->GetMethodID(clazz, "onSendDtmf", "(I[B)V");
  method_onNoiceReductionEnable =
      env->GetMethodID(clazz, "onNoiceReductionEnable", "(Z[B)V");
  method_onNoiseReductionEnable =
      env->GetMethodID(clazz, "onNoiseReductionEnable", "(Z[B)V");
  method_onWBS = env->GetMethodID(clazz, "onWBS", "(I[B)V");
  method_onAtChld = env->GetMethodID(clazz, "onAtChld", "(I[B)V");
  method_onAtCnum = env->GetMethodID(clazz, "onAtCnum", "([B)V");
+2 −2
Original line number Diff line number Diff line
@@ -128,9 +128,9 @@ public class HeadsetNativeInterface {
        sendMessageToService(event);
    }

    private void onNoiceReductionEnable(boolean enable, byte[] address) {
    private void onNoiseReductionEnable(boolean enable, byte[] address) {
        HeadsetStackEvent event =
                new HeadsetStackEvent(HeadsetStackEvent.EVENT_TYPE_NOICE_REDUCTION, enable ? 1 : 0,
                new HeadsetStackEvent(HeadsetStackEvent.EVENT_TYPE_NOISE_REDUCTION, enable ? 1 : 0,
                        getDevice(address));
        sendMessageToService(event);
    }
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ public class HeadsetStackEvent extends HeadsetMessageObject {
    public static final int EVENT_TYPE_VOLUME_CHANGED = 6;
    public static final int EVENT_TYPE_DIAL_CALL = 7;
    public static final int EVENT_TYPE_SEND_DTMF = 8;
    public static final int EVENT_TYPE_NOICE_REDUCTION = 9;
    public static final int EVENT_TYPE_NOISE_REDUCTION = 9;
    public static final int EVENT_TYPE_AT_CHLD = 10;
    public static final int EVENT_TYPE_SUBSCRIBER_NUMBER_REQUEST = 11;
    public static final int EVENT_TYPE_AT_CIND = 12;
@@ -153,8 +153,8 @@ public class HeadsetStackEvent extends HeadsetMessageObject {
                return "EVENT_TYPE_DIAL_CALL";
            case EVENT_TYPE_SEND_DTMF:
                return "EVENT_TYPE_SEND_DTMF";
            case EVENT_TYPE_NOICE_REDUCTION:
                return "EVENT_TYPE_NOICE_REDUCTION";
            case EVENT_TYPE_NOISE_REDUCTION:
                return "EVENT_TYPE_NOISE_REDUCTION";
            case EVENT_TYPE_AT_CHLD:
                return "EVENT_TYPE_AT_CHLD";
            case EVENT_TYPE_SUBSCRIBER_NUMBER_REQUEST:
+1 −1
Original line number Diff line number Diff line
@@ -922,7 +922,7 @@ public class HeadsetStateMachine extends StateMachine {
                        case HeadsetStackEvent.EVENT_TYPE_SEND_DTMF:
                            mSystemInterface.sendDtmf(event.valueInt, event.device);
                            break;
                        case HeadsetStackEvent.EVENT_TYPE_NOICE_REDUCTION:
                        case HeadsetStackEvent.EVENT_TYPE_NOISE_REDUCTION:
                            processNoiseReductionEvent(event.valueInt == 1);
                            break;
                        case HeadsetStackEvent.EVENT_TYPE_WBS: