From 2c8d1f01f6c4e61b95d9f92d34991b437f4e9920 Mon Sep 17 00:00:00 2001 From: Sravan Kumar V Date: Mon, 28 Sep 2015 11:17:01 +0530 Subject: 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 --- src/com/android/bluetooth/opp/BluetoothOppNotification.java | 6 +++--- 1 file 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; } -- cgit v1.2.3