/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppService.java | 155 getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI, true, mObserver); in onCreate() 251 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + msg.arg1); 253 updateValues.put(BluetoothShare.URI, msg.obj.toString()); // update 254 updateValues.put(BluetoothShare.MIMETYPE, getContentResolver().getType( 264 Uri contentUri1 = Uri.parse(BluetoothShare.CONTENT_URI + "/" + msg.arg1); 438 Cursor cursor = getContentResolver().query(BluetoothShare.CONTENT_URI, null, null, in run() 439 null, BluetoothShare._ID); in run() 452 int idColumn = cursor.getColumnIndexOrThrow(BluetoothShare._ID); in run() 561 String uriString = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.URI)); in insertShare() 571 cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)), in insertShare() [all …]
|
D | BluetoothOppProvider.java | 162 db.execSQL("CREATE TABLE " + DB_TABLE + "(" + BluetoothShare._ID in createTable() 163 + " INTEGER PRIMARY KEY AUTOINCREMENT," + BluetoothShare.URI + " TEXT, " in createTable() 164 + BluetoothShare.FILENAME_HINT + " TEXT, " + BluetoothShare._DATA + " TEXT, " in createTable() 165 + BluetoothShare.MIMETYPE + " TEXT, " + BluetoothShare.DIRECTION + " INTEGER, " in createTable() 166 + BluetoothShare.DESTINATION + " TEXT, " + BluetoothShare.VISIBILITY in createTable() 167 + " INTEGER, " + BluetoothShare.USER_CONFIRMATION + " INTEGER, " in createTable() 168 + BluetoothShare.STATUS + " INTEGER, " + BluetoothShare.TOTAL_BYTES in createTable() 169 + " INTEGER, " + BluetoothShare.CURRENT_BYTES + " INTEGER, " in createTable() 170 + BluetoothShare.TIMESTAMP + " INTEGER," + Constants.MEDIA_SCANNED in createTable() 236 copyString(BluetoothShare.URI, values, filteredValues); in insert() [all …]
|
D | BluetoothOppNotification.java | 61 static final String status = "(" + BluetoothShare.STATUS + " == '192'" + ")"; 63 static final String visible = "(" + BluetoothShare.VISIBILITY + " IS NULL OR " 64 + BluetoothShare.VISIBILITY + " == '" + BluetoothShare.VISIBILITY_VISIBLE + "'" + ")"; 66 static final String confirm = "(" + BluetoothShare.USER_CONFIRMATION + " == '" 67 + BluetoothShare.USER_CONFIRMATION_CONFIRMED + "' OR " 68 + BluetoothShare.USER_CONFIRMATION + " == '" 69 + BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED + "' OR " 70 + BluetoothShare.USER_CONFIRMATION + " == '" 71 + BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED + "'" + ")"; 73 static final String not_through_handover = "(" + BluetoothShare.USER_CONFIRMATION + " != '" [all …]
|
D | BluetoothOppUtility.java | 86 info.mID = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)); in fillRecord() 87 info.mStatus = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)); in fillRecord() 89 .getColumnIndexOrThrow(BluetoothShare.DIRECTION)); in fillRecord() 91 .getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in fillRecord() 93 .getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)); in fillRecord() 95 .getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); in fillRecord() 97 .getColumnIndexOrThrow(BluetoothShare.DESTINATION)); in fillRecord() 100 .getColumnIndexOrThrow(BluetoothShare._DATA)); in fillRecord() 103 .getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT)); in fillRecord() 109 info.mFileUri = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.URI)); in fillRecord() [all …]
|
D | BluetoothOppTransferHistory.java | 96 if (dir == BluetoothShare.DIRECTION_OUTBOUND) { in onCreate() 98 direction = "(" + BluetoothShare.DIRECTION + " == " + BluetoothShare.DIRECTION_OUTBOUND in onCreate() 106 direction = "(" + BluetoothShare.DIRECTION + " == " + BluetoothShare.DIRECTION_INBOUND in onCreate() 110 String selection = BluetoothShare.STATUS + " >= '200' AND " + direction; in onCreate() 114 + BluetoothShare.VISIBILITY + " IS NULL OR " in onCreate() 115 + BluetoothShare.VISIBILITY + " == '" in onCreate() 116 + BluetoothShare.VISIBILITY_VISIBLE + "')"; in onCreate() 119 final String sortOrder = BluetoothShare.TIMESTAMP + " DESC"; in onCreate() 121 mTransferCursor = managedQuery(BluetoothShare.CONTENT_URI, new String[] { in onCreate() 122 "_id", BluetoothShare.FILENAME_HINT, BluetoothShare.STATUS, in onCreate() [all …]
|
D | BluetoothOppObexServerSession.java | 86 private int mAccepted = BluetoothShare.USER_CONFIRMATION_PENDING; 175 if (mAccepted == BluetoothShare.USER_CONFIRMATION_DENIED) { in onPut() 264 values.put(BluetoothShare.FILENAME_HINT, name); in onPut() 266 values.put(BluetoothShare.TOTAL_BYTES, length); in onPut() 268 values.put(BluetoothShare.MIMETYPE, mimeType); in onPut() 270 values.put(BluetoothShare.DESTINATION, destination); in onPut() 272 values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_INBOUND); in onPut() 273 values.put(BluetoothShare.TIMESTAMP, mTimestamp); in onPut() 276 if (!mServerBlocking && (mAccepted == BluetoothShare.USER_CONFIRMATION_CONFIRMED || in onPut() 277 mAccepted == BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED)) { in onPut() [all …]
|
D | BluetoothOppReceiver.java | 128 values.put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_DENIED); in onReceive() 137 … values.put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_CONFIRMED); in onReceive() 158 if (transInfo.mDirection == BluetoothShare.DIRECTION_INBOUND in onReceive() 159 && BluetoothShare.isStatusSuccess(transInfo.mStatus)) { in onReceive() 177 in.putExtra("direction", BluetoothShare.DIRECTION_OUTBOUND); in onReceive() 184 in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND); in onReceive() 191 in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND); in onReceive() 200 int statusColumn = cursor.getColumnIndexOrThrow(BluetoothShare.STATUS); in onReceive() 202 int visibilityColumn = cursor.getColumnIndexOrThrow(BluetoothShare.VISIBILITY); in onReceive() 205 .getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION); in onReceive() [all …]
|
D | BluetoothOppObexClientSession.java | 264 int status = BluetoothShare.STATUS_SUCCESS; in doSend() 271 status = BluetoothShare.STATUS_CANCELED; in doSend() 276 status = BluetoothShare.STATUS_CONNECTION_ERROR; in doSend() 278 if (status == BluetoothShare.STATUS_SUCCESS) { in doSend() 291 if (status == BluetoothShare.STATUS_SUCCESS) { in doSend() 325 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + mInfo.mId); in processShareInfo() 327 updateValues.put(BluetoothShare.FILENAME_HINT, fileInfo.mFileName); in processShareInfo() 328 updateValues.put(BluetoothShare.TOTAL_BYTES, fileInfo.mLength); in processShareInfo() 329 updateValues.put(BluetoothShare.MIMETYPE, fileInfo.mMimetype); in processShareInfo() 341 int status = BluetoothShare.STATUS_SUCCESS; in sendFile() [all …]
|
D | BluetoothOppTransfer.java | 153 markBatchFailed(BluetoothShare.STATUS_CONNECTION_ERROR); in handleMessage() 178 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage() 220 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage() 246 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage() 268 Intent in = new Intent(BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION); in handleMessage() 279 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + share.mId); in markShareTimeout() 282 .put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_TIMEOUT); in markShareTimeout() 298 if (BluetoothShare.isStatusError(mCurrentShare.mStatus)) { in markBatchFailed() 301 if (mCurrentShare.mDirection == BluetoothShare.DIRECTION_INBOUND in markBatchFailed() 315 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + info.mId); in markBatchFailed() [all …]
|
D | BluetoothOppTransferAdapter.java | 71 int status = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)); in bindView() 72 int dir = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION)); in bindView() 73 if (BluetoothShare.isStatusError(status)) { in bindView() 76 if (dir == BluetoothShare.DIRECTION_OUTBOUND) { in bindView() 86 cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT)); in bindView() 95 int destinationColumnId = cursor.getColumnIndexOrThrow(BluetoothShare.DESTINATION); in bindView() 102 long totalBytes = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in bindView() 103 if (BluetoothShare.isStatusCompleted(status)) { in bindView() 106 if (BluetoothShare.isStatusError(status)) { in bindView() 110 if (dir == BluetoothShare.DIRECTION_INBOUND) { in bindView() [all …]
|
D | BluetoothOppReceiveFileInfo.java | 93 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in generateFileInfo() 97 BluetoothShare.FILENAME_HINT, BluetoothShare.TOTAL_BYTES, BluetoothShare.MIMETYPE in generateFileInfo() 120 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() 125 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_ERROR_NO_SDCARD); in generateFileInfo() 135 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_ERROR_SDCARD_FULL); in generateFileInfo() 141 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() 148 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() 162 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() 175 updateValues.put(BluetoothShare.FILENAME_HINT, displayName); in generateFileInfo() 183 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() [all …]
|
D | BluetoothOppShareInfo.java | 95 if (mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in isReadyToStart() 96 if (mStatus == BluetoothShare.STATUS_PENDING && mUri != null) { in isReadyToStart() 99 } else if (mDirection == BluetoothShare.DIRECTION_INBOUND) { in isReadyToStart() 100 if (mStatus == BluetoothShare.STATUS_PENDING) { in isReadyToStart() 109 if (!BluetoothShare.isStatusCompleted(mStatus)) { in hasCompletionNotification() 112 if (mVisibility == BluetoothShare.VISIBILITY_VISIBLE) { in hasCompletionNotification() 122 if (BluetoothShare.STATUS_RUNNING == mStatus) { in isObsolete()
|
D | BluetoothOppManager.java | 437 values.put(BluetoothShare.URI, fileUri.toString()); in insertMultipleShare() 438 values.put(BluetoothShare.MIMETYPE, contentType); in insertMultipleShare() 439 values.put(BluetoothShare.DESTINATION, mRemoteDevice.getAddress()); in insertMultipleShare() 440 values.put(BluetoothShare.TIMESTAMP, ts); in insertMultipleShare() 442 values.put(BluetoothShare.USER_CONFIRMATION, in insertMultipleShare() 443 BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED); in insertMultipleShare() 446 BluetoothShare.CONTENT_URI, values); in insertMultipleShare() 457 values.put(BluetoothShare.URI, mUri); in insertSingleShare() 458 values.put(BluetoothShare.MIMETYPE, mTypeOfSingleFile); in insertSingleShare() 459 values.put(BluetoothShare.DESTINATION, mRemoteDevice.getAddress()); in insertSingleShare() [all …]
|
D | TestActivity.java | 237 values.put(BluetoothShare.URI, "content://media/external/images/media/" + media); 252 values.put(BluetoothShare.DESTINATION, address); 254 values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_OUTBOUND); 257 values.put(BluetoothShare.TIMESTAMP, ts); 268 Uri contentUri = getContentResolver().insert(BluetoothShare.CONTENT_URI, values); 279 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" 287 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" 295 updateValues.put(BluetoothShare.USER_CONFIRMATION, 296 BluetoothShare.USER_CONFIRMATION_CONFIRMED); 303 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" [all …]
|
D | BluetoothOppIncomingFileConfirmActivity.java | 83 if (!BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION.equals(intent.getAction())) { 123 BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION)); in onCreate() 143 mUpdateValues.put(BluetoothShare.USER_CONFIRMATION, in onClick() 144 BluetoothShare.USER_CONFIRMATION_CONFIRMED); in onClick() 154 mUpdateValues.put(BluetoothShare.USER_CONFIRMATION, in onClick() 155 BluetoothShare.USER_CONFIRMATION_DENIED); in onClick() 166 mUpdateValues.put(BluetoothShare.VISIBILITY, BluetoothShare.VISIBILITY_HIDDEN); in onKeyDown()
|
D | BluetoothOppBatch.java | 139 if (info.mStatus == BluetoothShare.STATUS_RUNNING) { in deleteShare() 140 info.mStatus = BluetoothShare.STATUS_CANCELED; in deleteShare() 141 if (info.mDirection == BluetoothShare.DIRECTION_INBOUND && info.mFilename != null) { in deleteShare() 169 if (info.mDirection == BluetoothShare.DIRECTION_INBOUND && info.mFilename != null) { in cancelBatch() 174 Constants.updateShareStatus(mContext, info.mId, BluetoothShare.STATUS_CANCELED); in cancelBatch() 212 if (share.mStatus == BluetoothShare.STATUS_PENDING) { in getPendingShare()
|
D | BluetoothOppTransferActivity.java | 146 mIsComplete = BluetoothShare.isStatusCompleted(mTransInfo.mStatus); in onCreate() 153 getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI, true, in onCreate() 180 boolean isSuccess = BluetoothShare.isStatusSuccess(mTransInfo.mStatus); in displayWhichDialog() 181 boolean isComplete = BluetoothShare.isStatusCompleted(mTransInfo.mStatus); in displayWhichDialog() 183 if (direction == BluetoothShare.DIRECTION_INBOUND) { in displayWhichDialog() 194 } else if (direction == BluetoothShare.DIRECTION_OUTBOUND) { in displayWhichDialog() 303 if (mTransInfo.mStatus == BluetoothShare.STATUS_ERROR_SDCARD_FULL) { in customizeViewContent() 343 if (BluetoothShare.isStatusError(mTransInfo.mStatus)) { in customizeViewContent() 446 if (!mIsComplete && BluetoothShare.isStatusCompleted(mTransInfo.mStatus) in updateProgressbar()
|
D | Constants.java | 287 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in updateShareStatus() 289 updateValues.put(BluetoothShare.STATUS, status); in updateShareStatus() 299 if (BluetoothShare.isStatusCompleted(status)) { in sendIntentIfCompleted() 300 Intent intent = new Intent(BluetoothShare.TRANSFER_COMPLETED_ACTION); in sendIntentIfCompleted()
|
D | BluetoothShare.java | 44 public final class BluetoothShare implements BaseColumns { class 45 private BluetoothShare() { in BluetoothShare() method in BluetoothShare
|
D | BluetoothOppHandoverReceiver.java | 80 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in onReceive()
|
D | BluetoothOppSendFileInfo.java | 62 null, null, 0, null, BluetoothShare.STATUS_FILE_ERROR);
|