Home
last modified time | relevance | path

Searched refs:BluetoothShare (Results 1 – 21 of 21) sorted by relevance

/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppProvider.java142 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 …]
DBluetoothOppService.java154 BluetoothShare.VISIBILITY + "=" + BluetoothShare.VISIBILITY_HIDDEN;
157 BluetoothShare.DIRECTION + "=" + BluetoothShare.DIRECTION_INBOUND + " AND "
158 + BluetoothShare.STATUS + "=" + BluetoothShare.STATUS_SUCCESS + " AND "
162 BluetoothShare.DIRECTION + "=" + BluetoothShare.DIRECTION_INBOUND + " AND "
163 + BluetoothShare.USER_CONFIRMATION + "="
164 + BluetoothShare.USER_CONFIRMATION_PENDING;
167 "(" + BluetoothShare.STATUS + ">=" + BluetoothShare.STATUS_SUCCESS + " AND " + INVISIBLE
235 getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI, true, mObserver); in start()
273 String dir = info.mDirection == BluetoothShare.DIRECTION_OUTBOUND ? " -> " : " <- "; in dump()
373 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + msg.arg1);
[all …]
DBluetoothOppNotification.java63 static final String STATUS = "(" + BluetoothShare.STATUS + " == '192'" + ")";
66 "(" + BluetoothShare.VISIBILITY + " IS NULL OR " + BluetoothShare.VISIBILITY + " == '"
67 + BluetoothShare.VISIBILITY_VISIBLE + "'" + ")";
69 static final String CONFIRM = "(" + BluetoothShare.USER_CONFIRMATION + " == '"
70 + BluetoothShare.USER_CONFIRMATION_CONFIRMED + "' OR "
71 + BluetoothShare.USER_CONFIRMATION + " == '"
72 + BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED + "' OR "
73 + BluetoothShare.USER_CONFIRMATION + " == '"
74 + BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED + "'" + ")";
76 static final String NOT_THROUGH_HANDOVER = "(" + BluetoothShare.USER_CONFIRMATION + " != '"
[all …]
DBluetoothOppTransferHistory.java96 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 …]
DBluetoothOppUtility.java78 return uri.toString().startsWith(BluetoothShare.CONTENT_URI.toString()); in isBluetoothShareUri()
100 info.mID = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)); in fillRecord()
101 info.mStatus = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)); in fillRecord()
102 info.mDirection = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION)); in fillRecord()
103 info.mTotalBytes = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in fillRecord()
105 cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)); in fillRecord()
106 info.mTimeStamp = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); in fillRecord()
107 info.mDestAddr = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.DESTINATION)); in fillRecord()
109 info.mFileName = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare._DATA)); in fillRecord()
112 cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT)); in fillRecord()
[all …]
DBluetoothOppObexServerSession.java89 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 …]
DBluetoothOppReceiver.java107 values.put(BluetoothShare.USER_CONFIRMATION, BluetoothShare.USER_CONFIRMATION_DENIED); in onReceive()
118 values.put(BluetoothShare.USER_CONFIRMATION, in onReceive()
119 BluetoothShare.USER_CONFIRMATION_CONFIRMED); in onReceive()
138 if (transInfo.mDirection == BluetoothShare.DIRECTION_INBOUND in onReceive()
139 && BluetoothShare.isStatusSuccess(transInfo.mStatus)) { in onReceive()
158 in.putExtra("direction", BluetoothShare.DIRECTION_OUTBOUND); in onReceive()
167 in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND); in onReceive()
176 in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND); in onReceive()
187 int visibilityColumn = cursor.getColumnIndexOrThrow(BluetoothShare.VISIBILITY); in onReceive()
190 cursor.getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION); in onReceive()
[all …]
DBluetoothOppObexClientSession.java307 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 …]
DBluetoothOppTransfer.java125 == BluetoothShare.USER_CONFIRMATION_PENDING)) { in onReceive()
221 markBatchFailed(BluetoothShare.STATUS_CONNECTION_ERROR); in handleMessage()
250 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage()
311 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage()
328 markBatchFailed(BluetoothShare.STATUS_UNKNOWN_ERROR); in handleMessage()
341 if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { in handleMessage()
365 Intent in = new Intent(BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION); in handleMessage()
376 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + share.mId); in markShareTimeout()
378 updateValues.put(BluetoothShare.USER_CONFIRMATION, in markShareTimeout()
379 BluetoothShare.USER_CONFIRMATION_TIMEOUT); in markShareTimeout()
[all …]
DBluetoothOppTransferAdapter.java71 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 …]
DBluetoothOppReceiveFileInfo.java98 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in generateFileInfo()
102 BluetoothShare.FILENAME_HINT, BluetoothShare.TOTAL_BYTES, BluetoothShare.MIMETYPE in generateFileInfo()
127 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo()
134 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_ERROR_NO_SDCARD); in generateFileInfo()
146 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_ERROR_SDCARD_FULL); in generateFileInfo()
152 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo()
159 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo()
201 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo()
218 updateValues.put(BluetoothShare.FILENAME_HINT, displayName); in generateFileInfo()
228 return new BluetoothOppReceiveFileInfo(BluetoothShare.STATUS_FILE_ERROR); in generateFileInfo()
[all …]
DBluetoothOppManager.java461 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 …]
DBluetoothOppShareInfo.java95 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()
DTestActivity.java238 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 …]
DBluetoothOppIncomingFileConfirmActivity.java82 if (!BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION.equals(intent.getAction())) {
130 new IntentFilter(BluetoothShare.USER_CONFIRMATION_TIMEOUT_ACTION)); in onCreate()
151 mUpdateValues.put(BluetoothShare.USER_CONFIRMATION, in onClick()
152 BluetoothShare.USER_CONFIRMATION_CONFIRMED); in onClick()
162 mUpdateValues.put(BluetoothShare.USER_CONFIRMATION, in onClick()
163 BluetoothShare.USER_CONFIRMATION_DENIED); in onClick()
DBluetoothOppTransferActivity.java149 mIsComplete = BluetoothShare.isStatusCompleted(mTransInfo.mStatus); in onCreate()
156 getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI, true, in onCreate()
185 boolean isSuccess = BluetoothShare.isStatusSuccess(mTransInfo.mStatus); in displayWhichDialog()
186 boolean isComplete = BluetoothShare.isStatusCompleted(mTransInfo.mStatus); in displayWhichDialog()
188 if (direction == BluetoothShare.DIRECTION_INBOUND) { in displayWhichDialog()
199 } else if (direction == BluetoothShare.DIRECTION_OUTBOUND) { in displayWhichDialog()
310 if (mTransInfo.mStatus == BluetoothShare.STATUS_ERROR_SDCARD_FULL) { in customizeViewContent()
355 if (BluetoothShare.isStatusError(mTransInfo.mStatus)) { in customizeViewContent()
468 if (!mIsComplete && BluetoothShare.isStatusCompleted(mTransInfo.mStatus) in updateProgressbar()
DConstants.java226 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()
DBluetoothOppBatch.java153 if (info.mDirection == BluetoothShare.DIRECTION_INBOUND && info.mFilename != null) { in cancelBatch()
160 Constants.updateShareStatus(mContext, info.mId, BluetoothShare.STATUS_CANCELED); in cancelBatch()
198 if (share.mStatus == BluetoothShare.STATUS_PENDING) { in getPendingShare()
DBluetoothShare.java44 public final class BluetoothShare implements BaseColumns { class
45 private BluetoothShare() { in BluetoothShare() method in BluetoothShare
DBluetoothOppHandoverReceiver.java90 Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); in onReceive()
DBluetoothOppSendFileInfo.java64 new BluetoothOppSendFileInfo(null, null, 0, null, BluetoothShare.STATUS_FILE_ERROR);