Remove the number above status icon for Opp transfers
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 89e6c06..b0dea34 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -181,7 +181,6 @@
<string name="transfer_clear_dlg_msg">All items will be cleared from the list.</string>
<string name="outbound_noti_title">Bluetooth share: Sent files</string>
<string name="inbound_noti_title">Bluetooth share: Received files</string>
- <string name="noti_title">Bluetooth share</string>
<string name="noti_caption"> %1$s successful, %2$s failed.</string>
<string name="transfer_menu_clear_all">Clear list</string>
diff --git a/src/com/android/bluetooth/opp/BluetoothOppNotification.java b/src/com/android/bluetooth/opp/BluetoothOppNotification.java
index 80d7a72..e72ef3e 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppNotification.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppNotification.java
@@ -346,33 +346,18 @@
cursor.close();
outboundNum = outboundSuccNumber + outboundFailNumber;
- title = mContext.getString(R.string.outbound_noti_title);
- intent = new Intent(Constants.ACTION_OPEN_OUTBOUND_TRANSFER);
- intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
-
// create the outbound notification
- if (mOutNoti == null && outboundNum > 0) {
+ if (outboundNum > 0) {
mOutNoti = new Notification();
mOutNoti.icon = android.R.drawable.stat_sys_upload_done;
+ title = mContext.getString(R.string.outbound_noti_title);
caption = mContext.getString(R.string.noti_caption, outboundSuccNumber,
outboundFailNumber);
+ intent = new Intent(Constants.ACTION_OPEN_OUTBOUND_TRANSFER);
+ intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
mOutNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
mContext, 0, intent, 0));
mOutNoti.when = timeStamp;
- // To make number take effect, must set to 1 when creating the
- // notification
- mOutNoti.number = 1;
- mNotificationMgr.notify(NOTIFICATION_ID_OUTBOUND, mOutNoti);
- }
-
- // update the outbound notification
- if (outboundNum > 0) {
- caption = mContext.getString(R.string.noti_caption, outboundSuccNumber,
- outboundFailNumber);
- mOutNoti.when = timeStamp;
- mOutNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
- mContext, 0, intent, 0));
- mOutNoti.number = outboundNum;
mNotificationMgr.notify(NOTIFICATION_ID_OUTBOUND, mOutNoti);
} else {
if (mNotificationMgr != null && mOutNoti != null) {
@@ -406,33 +391,18 @@
cursor.close();
inboundNum = inboundSuccNumber + inboundFailNumber;
- title = mContext.getString(R.string.inbound_noti_title);
- intent = new Intent(Constants.ACTION_OPEN_INBOUND_TRANSFER);
- intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
-
// create the inbound notification
- if (mInNoti == null && inboundNum > 0) {
+ if (inboundNum > 0) {
mInNoti = new Notification();
mInNoti.icon = android.R.drawable.stat_sys_download_done;
+ title = mContext.getString(R.string.inbound_noti_title);
caption = mContext.getString(R.string.noti_caption, inboundSuccNumber,
inboundFailNumber);
+ intent = new Intent(Constants.ACTION_OPEN_INBOUND_TRANSFER);
+ intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName());
mInNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
mContext, 0, intent, 0));
mInNoti.when = timeStamp;
- // To make number take effect, must set to 1 when creating the
- // notification
- mInNoti.number = 1;
- mNotificationMgr.notify(NOTIFICATION_ID_INBOUND, mInNoti);
- }
-
- // update the inbound notification
- if (inboundNum > 0) {
- caption = mContext.getString(R.string.noti_caption, inboundSuccNumber,
- inboundFailNumber);
- mInNoti.when = timeStamp;
- mInNoti.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(
- mContext, 0, intent, 0));
- mInNoti.number = inboundNum;
mNotificationMgr.notify(NOTIFICATION_ID_INBOUND, mInNoti);
} else {
if (mNotificationMgr != null && mInNoti != null) {