Loading android/app/src/com/android/bluetooth/ObexServerSockets.java +5 −5 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ public class ObexServerSockets { */ private synchronized boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { if(D) Log.d(TAG, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(mConAccepted == false && mConHandler.onConnect(device, conSocket) == true) { if(!mConAccepted && mConHandler.onConnect(device, conSocket)) { mConAccepted = true; // TODO: Reset this when ready to accept new connection /* Signal the remaining threads to stop. shutdown(false); */ // UPDATE: TODO: remove - redesigned to keep running... Loading Loading @@ -262,7 +262,7 @@ public class ObexServerSockets { if(mL2capThread != null){ mL2capThread.shutdown(); } if(block == true) { if(block) { while(mRfcommThread != null || mL2capThread != null) { try { if(mRfcommThread != null) { Loading Loading @@ -345,7 +345,7 @@ public class ObexServerSockets { */ boolean isValid = ObexServerSockets.this.onConnect(device, connSocket); if(isValid == false) { if(!isValid) { /* Close connection if we already have a connection with another device * by responding to the OBEX connect request. */ Loading @@ -364,7 +364,7 @@ public class ObexServerSockets { // now wait for a new connect } } catch (IOException ex) { if(mStopped == true) { if(mStopped) { // Expected exception because of shutdown. } else { Log.w(TAG, "Accept exception for " + Loading @@ -385,7 +385,7 @@ public class ObexServerSockets { * are ready to be disconnected. */ public void shutdown() { if(mStopped == false) { if(!mStopped) { mStopped = true; // TODO: According to the documentation, this should not close the accepted // sockets - and that is true, but it closes the l2cap connections, and Loading android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -883,7 +883,7 @@ final class A2dpStateMachine extends StateMachine { boolean ret = false; //check if this is an incoming connection in Quiet mode. if((adapterService == null) || ((adapterService.isQuietModeEnabled() == true) && ((adapterService.isQuietModeEnabled()) && (mTargetDevice == null))){ ret = false; } Loading android/app/src/com/android/bluetooth/avrcp/Avrcp.java +2 −2 Original line number Diff line number Diff line Loading @@ -545,7 +545,7 @@ public final class Avrcp { boolean volAdj = false; if (msg.arg2 == AVRC_RSP_ACCEPT || msg.arg2 == AVRC_RSP_REJ) { if (mVolCmdAdjustInProgress == false && mVolCmdSetInProgress == false) { if (!mVolCmdAdjustInProgress && !mVolCmdSetInProgress) { Log.e(TAG, "Unsolicited response, ignored"); break; } Loading Loading @@ -959,7 +959,7 @@ public final class Avrcp { if (exists != other.exists) return false; if (exists == false) if (!exists) return true; return (title.equals(other.title)) && (artistName.equals(other.artistName)) Loading android/app/src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java +4 −4 Original line number Diff line number Diff line Loading @@ -371,7 +371,7 @@ class BrowsedMediaPlayer { if (DEBUG) Log.d(TAG, "changePath.direction = " + direction); String newPath = ""; if (isPlayerConnected() == false) { if (!isPlayerConnected()) { Log.w(TAG, "changePath: disconnected from player service, sending internal error"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INTERNAL_ERR, 0); return; Loading @@ -388,11 +388,11 @@ class BrowsedMediaPlayer { if ((newPath = byteToString(folderUid)) == null) { Log.e(TAG, "Could not get media item from folder Uid, sending err response"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INV_ITEM, 0); } else if (isBrowsableFolderDn(newPath) == false) { } else if (!isBrowsableFolderDn(newPath)) { /* new path is not browsable */ Log.e(TAG, "ItemUid received from changePath cmd is not browsable"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INV_DIRECTORY, 0); } else if (mPathStack.peek().equals(newPath) == true) { } else if (mPathStack.peek().equals(newPath)) { /* new_folder is same as current folder */ Log.e(TAG, "new_folder is same as current folder, Invalid direction!"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INV_DIRN, 0); Loading @@ -402,7 +402,7 @@ class BrowsedMediaPlayer { mPathStack.push(newPath); } } else if (direction == AvrcpConstants.DIR_UP) { /* move up */ if (isBrowsableFolderUp() == false) { if (!isBrowsableFolderUp()) { /* Already on the root, cannot allow up: PTS: test case TC_TG_MCN_CB_BI_02_C * This is required, otherwise some CT will keep on sending change path up * until they receive error */ Loading android/app/src/com/android/bluetooth/gatt/GattService.java +1 −1 Original line number Diff line number Diff line Loading @@ -2561,7 +2561,7 @@ public class GattService extends ProfileService { for(HandleMap.Entry entry : entries) { if (entry.type != HandleMap.TYPE_SERVICE || entry.serverIf != serverIf || entry.started == false) !entry.started) continue; gattServerStopServiceNative(serverIf, entry.handle); Loading Loading
android/app/src/com/android/bluetooth/ObexServerSockets.java +5 −5 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ public class ObexServerSockets { */ private synchronized boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { if(D) Log.d(TAG, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(mConAccepted == false && mConHandler.onConnect(device, conSocket) == true) { if(!mConAccepted && mConHandler.onConnect(device, conSocket)) { mConAccepted = true; // TODO: Reset this when ready to accept new connection /* Signal the remaining threads to stop. shutdown(false); */ // UPDATE: TODO: remove - redesigned to keep running... Loading Loading @@ -262,7 +262,7 @@ public class ObexServerSockets { if(mL2capThread != null){ mL2capThread.shutdown(); } if(block == true) { if(block) { while(mRfcommThread != null || mL2capThread != null) { try { if(mRfcommThread != null) { Loading Loading @@ -345,7 +345,7 @@ public class ObexServerSockets { */ boolean isValid = ObexServerSockets.this.onConnect(device, connSocket); if(isValid == false) { if(!isValid) { /* Close connection if we already have a connection with another device * by responding to the OBEX connect request. */ Loading @@ -364,7 +364,7 @@ public class ObexServerSockets { // now wait for a new connect } } catch (IOException ex) { if(mStopped == true) { if(mStopped) { // Expected exception because of shutdown. } else { Log.w(TAG, "Accept exception for " + Loading @@ -385,7 +385,7 @@ public class ObexServerSockets { * are ready to be disconnected. */ public void shutdown() { if(mStopped == false) { if(!mStopped) { mStopped = true; // TODO: According to the documentation, this should not close the accepted // sockets - and that is true, but it closes the l2cap connections, and Loading
android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -883,7 +883,7 @@ final class A2dpStateMachine extends StateMachine { boolean ret = false; //check if this is an incoming connection in Quiet mode. if((adapterService == null) || ((adapterService.isQuietModeEnabled() == true) && ((adapterService.isQuietModeEnabled()) && (mTargetDevice == null))){ ret = false; } Loading
android/app/src/com/android/bluetooth/avrcp/Avrcp.java +2 −2 Original line number Diff line number Diff line Loading @@ -545,7 +545,7 @@ public final class Avrcp { boolean volAdj = false; if (msg.arg2 == AVRC_RSP_ACCEPT || msg.arg2 == AVRC_RSP_REJ) { if (mVolCmdAdjustInProgress == false && mVolCmdSetInProgress == false) { if (!mVolCmdAdjustInProgress && !mVolCmdSetInProgress) { Log.e(TAG, "Unsolicited response, ignored"); break; } Loading Loading @@ -959,7 +959,7 @@ public final class Avrcp { if (exists != other.exists) return false; if (exists == false) if (!exists) return true; return (title.equals(other.title)) && (artistName.equals(other.artistName)) Loading
android/app/src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java +4 −4 Original line number Diff line number Diff line Loading @@ -371,7 +371,7 @@ class BrowsedMediaPlayer { if (DEBUG) Log.d(TAG, "changePath.direction = " + direction); String newPath = ""; if (isPlayerConnected() == false) { if (!isPlayerConnected()) { Log.w(TAG, "changePath: disconnected from player service, sending internal error"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INTERNAL_ERR, 0); return; Loading @@ -388,11 +388,11 @@ class BrowsedMediaPlayer { if ((newPath = byteToString(folderUid)) == null) { Log.e(TAG, "Could not get media item from folder Uid, sending err response"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INV_ITEM, 0); } else if (isBrowsableFolderDn(newPath) == false) { } else if (!isBrowsableFolderDn(newPath)) { /* new path is not browsable */ Log.e(TAG, "ItemUid received from changePath cmd is not browsable"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INV_DIRECTORY, 0); } else if (mPathStack.peek().equals(newPath) == true) { } else if (mPathStack.peek().equals(newPath)) { /* new_folder is same as current folder */ Log.e(TAG, "new_folder is same as current folder, Invalid direction!"); mMediaInterface.changePathRsp(mBDAddr, AvrcpConstants.RSP_INV_DIRN, 0); Loading @@ -402,7 +402,7 @@ class BrowsedMediaPlayer { mPathStack.push(newPath); } } else if (direction == AvrcpConstants.DIR_UP) { /* move up */ if (isBrowsableFolderUp() == false) { if (!isBrowsableFolderUp()) { /* Already on the root, cannot allow up: PTS: test case TC_TG_MCN_CB_BI_02_C * This is required, otherwise some CT will keep on sending change path up * until they receive error */ Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +1 −1 Original line number Diff line number Diff line Loading @@ -2561,7 +2561,7 @@ public class GattService extends ProfileService { for(HandleMap.Entry entry : entries) { if (entry.type != HandleMap.TYPE_SERVICE || entry.serverIf != serverIf || entry.started == false) !entry.started) continue; gattServerStopServiceNative(serverIf, entry.handle); Loading