diff options
-rw-r--r-- | media/libstagefright/NuHTTPDataSource.cpp | 11 | ||||
-rw-r--r-- | media/libstagefright/include/NuHTTPDataSource.h | 1 | ||||
-rw-r--r-- | services/jni/com_android_server_UsbService.cpp | 2 |
3 files changed, 1 insertions, 13 deletions
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp index 62fb732..bee0d5e 100644 --- a/media/libstagefright/NuHTTPDataSource.cpp +++ b/media/libstagefright/NuHTTPDataSource.cpp @@ -100,7 +100,6 @@ NuHTTPDataSource::NuHTTPDataSource(uint32_t flags) mNumBandwidthHistoryItems(0), mTotalTransferTimeUs(0), mTotalTransferBytes(0), - mPrevBandwidthMeasureTimeUs(0), mDecryptHandle(NULL), mDrmManagerClient(NULL) { } @@ -535,16 +534,6 @@ void NuHTTPDataSource::addBandwidthMeasurement_l( mTotalTransferBytes -= entry->mNumBytes; mBandwidthHistory.erase(mBandwidthHistory.begin()); --mNumBandwidthHistoryItems; - int64_t timeNowUs = ALooper::GetNowUs(); - if (timeNowUs - mPrevBandwidthMeasureTimeUs > 2000000LL) { - if (mPrevBandwidthMeasureTimeUs != 0) { - double estimatedBandwidth = - ((double)mTotalTransferBytes * 8E3 / mTotalTransferTimeUs); - LOGI("estimated avg bandwidth is %8.2f kbps in the past %lld us", - estimatedBandwidth, timeNowUs - mPrevBandwidthMeasureTimeUs); - } - mPrevBandwidthMeasureTimeUs = timeNowUs; - } } } diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h index 0d68234..2569568 100644 --- a/media/libstagefright/include/NuHTTPDataSource.h +++ b/media/libstagefright/include/NuHTTPDataSource.h @@ -97,7 +97,6 @@ private: size_t mNumBandwidthHistoryItems; int64_t mTotalTransferTimeUs; size_t mTotalTransferBytes; - int64_t mPrevBandwidthMeasureTimeUs; DecryptHandle *mDecryptHandle; DrmManagerClient *mDrmManagerClient; diff --git a/services/jni/com_android_server_UsbService.cpp b/services/jni/com_android_server_UsbService.cpp index 6aeede2..93f23c3 100644 --- a/services/jni/com_android_server_UsbService.cpp +++ b/services/jni/com_android_server_UsbService.cpp @@ -135,7 +135,7 @@ static int usb_device_removed(const char *devname, void* client_data) { jobject thiz = (jobject)client_data; jstring deviceName = env->NewStringUTF(devname); - env->CallVoidMethod(thiz, method_usbDeviceRemoved, env->NewStringUTF(devname)); + env->CallVoidMethod(thiz, method_usbDeviceRemoved, deviceName); env->DeleteLocalRef(deviceName); checkAndClearExceptionFromCallback(env, __FUNCTION__); return 0; |