Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93caef94 authored by Lixin Yue's avatar Lixin Yue Committed by Michael Chan
Browse files

Remove the number above status icon for Opp transfers

parent b6ee11e6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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>
+8 −38
Original line number Diff line number Diff line
@@ -346,33 +346,18 @@ class BluetoothOppNotification {
        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 @@ class BluetoothOppNotification {
        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) {