intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
outNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
mContext, 0, intent, 0));
+ intent = new Intent(Constants.ACTION_COMPLETE_HIDE);
+ intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
+ outNoti.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
outNoti.when = timeStamp;
mNotificationMgr.notify(NOTIFICATION_ID_OUTBOUND, outNoti);
} else {
intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
inNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
mContext, 0, intent, 0));
+ intent = new Intent(Constants.ACTION_COMPLETE_HIDE);
+ intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
+ inNoti.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
inNoti.when = timeStamp;
mNotificationMgr.notify(NOTIFICATION_ID_INBOUND, inNoti);
} else {
int userConfirmationColumn = cursor
.getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION);
int userConfirmation = cursor.getInt(userConfirmationColumn);
- if ((BluetoothShare.isStatusCompleted(status) || (userConfirmation == BluetoothShare.USER_CONFIRMATION_PENDING))
+ if (((userConfirmation == BluetoothShare.USER_CONFIRMATION_PENDING))
&& visibility == BluetoothShare.VISIBILITY_VISIBLE) {
ContentValues values = new ContentValues();
values.put(BluetoothShare.VISIBILITY, BluetoothShare.VISIBILITY_HIDDEN);
}
cursor.close();
}
+ } else if (action.equals(Constants.ACTION_COMPLETE_HIDE)) {
+ if (V) Log.v(TAG, "Receiver ACTION_COMPLETE_HIDE");
+ ContentValues updateValues = new ContentValues();
+ updateValues.put(BluetoothShare.VISIBILITY, BluetoothShare.VISIBILITY_HIDDEN);
+ context.getContentResolver().update(BluetoothShare.CONTENT_URI, updateValues,
+ BluetoothOppNotification.WHERE_COMPLETED, null);
} else if (action.equals(BluetoothShare.TRANSFER_COMPLETED_ACTION)) {
if (V) Log.v(TAG, "Receiver Transfer Complete Intent for " + intent.getData());
public static final String ACTION_LIST = "android.btopp.intent.action.LIST";
/**
- * the intent that gets sent when deleting the notification of a completed
- * transfer
+ * the intent that gets sent when deleting the incoming file confirmation
+ * notification
*/
public static final String ACTION_HIDE = "android.btopp.intent.action.HIDE";
/**
+ * the intent that gets sent when deleting the notifications of outbound and
+ * inbound completed transfer
+ */
+ public static final String ACTION_COMPLETE_HIDE = "android.btopp.intent.action.HIDE_COMPLETE";
+
+ /**
* the intent that gets sent when clicking a incoming file confirm
* notification
*/