/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppProvider.java | 142 db.execSQL("CREATE TABLE " + DB_TABLE + "(" + BluetoothShare._ID in createTable() 143 + " INTEGER PRIMARY KEY AUTOINCREMENT," + BluetoothShare.URI + " TEXT, " in createTable() 144 + BluetoothShare.FILENAME_HINT + " TEXT, " + BluetoothShare._DATA + " TEXT, " in createTable() 145 + BluetoothShare.MIMETYPE + " TEXT, " + BluetoothShare.DIRECTION + " INTEGER, " in createTable() 146 + BluetoothShare.DESTINATION + " TEXT, " + BluetoothShare.VISIBILITY in createTable() 147 + " INTEGER, " + BluetoothShare.USER_CONFIRMATION + " INTEGER, " in createTable() 148 + BluetoothShare.STATUS + " INTEGER, " + BluetoothShare.TOTAL_BYTES in createTable() 149 + " INTEGER, " + BluetoothShare.CURRENT_BYTES + " INTEGER, " in createTable() 150 + BluetoothShare.TIMESTAMP + " INTEGER," + Constants.MEDIA_SCANNED in createTable() 211 copyString(BluetoothShare.URI, values, filteredValues); in insert() [all …]
|
D | BluetoothOppService.java | 152 BluetoothShare.VISIBILITY + "=" + BluetoothShare.VISIBILITY_HIDDEN; 155 BluetoothShare.DIRECTION + "=" + BluetoothShare.DIRECTION_INBOUND + " AND " 156 + BluetoothShare.STATUS + "=" + BluetoothShare.STATUS_SUCCESS + " AND " 160 BluetoothShare.DIRECTION + "=" + BluetoothShare.DIRECTION_INBOUND + " AND " 161 + BluetoothShare.USER_CONFIRMATION + "=" 162 + BluetoothShare.USER_CONFIRMATION_PENDING; 165 "(" + BluetoothShare.STATUS + ">=" + BluetoothShare.STATUS_SUCCESS + " AND " + INVISIBLE 233 getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI, true, mObserver); in start() 271 String dir = info.mDirection == BluetoothShare.DIRECTION_OUTBOUND ? " -> " : " <- "; in dump() 371 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + msg.arg1); [all …]
|
D | BluetoothOppNotification.java | 64 static final String STATUS = "(" + BluetoothShare.STATUS + " == '192'" + ")"; 67 "(" + BluetoothShare.VISIBILITY + " IS NULL OR " + BluetoothShare.VISIBILITY + " == '" 68 + BluetoothShare.VISIBILITY_VISIBLE + "'" + ")"; 70 static final String CONFIRM = "(" + BluetoothShare.USER_CONFIRMATION + " == '" 71 + BluetoothShare.USER_CONFIRMATION_CONFIRMED + "' OR " 72 + BluetoothShare.USER_CONFIRMATION + " == '" 73 + BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED + "' OR " 74 + BluetoothShare.USER_CONFIRMATION + " == '" 75 + BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED + "'" + ")"; 77 static final String NOT_THROUGH_HANDOVER = "(" + BluetoothShare.USER_CONFIRMATION + " != '" [all …]
|
D | BluetoothOppUtility.java | 77 return uri.toString().startsWith(BluetoothShare.CONTENT_URI.toString()); in isBluetoothShareUri() 99 info.mID = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)); in fillRecord() 100 info.mStatus = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)); in fillRecord() 101 info.mDirection = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION)); in fillRecord() 102 info.mTotalBytes = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in fillRecord() 104 cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)); in fillRecord() 105 info.mTimeStamp = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); in fillRecord() 106 info.mDestAddr = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.DESTINATION)); in fillRecord() 108 info.mFileName = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare._DATA)); in fillRecord() 111 cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT)); 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() 113 selection = selection + " AND (" + BluetoothShare.VISIBILITY + " IS NULL OR " in onCreate() 114 + BluetoothShare.VISIBILITY + " == '" + BluetoothShare.VISIBILITY_VISIBLE in onCreate() 118 final String sortOrder = BluetoothShare.TIMESTAMP + " DESC"; in onCreate() 120 mTransferCursor = getContentResolver().query(BluetoothShare.CONTENT_URI, new String[]{ in onCreate() 122 BluetoothShare.FILENAME_HINT, in onCreate() 123 BluetoothShare.STATUS, in onCreate() [all …]
|
D | BluetoothOppObexServerSession.java | 89 private int mAccepted = BluetoothShare.USER_CONFIRMATION_PENDING; 191 if (mAccepted == BluetoothShare.USER_CONFIRMATION_DENIED) { in onPut() 272 values.put(BluetoothShare.FILENAME_HINT, name); in onPut() 273 values.put(BluetoothShare.TOTAL_BYTES, length); in onPut() 274 values.put(BluetoothShare.MIMETYPE, mimeType); in onPut() 275 values.put(BluetoothShare.DESTINATION, destination); in onPut() 276 values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_INBOUND); in onPut() 277 values.put(BluetoothShare.TIMESTAMP, mTimestamp); in onPut() 280 if (!mServerBlocking && (mAccepted == BluetoothShare.USER_CONFIRMATION_CONFIRMED in onPut() 281 || mAccepted == BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED)) { in onPut() [all …]
|
D | BluetoothOppReceiver.java | 108 values.put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_DENIED); in onReceive() 119 values.put(BluetoothShare.USER_CONFIRMATION, in onReceive() 120 BluetoothShare.USER_CONFIRMATION_CONFIRMED); in onReceive() 139 if (transInfo.mDirection == BluetoothShare.DIRECTION_INBOUND in onReceive() 140 && BluetoothShare.isStatusSuccess(transInfo.mStatus)) { in onReceive() 159 in.putExtra("direction", BluetoothShare.DIRECTION_OUTBOUND); in onReceive() 168 in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND); in onReceive() 177 in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND); in onReceive() 188 int visibilityColumn = cursor.getColumnIndexOrThrow(BluetoothShare.VISIBILITY); in onReceive() 191 cursor.getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION); in onReceive() [all …]
|
D | BluetoothOppObexClientSession.java | 307 int status = BluetoothShare.STATUS_SUCCESS; in doSend() 314 status = BluetoothShare.STATUS_CANCELED; in doSend() 319 status = BluetoothShare.STATUS_CONNECTION_ERROR; in doSend() 321 if (status == BluetoothShare.STATUS_SUCCESS) { in doSend() 335 msg.what = (status == BluetoothShare.STATUS_SUCCESS) in doSend() 367 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + mInfo.mId); in processShareInfo() 369 updateValues.put(BluetoothShare.FILENAME_HINT, fileInfo.mFileName); in processShareInfo() 370 updateValues.put(BluetoothShare.TOTAL_BYTES, fileInfo.mLength); in processShareInfo() 371 updateValues.put(BluetoothShare.MIMETYPE, fileInfo.mMimetype); in processShareInfo() 383 int status = BluetoothShare.STATUS_SUCCESS; in sendFile() [all …]
|
D | BluetoothOppTransfer.java | 124 == BluetoothShare.USER_CONFIRMATION_PENDING)) { in onReceive() 220 markBatchFailed(BluetoothShare.STATUS_CONNECTION_ERROR); in handleMessage() 249 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage() 310 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage() 327 markBatchFailed(BluetoothShare.STATUS_UNKNOWN_ERROR); in handleMessage() 340 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage() 364 Intent in = new Intent(BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION); in handleMessage() 375 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + share.mId); in markShareTimeout() 377 updateValues.put(BluetoothShare.USER_CONFIRMATION, in markShareTimeout() 378 BluetoothShare.USER_CONFIRMATION_TIMEOUT); in markShareTimeout() [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() 85 String title = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT)); in bindView() 94 int destinationColumnId = cursor.getColumnIndexOrThrow(BluetoothShare.DESTINATION); in bindView() 101 long totalBytes = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in bindView() 102 if (BluetoothShare.isStatusCompleted(status)) { in bindView() 105 if (BluetoothShare.isStatusError(status)) { in bindView() 109 if (dir == BluetoothShare.DIRECTION_INBOUND) { in bindView() [all …]
|
D | BluetoothOppManager.java | 461 values.put(BluetoothShare.URI, fileUri.toString()); in insertMultipleShare() 472 values.put(BluetoothShare.MIMETYPE, contentType); in insertMultipleShare() 473 values.put(BluetoothShare.DESTINATION, mRemoteDevice.getAddress()); in insertMultipleShare() 474 values.put(BluetoothShare.TIMESTAMP, ts); in insertMultipleShare() 476 values.put(BluetoothShare.USER_CONFIRMATION, in insertMultipleShare() 477 BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED); in insertMultipleShare() 480 mContext.getContentResolver().insert(BluetoothShare.CONTENT_URI, values); in insertMultipleShare() 493 values.put(BluetoothShare.URI, mUri); in insertSingleShare() 494 values.put(BluetoothShare.MIMETYPE, mTypeOfSingleFile); in insertSingleShare() 495 values.put(BluetoothShare.DESTINATION, mRemoteDevice.getAddress()); in insertSingleShare() [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 | TestActivity.java | 238 values.put(BluetoothShare.URI, "content://media/external/images/media/" + media); 253 values.put(BluetoothShare.DESTINATION, address); 255 values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_OUTBOUND); 258 values.put(BluetoothShare.TIMESTAMP, ts); 269 Uri contentUri = getContentResolver().insert(BluetoothShare.CONTENT_URI, values); 282 Uri.parse(BluetoothShare.CONTENT_URI + "/" + mDeleteView.getText().toString()); 291 Uri.parse(BluetoothShare.CONTENT_URI + "/" + mUpdateView.getText().toString()); 298 updateValues.put(BluetoothShare.USER_CONFIRMATION, 299 BluetoothShare.USER_CONFIRMATION_CONFIRMED); 308 Uri.parse(BluetoothShare.CONTENT_URI + "/" + mAckView.getText().toString()); [all …]
|
D | BluetoothOppReceiveFileInfo.java | 92 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in generateFileInfo() 96 BluetoothShare.FILENAME_HINT, BluetoothShare.TOTAL_BYTES, BluetoothShare.MIMETYPE in generateFileInfo() 114 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_ERROR_NO_SDCARD); in generateFileInfo() 120 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() 127 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo() 182 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo()
|
D | BluetoothOppIncomingFileConfirmActivity.java | 81 if (!BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION.equals(intent.getAction())) { 126 new IntentFilter(BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION)); in onCreate() 147 mUpdateValues.put(BluetoothShare.USER_CONFIRMATION, in onClick() 148 BluetoothShare.USER_CONFIRMATION_CONFIRMED); in onClick() 158 mUpdateValues.put(BluetoothShare.USER_CONFIRMATION, in onClick() 159 BluetoothShare.USER_CONFIRMATION_DENIED); in onClick()
|
D | BluetoothOppTransferActivity.java | 145 mIsComplete = BluetoothShare.isStatusCompleted(mTransInfo.mStatus); in onCreate() 152 getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI, true, in onCreate() 181 boolean isSuccess = BluetoothShare.isStatusSuccess(mTransInfo.mStatus); in displayWhichDialog() 182 boolean isComplete = BluetoothShare.isStatusCompleted(mTransInfo.mStatus); in displayWhichDialog() 184 if (direction == BluetoothShare.DIRECTION_INBOUND) { in displayWhichDialog() 195 } else if (direction == BluetoothShare.DIRECTION_OUTBOUND) { in displayWhichDialog() 295 if (mTransInfo.mStatus == BluetoothShare.STATUS_ERROR_SDCARD_FULL) { in customizeViewContent() 340 if (BluetoothShare.isStatusError(mTransInfo.mStatus)) { in customizeViewContent() 426 if (!mIsComplete && BluetoothShare.isStatusCompleted(mTransInfo.mStatus) in updateProgressbar()
|
D | Constants.java | 226 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in updateShareStatus() 228 updateValues.put(BluetoothShare.STATUS, status); in updateShareStatus() 235 if (BluetoothShare.isStatusCompleted(status)) { in sendIntentIfCompleted() 236 Intent intent = new Intent(BluetoothShare.TRANSFER_COMPLETED_ACTION); in sendIntentIfCompleted()
|
D | BluetoothOppBatch.java | 150 if (info.mDirection == BluetoothShare.DIRECTION_INBOUND && info.mUri != null) { in cancelBatch() 157 Constants.updateShareStatus(mContext, info.mId, BluetoothShare.STATUS_CANCELED); in cancelBatch() 195 if (share.mStatus == BluetoothShare.STATUS_PENDING) { in getPendingShare()
|
D | BluetoothShare.java | 44 public final class BluetoothShare implements BaseColumns { class 45 private BluetoothShare() { in BluetoothShare() method in BluetoothShare
|
D | BluetoothOppHandoverReceiver.java | 91 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in onReceive()
|
D | BluetoothOppSendFileInfo.java | 64 new BluetoothOppSendFileInfo(null, null, 0, null, BluetoothShare.STATUS_FILE_ERROR);
|