summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/HTTPBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/HTTPBase.cpp')
-rw-r--r--media/libstagefright/HTTPBase.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/media/libstagefright/HTTPBase.cpp b/media/libstagefright/HTTPBase.cpp
index c0ae29d..0d24551 100644
--- a/media/libstagefright/HTTPBase.cpp
+++ b/media/libstagefright/HTTPBase.cpp
@@ -37,7 +37,8 @@ HTTPBase::HTTPBase()
mTotalTransferBytes(0),
mPrevBandwidthMeasureTimeUs(0),
mPrevEstimatedBandWidthKbps(0),
- mBandWidthCollectFreqMs(5000) {
+ mBandWidthCollectFreqMs(5000),
+ mUIDValid(false) {
}
// static
@@ -119,4 +120,19 @@ status_t HTTPBase::setBandwidthStatCollectFreq(int32_t freqMs) {
return OK;
}
+void HTTPBase::setUID(uid_t uid) {
+ mUIDValid = true;
+ mUID = uid;
+}
+
+bool HTTPBase::getUID(uid_t *uid) const {
+ if (!mUIDValid) {
+ return false;
+ }
+
+ *uid = mUID;
+
+ return true;
+}
+
} // namespace android