From: Martijn Coenen Date: Tue, 15 May 2012 21:36:06 +0000 (-0700) Subject: Don't MediaScan files received through handover. X-Git-Tag: android-7.1.2_r17~1187^2^2~4^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d5e1472188b7e21123a02339ed8766256aa8f630;p=android-x86%2Fpackages-apps-Bluetooth.git Don't MediaScan files received through handover. Handover providers such as NFC may move the file in the filesystem (out of /bluetooth), hence it's better not to scan them here. Change-Id: Ic374c5ae880cb65e2d8a9ce615115b51fdc29353 --- diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java index 4f68741a..c348e336 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppService.java +++ b/src/com/android/bluetooth/opp/BluetoothOppService.java @@ -865,7 +865,8 @@ public class BluetoothOppService extends Service { private boolean shouldScanFile(int arrayPos) { BluetoothOppShareInfo info = mShares.get(arrayPos); return BluetoothShare.isStatusSuccess(info.mStatus) - && info.mDirection == BluetoothShare.DIRECTION_INBOUND && !info.mMediaScanned; + && info.mDirection == BluetoothShare.DIRECTION_INBOUND && !info.mMediaScanned && + info.mConfirm != BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED; } // Run in a background thread at boot.