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

Commit bb5644e3 authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "OPP: Clear Ongoing Notification after transfer complete." am: ef8b16c1 am: a89b3eb9

am: 517c83a2

Change-Id: Ie52d7961c1a9e257f66c7da036c54d6a885fa438
parents fa27f249 517c83a2
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@

package com.android.bluetooth.opp;

import android.app.NotificationManager;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
@@ -113,10 +112,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
                }
            }
        }
        NotificationManager nm =
                (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
        nm.cancel(BluetoothOppNotification.NOTIFICATION_ID_PROGRESS);

        BluetoothOppUtility.cancelNotification(mContext);
        mCallback = null;
    }

@@ -610,6 +606,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
                    }
                }
            }
            BluetoothOppUtility.cancelNotification(mContext);
            return status;
        }

+2 −6
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@

package com.android.bluetooth.opp;

import android.app.NotificationManager;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
@@ -567,6 +566,7 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler
                Log.e(TAG, "Error when closing stream after send");
            }
        }
        BluetoothOppUtility.cancelNotification(mContext);
        return status;
    }

@@ -660,11 +660,7 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler
            }
            mServerSocket.prepareForNewConnect();
        }

        NotificationManager nm =
                (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
        nm.cancel(BluetoothOppNotification.NOTIFICATION_ID_PROGRESS);

        BluetoothOppUtility.cancelNotification(mContext);
        /* onClose could happen even before start() where mCallback is set */
        if (mCallback != null) {
            Message msg = Message.obtain(mCallback);
+8 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@

package com.android.bluetooth.opp;

import android.app.NotificationManager;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.ActivityNotFoundException;
@@ -410,4 +411,11 @@ public class BluetoothOppUtility {
            return false;
        }
    }

    protected static void cancelNotification(Context ctx) {
        NotificationManager nm = (NotificationManager) ctx
                .getSystemService(Context.NOTIFICATION_SERVICE);
        nm.cancel(BluetoothOppNotification.NOTIFICATION_ID_PROGRESS);
    }

}