diff options
author | Sravan Kumar V <sravankumar@codeaurora.org> | 2015-09-28 11:17:01 +0530 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2016-12-30 06:21:50 +0200 |
commit | 2c8d1f01f6c4e61b95d9f92d34991b437f4e9920 (patch) | |
tree | 5d6e3e875f05a898cfcffd560649eccd8e222acf | |
parent | df193078bfe590e5b1091022e57ec283e35cee16 (diff) | |
download | android_packages_apps_Bluetooth-2c8d1f01f6c4e61b95d9f92d34991b437f4e9920.tar.gz android_packages_apps_Bluetooth-2c8d1f01f6c4e61b95d9f92d34991b437f4e9920.tar.bz2 android_packages_apps_Bluetooth-2c8d1f01f6c4e61b95d9f92d34991b437f4e9920.zip |
Bluetooth-OPP:Reduce Looper time to 100 MS .
This change ensure that Handler will send message after 100 milli
seconds . Otherwise, DUT fails to update sent/receive file count
precisely .
Change-Id: I6c54dadd2a5e3244feca2d847ebcc5474ad44c77
-rw-r--r-- | src/com/android/bluetooth/opp/BluetoothOppNotification.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppNotification.java b/src/com/android/bluetooth/opp/BluetoothOppNotification.java index 8f4e3b526..4d63929d7 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppNotification.java +++ b/src/com/android/bluetooth/opp/BluetoothOppNotification.java @@ -175,7 +175,7 @@ class BluetoothOppNotification { // Buffer other updates. // 2. Update thread will clear mPendingUpdate. // 3. Handler sends a delayed message to self - // 4. Handler checks if there are any more updates after 1 second. + // 4. Handler checks if there are any more updates after 100 milliseconds. // 5. If there is an update, update it else stop. private Handler mHandler = new Handler() { public void handleMessage(Message msg) { @@ -187,10 +187,10 @@ class BluetoothOppNotification { mUpdateNotificationThread = new NotificationUpdateThread(); mUpdateNotificationThread.start(); if (V) Log.v(TAG, "send delay message"); - mHandler.sendMessageDelayed(mHandler.obtainMessage(NOTIFY), 1000); + mHandler.sendMessageDelayed(mHandler.obtainMessage(NOTIFY), 100); } else if (mPendingUpdate > 0) { if (V) Log.v(TAG, "previous thread is not finished yet"); - mHandler.sendMessageDelayed(mHandler.obtainMessage(NOTIFY), 1000); + mHandler.sendMessageDelayed(mHandler.obtainMessage(NOTIFY), 100); } break; } |