Loading src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -276,7 +276,7 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler implemen boolean needConfirm = true; /** It's not first put if !serverBlocking, so we auto accept it */ if (!mServerBlocking) { if (!mServerBlocking && mAccepted == BluetoothShare.USER_CONFIRMATION_CONFIRMED) { values.put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED); needConfirm = false; Loading src/com/android/bluetooth/opp/BluetoothOppService.java +8 −10 Original line number Diff line number Diff line Loading @@ -689,7 +689,7 @@ public class BluetoothOppService extends Service { info.mDestination = stringFromCursor(info.mDestination, cursor, BluetoothShare.DESTINATION); int newVisibility = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.VISIBILITY)); boolean confirmed = false; boolean confirmUpdated = false; int newConfirm = cursor.getInt(cursor .getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION)); Loading @@ -702,10 +702,8 @@ public class BluetoothOppService extends Service { info.mVisibility = newVisibility; if (info.mConfirm == BluetoothShare.USER_CONFIRMATION_PENDING && (newConfirm == BluetoothShare.USER_CONFIRMATION_CONFIRMED || newConfirm == BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED || newConfirm == BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED)) { confirmed = true; && newConfirm != BluetoothShare.USER_CONFIRMATION_PENDING) { confirmUpdated = true; } info.mConfirm = cursor.getInt(cursor .getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION)); Loading @@ -723,14 +721,14 @@ public class BluetoothOppService extends Service { info.mTimestamp = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); info.mMediaScanned = (cursor.getInt(cursor.getColumnIndexOrThrow(Constants.MEDIA_SCANNED)) != Constants.MEDIA_SCANNED_NOT_SCANNED); if (confirmed) { if (V) Log.v(TAG, "Service handle info " + info.mId + " confirmed"); /* Inbounds transfer get user confirmation, so we start it */ if (confirmUpdated) { if (V) Log.v(TAG, "Service handle info " + info.mId + " confirmation updated"); /* Inbounds transfer user confirmation status changed, update the session server */ int i = findBatchWithTimeStamp(info.mTimestamp); if (i != -1) { BluetoothOppBatch batch = mBatchs.get(i); if (mServerTransfer != null && batch.mId == mServerTransfer.getBatchId()) { mServerTransfer.setConfirmed(); mServerTransfer.confirmStatusChanged(); } //TODO need to think about else } } Loading Loading @@ -857,7 +855,7 @@ public class BluetoothOppService extends Service { mServerTransfer.start(); if (nextBatch.getPendingShare().mConfirm == BluetoothShare.USER_CONFIRMATION_CONFIRMED) { mServerTransfer.setConfirmed(); mServerTransfer.confirmStatusChanged(); } return; } Loading src/com/android/bluetooth/opp/BluetoothOppTransfer.java +4 −4 Original line number Diff line number Diff line Loading @@ -462,7 +462,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch if (V) Log.v(TAG, "processCurrentShare" + mCurrentShare.mId); mSession.addShare(mCurrentShare); if (mCurrentShare.mConfirm == BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED) { setConfirmed(); confirmStatusChanged(); } } Loading @@ -470,7 +470,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch * Set transfer confirmed status. It should only be called for inbound * transfer */ public void setConfirmed() { public void confirmStatusChanged() { /* unblock server session */ final Thread notifyThread = new Thread("Server Unblock thread") { public void run() { Loading @@ -480,7 +480,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch } } }; if (V) Log.v(TAG, "setConfirmed to unblock mSession" + mSession.toString()); if (V) Log.v(TAG, "confirmStatusChanged to unblock mSession" + mSession.toString()); notifyThread.start(); } Loading Loading @@ -711,7 +711,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch if (V) Log.v(TAG, "Transfer continue session for info " + mCurrentShare.mId + " from batch " + mBatch.mId); processCurrentShare(); setConfirmed(); confirmStatusChanged(); } } } Loading Loading
src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -276,7 +276,7 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler implemen boolean needConfirm = true; /** It's not first put if !serverBlocking, so we auto accept it */ if (!mServerBlocking) { if (!mServerBlocking && mAccepted == BluetoothShare.USER_CONFIRMATION_CONFIRMED) { values.put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED); needConfirm = false; Loading
src/com/android/bluetooth/opp/BluetoothOppService.java +8 −10 Original line number Diff line number Diff line Loading @@ -689,7 +689,7 @@ public class BluetoothOppService extends Service { info.mDestination = stringFromCursor(info.mDestination, cursor, BluetoothShare.DESTINATION); int newVisibility = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.VISIBILITY)); boolean confirmed = false; boolean confirmUpdated = false; int newConfirm = cursor.getInt(cursor .getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION)); Loading @@ -702,10 +702,8 @@ public class BluetoothOppService extends Service { info.mVisibility = newVisibility; if (info.mConfirm == BluetoothShare.USER_CONFIRMATION_PENDING && (newConfirm == BluetoothShare.USER_CONFIRMATION_CONFIRMED || newConfirm == BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED || newConfirm == BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED)) { confirmed = true; && newConfirm != BluetoothShare.USER_CONFIRMATION_PENDING) { confirmUpdated = true; } info.mConfirm = cursor.getInt(cursor .getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION)); Loading @@ -723,14 +721,14 @@ public class BluetoothOppService extends Service { info.mTimestamp = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); info.mMediaScanned = (cursor.getInt(cursor.getColumnIndexOrThrow(Constants.MEDIA_SCANNED)) != Constants.MEDIA_SCANNED_NOT_SCANNED); if (confirmed) { if (V) Log.v(TAG, "Service handle info " + info.mId + " confirmed"); /* Inbounds transfer get user confirmation, so we start it */ if (confirmUpdated) { if (V) Log.v(TAG, "Service handle info " + info.mId + " confirmation updated"); /* Inbounds transfer user confirmation status changed, update the session server */ int i = findBatchWithTimeStamp(info.mTimestamp); if (i != -1) { BluetoothOppBatch batch = mBatchs.get(i); if (mServerTransfer != null && batch.mId == mServerTransfer.getBatchId()) { mServerTransfer.setConfirmed(); mServerTransfer.confirmStatusChanged(); } //TODO need to think about else } } Loading Loading @@ -857,7 +855,7 @@ public class BluetoothOppService extends Service { mServerTransfer.start(); if (nextBatch.getPendingShare().mConfirm == BluetoothShare.USER_CONFIRMATION_CONFIRMED) { mServerTransfer.setConfirmed(); mServerTransfer.confirmStatusChanged(); } return; } Loading
src/com/android/bluetooth/opp/BluetoothOppTransfer.java +4 −4 Original line number Diff line number Diff line Loading @@ -462,7 +462,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch if (V) Log.v(TAG, "processCurrentShare" + mCurrentShare.mId); mSession.addShare(mCurrentShare); if (mCurrentShare.mConfirm == BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED) { setConfirmed(); confirmStatusChanged(); } } Loading @@ -470,7 +470,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch * Set transfer confirmed status. It should only be called for inbound * transfer */ public void setConfirmed() { public void confirmStatusChanged() { /* unblock server session */ final Thread notifyThread = new Thread("Server Unblock thread") { public void run() { Loading @@ -480,7 +480,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch } } }; if (V) Log.v(TAG, "setConfirmed to unblock mSession" + mSession.toString()); if (V) Log.v(TAG, "confirmStatusChanged to unblock mSession" + mSession.toString()); notifyThread.start(); } Loading Loading @@ -711,7 +711,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch if (V) Log.v(TAG, "Transfer continue session for info " + mCurrentShare.mId + " from batch " + mBatch.mId); processCurrentShare(); setConfirmed(); confirmStatusChanged(); } } } Loading