Loading android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +47 −15 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ #include "utils/Log.h" #include "utils/misc.h" #include <base/logging.h> #include <base/strings/stringprintf.h> #include <dlfcn.h> #include <errno.h> #include <pthread.h> #include <string.h> Loading @@ -29,6 +33,7 @@ #include <sys/prctl.h> #include <sys/stat.h> using base::StringPrintf; using bluetooth::Uuid; namespace android { Loading Loading @@ -582,6 +587,47 @@ static bt_os_callouts_t sBluetoothOsCallouts = { acquire_wake_lock_callout, release_wake_lock_callout, }; #if defined(__LP64__) #define BLUETOOTH_LIBRARY_NAME "/system/lib64/hw/bluetooth.default.so" #else #define BLUETOOTH_LIBRARY_NAME "/system/lib/hw/bluetooth.default.so" #endif int hal_util_load_bt_library(const bt_interface_t** interface) { const char* sym = BLUETOOTH_INTERFACE_STRING; bt_interface_t* itf = nullptr; // Always try to load the default Bluetooth stack on GN builds. const char* path = BLUETOOTH_LIBRARY_NAME; void* handle = dlopen(path, RTLD_NOW); if (!handle) { const char* err_str = dlerror(); LOG(ERROR) << __func__ << ": failed to load Bluetooth library " << path << ", error=" << (err_str ? err_str : "error unknown"); goto error; } // Get the address of the bt_interface_t. itf = (bt_interface_t*)dlsym(handle, sym); if (!itf) { LOG(ERROR) << __func__ << ": failed to load symbol from Bluetooth library " << sym; goto error; } // Success. LOG(INFO) << __func__ << " loaded HAL: btinterface=" << itf << ", handle=" << handle; *interface = itf; return 0; error: *interface = NULL; if (handle) dlclose(handle); return -EINVAL; } static void classInitNative(JNIEnv* env, jclass clazz) { jclass jniUidTrafficClass = env->FindClass("android/bluetooth/UidTraffic"); android_bluetooth_UidTraffic.constructor = Loading Loading @@ -623,21 +669,7 @@ static void classInitNative(JNIEnv* env, jclass clazz) { method_energyInfo = env->GetMethodID( clazz, "energyInfoCallback", "(IIJJJJ[Landroid/bluetooth/UidTraffic;)V"); const char* id = BT_STACK_MODULE_ID; hw_module_t* module; int err = hw_get_module(id, (hw_module_t const**)&module); if (err == 0) { hw_device_t* abstraction; err = module->methods->open(module, id, &abstraction); if (err == 0) { bluetooth_module_t* btStack = (bluetooth_module_t*)abstraction; sBluetoothInterface = btStack->get_bluetooth_interface(); } else { ALOGE("Error while opening Bluetooth library"); } } else { if (hal_util_load_bt_library((bt_interface_t const**)&sBluetoothInterface)) { ALOGE("No Bluetooth Library found"); } } Loading android/app/src/com/android/bluetooth/ObexServerSockets.java +19 −19 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import android.util.Log; * In both cases the {@link ObexServerSockets} object have terminated, and a new must be created. */ public class ObexServerSockets { private final String TAG; private final String mTag; private static final String STAG = "ObexServerSockets"; private static final boolean D = true; // TODO: set to false! private static final int NUMBER_OF_SOCKET_TYPES = 2; // increment if LE will be supported Loading @@ -68,7 +68,7 @@ public class ObexServerSockets { mConHandler = conHandler; mRfcommSocket = rfcommSocket; mL2capSocket = l2capSocket; TAG = "ObexServerSockets" + sInstanceCounter++; mTag = "ObexServerSockets" + sInstanceCounter++; } /** Loading Loading @@ -96,6 +96,7 @@ public class ObexServerSockets { BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP, false); } private static final int CREATE_RETRY_TIME = 10; /** * Creates an RFCOMM {@link BluetoothServerSocket} and a L2CAP {@link BluetoothServerSocket} * with specific l2cap and RFCOMM channel numbers. It is the responsibility of the caller to Loading @@ -120,7 +121,6 @@ public class ObexServerSockets { BluetoothServerSocket rfcommSocket = null; BluetoothServerSocket l2capSocket = null; boolean initSocketOK = false; final int CREATE_RETRY_TIME = 10; // It's possible that create will fail in some cases. retry for 10 times for (int i = 0; i < CREATE_RETRY_TIME; i++) { Loading Loading @@ -198,7 +198,7 @@ public class ObexServerSockets { * the {@link IObexConnectionValidator#onConnect()}, at which point both threads will exit. */ private void startAccept() { if(D) Log.d(TAG,"startAccept()"); if(D) Log.d(mTag,"startAccept()"); prepareForNewConnect(); mRfcommThread = new SocketAcceptThread(mRfcommSocket); Loading @@ -213,7 +213,7 @@ public class ObexServerSockets { * Signaled through {@link IObexConnectionValidator#onConnect()}; */ public synchronized void prepareForNewConnect() { if(D) Log.d(TAG, "prepareForNewConnect()"); if(D) Log.d(mTag, "prepareForNewConnect()"); mConAccepted = false; } Loading @@ -227,7 +227,7 @@ public class ObexServerSockets { * @return true if the connection is accepted, false otherwise. */ private synchronized boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { if(D) Log.d(TAG, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(D) Log.d(mTag, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(!mConAccepted && mConHandler.onConnect(device, conSocket)) { mConAccepted = true; // TODO: Reset this when ready to accept new connection /* Signal the remaining threads to stop. Loading @@ -244,7 +244,7 @@ public class ObexServerSockets { shutdown(false); BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); if ((mAdapter != null) && (mAdapter.getState() == BluetoothAdapter.STATE_ON)) { Log.d(TAG, "onAcceptFailed() calling shutdown..."); Log.d(mTag, "onAcceptFailed() calling shutdown..."); mConHandler.onAcceptFailed(); } } Loading @@ -255,7 +255,7 @@ public class ObexServerSockets { * has ended execution */ public synchronized void shutdown(boolean block) { if(D) Log.d(TAG, "shutdown(block = " + block + ")"); if(D) Log.d(mTag, "shutdown(block = " + block + ")"); if(mRfcommThread != null) { mRfcommThread.shutdown(); } Loading @@ -274,7 +274,7 @@ public class ObexServerSockets { mL2capThread = null; } } catch (InterruptedException e) { Log.i(TAG, "shutdown() interrupted, continue waiting...", e); Log.i(mTag, "shutdown() interrupted, continue waiting...", e); } } } else { Loading Loading @@ -319,24 +319,24 @@ public class ObexServerSockets { BluetoothDevice device; try { if (D) Log.d(TAG, "Accepting socket connection..."); if (D) Log.d(mTag, "Accepting socket connection..."); connSocket = mServerSocket.accept(); if (D) Log.d(TAG, "Accepted socket connection from: " + mServerSocket); if (D) Log.d(mTag, "Accepted socket connection from: " + mServerSocket); if (connSocket == null) { // TODO: Do we need a max error count, to avoid spinning? Log.w(TAG, "connSocket is null - reattempt accept"); Log.w(mTag, "connSocket is null - reattempt accept"); continue; } device = connSocket.getRemoteDevice(); if (device == null) { Log.i(TAG, "getRemoteDevice() = null - reattempt accept"); Log.i(mTag, "getRemoteDevice() = null - reattempt accept"); try{ connSocket.close(); } catch (IOException e) { Log.w(TAG, "Error closing the socket. ignoring...",e ); Log.w(mTag, "Error closing the socket. ignoring...",e ); } continue; } Loading @@ -349,7 +349,7 @@ public class ObexServerSockets { /* Close connection if we already have a connection with another device * by responding to the OBEX connect request. */ Log.i(TAG, "RemoteDevice is invalid - creating ObexRejectServer."); Log.i(mTag, "RemoteDevice is invalid - creating ObexRejectServer."); BluetoothObexTransport obexTrans = new BluetoothObexTransport(connSocket); // Create and detach a selfdestructing ServerSession to respond to any Loading @@ -367,7 +367,7 @@ public class ObexServerSockets { if(mStopped) { // Expected exception because of shutdown. } else { Log.w(TAG, "Accept exception for " + Log.w(mTag, "Accept exception for " + mServerSocket, ex); ObexServerSockets.this.onAcceptFailed(); } Loading @@ -375,7 +375,7 @@ public class ObexServerSockets { } } // End while() } finally { if (D) Log.d(TAG, "AcceptThread ended for: " + mServerSocket); if (D) Log.d(mTag, "AcceptThread ended for: " + mServerSocket); } } Loading @@ -393,14 +393,14 @@ public class ObexServerSockets { try { mServerSocket.close(); } catch (IOException e) { if(D) Log.d(TAG, "Exception while thread shutdown:", e); if(D) Log.d(mTag, "Exception while thread shutdown:", e); } } // If called from another thread, interrupt the thread if(!Thread.currentThread().equals(this)){ // TODO: Will this interrupt the thread if it is blocked in synchronized? // Else: change to use InterruptableLock if(D) Log.d(TAG, "shutdown called from another thread - interrupt()."); if(D) Log.d(mTag, "shutdown called from another thread - interrupt()."); interrupt(); } } Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +11 −11 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class A2dpService extends ProfileService { } }; private static A2dpService sAd2dpService; private static A2dpService sA2dpService; static final ParcelUuid[] A2DP_SOURCE_UUID = { BluetoothUuid.AudioSource }; Loading Loading @@ -154,14 +154,14 @@ public class A2dpService extends ProfileService { //API Methods public static synchronized A2dpService getA2dpService(){ if (sAd2dpService != null && sAd2dpService.isAvailable()) { if (DBG) Log.d(TAG, "getA2DPService(): returning " + sAd2dpService); return sAd2dpService; if (sA2dpService != null && sA2dpService.isAvailable()) { if (DBG) Log.d(TAG, "getA2DPService(): returning " + sA2dpService); return sA2dpService; } if (DBG) { if (sAd2dpService == null) { if (sA2dpService == null) { Log.d(TAG, "getA2dpService(): service is NULL"); } else if (!(sAd2dpService.isAvailable())) { } else if (!(sA2dpService.isAvailable())) { Log.d(TAG,"getA2dpService(): service is not available"); } } Loading @@ -170,13 +170,13 @@ public class A2dpService extends ProfileService { private static synchronized void setA2dpService(A2dpService instance) { if (instance != null && instance.isAvailable()) { if (DBG) Log.d(TAG, "setA2dpService(): set to: " + sAd2dpService); sAd2dpService = instance; if (DBG) Log.d(TAG, "setA2dpService(): set to: " + sA2dpService); sA2dpService = instance; } else { if (DBG) { if (sAd2dpService == null) { if (sA2dpService == null) { Log.d(TAG, "setA2dpService(): service not available"); } else if (!sAd2dpService.isAvailable()) { } else if (!sA2dpService.isAvailable()) { Log.d(TAG,"setA2dpService(): service is cleaning up"); } } Loading @@ -184,7 +184,7 @@ public class A2dpService extends ProfileService { } private static synchronized void clearA2dpService() { sAd2dpService = null; sA2dpService = null; } public boolean connect(BluetoothDevice device) { Loading android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +3 −3 Original line number Diff line number Diff line Loading @@ -962,9 +962,9 @@ final class A2dpStateMachine extends StateMachine { } private class StackEvent { int type = EVENT_TYPE_NONE; int valueInt = 0; BluetoothDevice device = null; public int type = EVENT_TYPE_NONE; public int valueInt = 0; public BluetoothDevice device = null; private StackEvent(int type) { this.type = type; Loading android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java +4 −4 Original line number Diff line number Diff line Loading @@ -810,10 +810,10 @@ public class A2dpSinkStateMachine extends StateMachine { } private class StackEvent { int type = EVENT_TYPE_NONE; int valueInt = 0; BluetoothDevice device = null; BluetoothAudioConfig audioConfig = null; public int type = EVENT_TYPE_NONE; public int valueInt = 0; public BluetoothDevice device = null; public BluetoothAudioConfig audioConfig = null; private StackEvent(int type) { this.type = type; Loading Loading
android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +47 −15 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ #include "utils/Log.h" #include "utils/misc.h" #include <base/logging.h> #include <base/strings/stringprintf.h> #include <dlfcn.h> #include <errno.h> #include <pthread.h> #include <string.h> Loading @@ -29,6 +33,7 @@ #include <sys/prctl.h> #include <sys/stat.h> using base::StringPrintf; using bluetooth::Uuid; namespace android { Loading Loading @@ -582,6 +587,47 @@ static bt_os_callouts_t sBluetoothOsCallouts = { acquire_wake_lock_callout, release_wake_lock_callout, }; #if defined(__LP64__) #define BLUETOOTH_LIBRARY_NAME "/system/lib64/hw/bluetooth.default.so" #else #define BLUETOOTH_LIBRARY_NAME "/system/lib/hw/bluetooth.default.so" #endif int hal_util_load_bt_library(const bt_interface_t** interface) { const char* sym = BLUETOOTH_INTERFACE_STRING; bt_interface_t* itf = nullptr; // Always try to load the default Bluetooth stack on GN builds. const char* path = BLUETOOTH_LIBRARY_NAME; void* handle = dlopen(path, RTLD_NOW); if (!handle) { const char* err_str = dlerror(); LOG(ERROR) << __func__ << ": failed to load Bluetooth library " << path << ", error=" << (err_str ? err_str : "error unknown"); goto error; } // Get the address of the bt_interface_t. itf = (bt_interface_t*)dlsym(handle, sym); if (!itf) { LOG(ERROR) << __func__ << ": failed to load symbol from Bluetooth library " << sym; goto error; } // Success. LOG(INFO) << __func__ << " loaded HAL: btinterface=" << itf << ", handle=" << handle; *interface = itf; return 0; error: *interface = NULL; if (handle) dlclose(handle); return -EINVAL; } static void classInitNative(JNIEnv* env, jclass clazz) { jclass jniUidTrafficClass = env->FindClass("android/bluetooth/UidTraffic"); android_bluetooth_UidTraffic.constructor = Loading Loading @@ -623,21 +669,7 @@ static void classInitNative(JNIEnv* env, jclass clazz) { method_energyInfo = env->GetMethodID( clazz, "energyInfoCallback", "(IIJJJJ[Landroid/bluetooth/UidTraffic;)V"); const char* id = BT_STACK_MODULE_ID; hw_module_t* module; int err = hw_get_module(id, (hw_module_t const**)&module); if (err == 0) { hw_device_t* abstraction; err = module->methods->open(module, id, &abstraction); if (err == 0) { bluetooth_module_t* btStack = (bluetooth_module_t*)abstraction; sBluetoothInterface = btStack->get_bluetooth_interface(); } else { ALOGE("Error while opening Bluetooth library"); } } else { if (hal_util_load_bt_library((bt_interface_t const**)&sBluetoothInterface)) { ALOGE("No Bluetooth Library found"); } } Loading
android/app/src/com/android/bluetooth/ObexServerSockets.java +19 −19 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import android.util.Log; * In both cases the {@link ObexServerSockets} object have terminated, and a new must be created. */ public class ObexServerSockets { private final String TAG; private final String mTag; private static final String STAG = "ObexServerSockets"; private static final boolean D = true; // TODO: set to false! private static final int NUMBER_OF_SOCKET_TYPES = 2; // increment if LE will be supported Loading @@ -68,7 +68,7 @@ public class ObexServerSockets { mConHandler = conHandler; mRfcommSocket = rfcommSocket; mL2capSocket = l2capSocket; TAG = "ObexServerSockets" + sInstanceCounter++; mTag = "ObexServerSockets" + sInstanceCounter++; } /** Loading Loading @@ -96,6 +96,7 @@ public class ObexServerSockets { BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP, false); } private static final int CREATE_RETRY_TIME = 10; /** * Creates an RFCOMM {@link BluetoothServerSocket} and a L2CAP {@link BluetoothServerSocket} * with specific l2cap and RFCOMM channel numbers. It is the responsibility of the caller to Loading @@ -120,7 +121,6 @@ public class ObexServerSockets { BluetoothServerSocket rfcommSocket = null; BluetoothServerSocket l2capSocket = null; boolean initSocketOK = false; final int CREATE_RETRY_TIME = 10; // It's possible that create will fail in some cases. retry for 10 times for (int i = 0; i < CREATE_RETRY_TIME; i++) { Loading Loading @@ -198,7 +198,7 @@ public class ObexServerSockets { * the {@link IObexConnectionValidator#onConnect()}, at which point both threads will exit. */ private void startAccept() { if(D) Log.d(TAG,"startAccept()"); if(D) Log.d(mTag,"startAccept()"); prepareForNewConnect(); mRfcommThread = new SocketAcceptThread(mRfcommSocket); Loading @@ -213,7 +213,7 @@ public class ObexServerSockets { * Signaled through {@link IObexConnectionValidator#onConnect()}; */ public synchronized void prepareForNewConnect() { if(D) Log.d(TAG, "prepareForNewConnect()"); if(D) Log.d(mTag, "prepareForNewConnect()"); mConAccepted = false; } Loading @@ -227,7 +227,7 @@ public class ObexServerSockets { * @return true if the connection is accepted, false otherwise. */ private synchronized boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { if(D) Log.d(TAG, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(D) Log.d(mTag, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(!mConAccepted && mConHandler.onConnect(device, conSocket)) { mConAccepted = true; // TODO: Reset this when ready to accept new connection /* Signal the remaining threads to stop. Loading @@ -244,7 +244,7 @@ public class ObexServerSockets { shutdown(false); BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); if ((mAdapter != null) && (mAdapter.getState() == BluetoothAdapter.STATE_ON)) { Log.d(TAG, "onAcceptFailed() calling shutdown..."); Log.d(mTag, "onAcceptFailed() calling shutdown..."); mConHandler.onAcceptFailed(); } } Loading @@ -255,7 +255,7 @@ public class ObexServerSockets { * has ended execution */ public synchronized void shutdown(boolean block) { if(D) Log.d(TAG, "shutdown(block = " + block + ")"); if(D) Log.d(mTag, "shutdown(block = " + block + ")"); if(mRfcommThread != null) { mRfcommThread.shutdown(); } Loading @@ -274,7 +274,7 @@ public class ObexServerSockets { mL2capThread = null; } } catch (InterruptedException e) { Log.i(TAG, "shutdown() interrupted, continue waiting...", e); Log.i(mTag, "shutdown() interrupted, continue waiting...", e); } } } else { Loading Loading @@ -319,24 +319,24 @@ public class ObexServerSockets { BluetoothDevice device; try { if (D) Log.d(TAG, "Accepting socket connection..."); if (D) Log.d(mTag, "Accepting socket connection..."); connSocket = mServerSocket.accept(); if (D) Log.d(TAG, "Accepted socket connection from: " + mServerSocket); if (D) Log.d(mTag, "Accepted socket connection from: " + mServerSocket); if (connSocket == null) { // TODO: Do we need a max error count, to avoid spinning? Log.w(TAG, "connSocket is null - reattempt accept"); Log.w(mTag, "connSocket is null - reattempt accept"); continue; } device = connSocket.getRemoteDevice(); if (device == null) { Log.i(TAG, "getRemoteDevice() = null - reattempt accept"); Log.i(mTag, "getRemoteDevice() = null - reattempt accept"); try{ connSocket.close(); } catch (IOException e) { Log.w(TAG, "Error closing the socket. ignoring...",e ); Log.w(mTag, "Error closing the socket. ignoring...",e ); } continue; } Loading @@ -349,7 +349,7 @@ public class ObexServerSockets { /* Close connection if we already have a connection with another device * by responding to the OBEX connect request. */ Log.i(TAG, "RemoteDevice is invalid - creating ObexRejectServer."); Log.i(mTag, "RemoteDevice is invalid - creating ObexRejectServer."); BluetoothObexTransport obexTrans = new BluetoothObexTransport(connSocket); // Create and detach a selfdestructing ServerSession to respond to any Loading @@ -367,7 +367,7 @@ public class ObexServerSockets { if(mStopped) { // Expected exception because of shutdown. } else { Log.w(TAG, "Accept exception for " + Log.w(mTag, "Accept exception for " + mServerSocket, ex); ObexServerSockets.this.onAcceptFailed(); } Loading @@ -375,7 +375,7 @@ public class ObexServerSockets { } } // End while() } finally { if (D) Log.d(TAG, "AcceptThread ended for: " + mServerSocket); if (D) Log.d(mTag, "AcceptThread ended for: " + mServerSocket); } } Loading @@ -393,14 +393,14 @@ public class ObexServerSockets { try { mServerSocket.close(); } catch (IOException e) { if(D) Log.d(TAG, "Exception while thread shutdown:", e); if(D) Log.d(mTag, "Exception while thread shutdown:", e); } } // If called from another thread, interrupt the thread if(!Thread.currentThread().equals(this)){ // TODO: Will this interrupt the thread if it is blocked in synchronized? // Else: change to use InterruptableLock if(D) Log.d(TAG, "shutdown called from another thread - interrupt()."); if(D) Log.d(mTag, "shutdown called from another thread - interrupt()."); interrupt(); } } Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +11 −11 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class A2dpService extends ProfileService { } }; private static A2dpService sAd2dpService; private static A2dpService sA2dpService; static final ParcelUuid[] A2DP_SOURCE_UUID = { BluetoothUuid.AudioSource }; Loading Loading @@ -154,14 +154,14 @@ public class A2dpService extends ProfileService { //API Methods public static synchronized A2dpService getA2dpService(){ if (sAd2dpService != null && sAd2dpService.isAvailable()) { if (DBG) Log.d(TAG, "getA2DPService(): returning " + sAd2dpService); return sAd2dpService; if (sA2dpService != null && sA2dpService.isAvailable()) { if (DBG) Log.d(TAG, "getA2DPService(): returning " + sA2dpService); return sA2dpService; } if (DBG) { if (sAd2dpService == null) { if (sA2dpService == null) { Log.d(TAG, "getA2dpService(): service is NULL"); } else if (!(sAd2dpService.isAvailable())) { } else if (!(sA2dpService.isAvailable())) { Log.d(TAG,"getA2dpService(): service is not available"); } } Loading @@ -170,13 +170,13 @@ public class A2dpService extends ProfileService { private static synchronized void setA2dpService(A2dpService instance) { if (instance != null && instance.isAvailable()) { if (DBG) Log.d(TAG, "setA2dpService(): set to: " + sAd2dpService); sAd2dpService = instance; if (DBG) Log.d(TAG, "setA2dpService(): set to: " + sA2dpService); sA2dpService = instance; } else { if (DBG) { if (sAd2dpService == null) { if (sA2dpService == null) { Log.d(TAG, "setA2dpService(): service not available"); } else if (!sAd2dpService.isAvailable()) { } else if (!sA2dpService.isAvailable()) { Log.d(TAG,"setA2dpService(): service is cleaning up"); } } Loading @@ -184,7 +184,7 @@ public class A2dpService extends ProfileService { } private static synchronized void clearA2dpService() { sAd2dpService = null; sA2dpService = null; } public boolean connect(BluetoothDevice device) { Loading
android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +3 −3 Original line number Diff line number Diff line Loading @@ -962,9 +962,9 @@ final class A2dpStateMachine extends StateMachine { } private class StackEvent { int type = EVENT_TYPE_NONE; int valueInt = 0; BluetoothDevice device = null; public int type = EVENT_TYPE_NONE; public int valueInt = 0; public BluetoothDevice device = null; private StackEvent(int type) { this.type = type; Loading
android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java +4 −4 Original line number Diff line number Diff line Loading @@ -810,10 +810,10 @@ public class A2dpSinkStateMachine extends StateMachine { } private class StackEvent { int type = EVENT_TYPE_NONE; int valueInt = 0; BluetoothDevice device = null; BluetoothAudioConfig audioConfig = null; public int type = EVENT_TYPE_NONE; public int valueInt = 0; public BluetoothDevice device = null; public BluetoothAudioConfig audioConfig = null; private StackEvent(int type) { this.type = type; Loading