summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/opp
diff options
context:
space:
mode:
authorJuffin Alex Varghese <jalex@codeaurora.org>2013-09-28 16:07:43 +0530
committerLinux Build Service Account <lnxbuild@localhost>2013-10-31 19:00:29 -0600
commit3fa8c4cb0f7da09791c0f929e857b0b7f0404c53 (patch)
tree5fdd6ba34d5c8ec252f2d56c23ba6dba9283ac35 /src/com/android/bluetooth/opp
parenta3da9b9e1f695239046983cd9dbe6ea353b2b10d (diff)
downloadandroid_packages_apps_Bluetooth-3fa8c4cb0f7da09791c0f929e857b0b7f0404c53.tar.gz
android_packages_apps_Bluetooth-3fa8c4cb0f7da09791c0f929e857b0b7f0404c53.tar.bz2
android_packages_apps_Bluetooth-3fa8c4cb0f7da09791c0f929e857b0b7f0404c53.zip
Bluetooth: Update notification while BT is turning OFF
Change will update notification while BT is turning OFF. Otherwise, when BT is turning OFF if Update notification thread is missed inbound/outbound file transfer status, notification will not properly updated. CRs-Fixed: 550485 Change-Id: I0752bcddcf218726c8564d26da7bc7c86a0005fd (cherry picked from commit 75c26f304d79712f9346e2a1d4dcb694f852a7ea) (cherry picked from commit a6c8f1867c02d0daeabd7c122ffa4ece45a5d748) (cherry picked from commit 1477bde1f1306852870fc02258503722dca945a1)
Diffstat (limited to 'src/com/android/bluetooth/opp')
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppNotification.java10
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppService.java1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppNotification.java b/src/com/android/bluetooth/opp/BluetoothOppNotification.java
index 46482d3c2..1b663220c 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppNotification.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppNotification.java
@@ -154,6 +154,16 @@ class BluetoothOppNotification {
}
}
+ public void updateNotifier() {
+ if (V) Log.v(TAG, "updateNotifier while BT is Turning OFF");
+ synchronized (BluetoothOppNotification.this) {
+ updateActiveNotification();
+ mUpdateCompleteNotification = true;
+ updateCompletedNotification();
+ updateIncomingFileConfirmNotification();
+ }
+ }
+
private static final int NOTIFY = 0;
// Use 1 second timer to limit notification frequency.
// 1. On the first notification, create the update thread.
diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java
index e7eb2568a..3a2702ca3 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppService.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppService.java
@@ -367,6 +367,7 @@ public class BluetoothOppService extends Service {
break;
case BluetoothAdapter.STATE_TURNING_OFF:
if (V) Log.v(TAG, "Receiver DISABLED_ACTION ");
+ mNotifier.updateNotifier();
//FIX: Don't block main thread
/*
mSocketListener.stop();