OSDN Git Service

Bluetooth 5 Enable->Enabled (2/2)
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 22 Mar 2017 22:41:35 +0000 (15:41 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 22 Mar 2017 22:44:44 +0000 (15:44 -0700)
Test: manual
Bug: 30622771
Change-Id: Ifce2fc20fde2c55f26cb54012c9ee4eb44b1c91e

jni/com_android_bluetooth_gatt.cpp
src/com/android/bluetooth/gatt/AdvertiseManager.java

index 259cf95..9322b87 100644 (file)
@@ -190,7 +190,7 @@ static jmethodID method_onScanResponseDataSet;
 static jmethodID method_onAdvertisingParametersUpdated;
 static jmethodID method_onPeriodicAdvertisingParametersUpdated;
 static jmethodID method_onPeriodicAdvertisingDataSet;
-static jmethodID method_onPeriodicAdvertisingEnable;
+static jmethodID method_onPeriodicAdvertisingEnabled;
 
 /**
  * Static variables
@@ -1572,8 +1572,8 @@ static void advertiseClassInitNative(JNIEnv* env, jclass clazz) {
       clazz, "onPeriodicAdvertisingParametersUpdated", "(II)V");
   method_onPeriodicAdvertisingDataSet =
       env->GetMethodID(clazz, "onPeriodicAdvertisingDataSet", "(II)V");
-  method_onPeriodicAdvertisingEnable =
-      env->GetMethodID(clazz, "onPeriodicAdvertisingEnable", "(IZI)V");
+  method_onPeriodicAdvertisingEnabled =
+      env->GetMethodID(clazz, "onPeriodicAdvertisingEnabled", "(IZI)V");
 }
 
 static void advertiseInitializeNative(JNIEnv* env, jobject object) {
@@ -1820,7 +1820,7 @@ static void enablePeriodicSetCb(uint8_t advertiser_id, bool enable,
   CallbackEnv sCallbackEnv(__func__);
   if (!sCallbackEnv.valid()) return;
   sCallbackEnv->CallVoidMethod(mCallbacksObj,
-                               method_onPeriodicAdvertisingEnable,
+                               method_onPeriodicAdvertisingEnabled,
                                advertiser_id, enable, status);
 }
 
index 2b981ec..73534cf 100644 (file)
@@ -328,9 +328,10 @@ class AdvertiseManager {
         callback.onPeriodicAdvertisingDataSet(advertiser_id, status);
     }
 
-    void onPeriodicAdvertisingEnable(int advertiser_id, boolean enable, int status)
+    void onPeriodicAdvertisingEnabled(int advertiser_id, boolean enable, int status)
             throws Exception {
-        logd("onPeriodicAdvertisingEnable() advertiser_id=" + advertiser_id + ", status=" + status);
+        logd("onPeriodicAdvertisingEnabled() advertiser_id=" + advertiser_id + ", status="
+                + status);
 
         Map.Entry<IBinder, AdvertiserInfo> entry = findAdvertiser(advertiser_id);
         if (entry == null) {
@@ -339,7 +340,7 @@ class AdvertiseManager {
         }
 
         IAdvertisingSetCallback callback = entry.getValue().callback;
-        callback.onPeriodicAdvertisingEnable(advertiser_id, enable, status);
+        callback.onPeriodicAdvertisingEnabled(advertiser_id, enable, status);
     }
 
     private void logd(String s) {