summaryrefslogtreecommitdiffstats
path: root/libs/utils/RefBase.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-02-23 15:23:13 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-23 15:23:13 -0800
commit7f97c4ef12263a70a5c9ee7cd16f194c0240e658 (patch)
treeb0ca0631106dac07c5a9aa0423f4b1cc9652fe87 /libs/utils/RefBase.cpp
parent17f49e4f91c04290721dc029b73b9a430f5298d5 (diff)
parenta688b574d294faae5f56224908b40856c5045aac (diff)
downloadframeworks_base-7f97c4ef12263a70a5c9ee7cd16f194c0240e658.zip
frameworks_base-7f97c4ef12263a70a5c9ee7cd16f194c0240e658.tar.gz
frameworks_base-7f97c4ef12263a70a5c9ee7cd16f194c0240e658.tar.bz2
Merge "Remove RefBase.h dependency on TextOutput.h"
Diffstat (limited to 'libs/utils/RefBase.cpp')
-rw-r--r--libs/utils/RefBase.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index 0bd1af4..f934eec 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -23,6 +23,7 @@
#include <utils/KeyedVector.h>
#include <utils/Log.h>
#include <utils/threads.h>
+#include <utils/TextOutput.h>
#include <stdlib.h>
#include <stdio.h>
@@ -530,5 +531,20 @@ bool RefBase::onIncStrongAttempted(uint32_t flags, const void* id)
void RefBase::onLastWeakRef(const void* /*id*/)
{
}
-
+
+// ---------------------------------------------------------------------------
+
+TextOutput& printStrongPointer(TextOutput& to, const void* val)
+{
+ to << "sp<>(" << val << ")";
+ return to;
+}
+
+TextOutput& printWeakPointer(TextOutput& to, const void* val)
+{
+ to << "wp<>(" << val << ")";
+ return to;
+}
+
+
}; // namespace android