Loading android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java +2 −5 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading Loading @@ -610,6 +606,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession { } } } BluetoothOppUtility.cancelNotification(mContext); return status; } Loading android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java +2 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -567,6 +566,7 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler Log.e(TAG, "Error when closing stream after send"); } } BluetoothOppUtility.cancelNotification(mContext); return status; } Loading Loading @@ -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); Loading android/app/src/com/android/bluetooth/opp/BluetoothOppUtility.java +8 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } } Loading
android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java +2 −5 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading Loading @@ -610,6 +606,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession { } } } BluetoothOppUtility.cancelNotification(mContext); return status; } Loading
android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java +2 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -567,6 +566,7 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler Log.e(TAG, "Error when closing stream after send"); } } BluetoothOppUtility.cancelNotification(mContext); return status; } Loading Loading @@ -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); Loading
android/app/src/com/android/bluetooth/opp/BluetoothOppUtility.java +8 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } }