Rename dump methods to dumpState
The dump methods shadow the IBinder dump method. The warnings were being
hidden by the use of -isystem to include frameworks/native/include.
Bug: 31752268
Test: m -j
Merged-in: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
Change-Id: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
diff --git a/include/gui/BufferQueueConsumer.h b/include/gui/BufferQueueConsumer.h
index 8ec0546..e2bafec 100644
--- a/include/gui/BufferQueueConsumer.h
+++ b/include/gui/BufferQueueConsumer.h
@@ -144,7 +144,7 @@
virtual status_t discardFreeBuffers() override;
// dump our state in a String
- virtual void dump(String8& result, const char* prefix) const;
+ virtual void dumpState(String8& result, const char* prefix) const;
// Functions required for backwards compatibility.
// These will be modified/renamed in IGraphicBufferConsumer and will be
diff --git a/include/gui/BufferQueueCore.h b/include/gui/BufferQueueCore.h
index 1226feb..4e54ddb 100644
--- a/include/gui/BufferQueueCore.h
+++ b/include/gui/BufferQueueCore.h
@@ -86,7 +86,7 @@
private:
// Dump our state in a string
- void dump(String8& result, const char* prefix) const;
+ void dumpState(String8& result, const char* prefix) const;
// getMinUndequeuedBufferCountLocked returns the minimum number of buffers
// that must remain in a state other than DEQUEUED. The async parameter
diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h
index 0490c3c..62b316c 100644
--- a/include/gui/ConsumerBase.h
+++ b/include/gui/ConsumerBase.h
@@ -63,11 +63,11 @@
// log messages.
void setName(const String8& name);
- // dump writes the current state to a string. Child classes should add
+ // dumpState writes the current state to a string. Child classes should add
// their state to the dump by overriding the dumpLocked method, which is
// called by these methods after locking the mutex.
- void dump(String8& result) const;
- void dump(String8& result, const char* prefix) const;
+ void dumpState(String8& result) const;
+ void dumpState(String8& result, const char* prefix) const;
// setFrameAvailableListener sets the listener object that will be notified
// when a new frame becomes available.
diff --git a/include/gui/IGraphicBufferConsumer.h b/include/gui/IGraphicBufferConsumer.h
index 3b10d78..dc17944 100644
--- a/include/gui/IGraphicBufferConsumer.h
+++ b/include/gui/IGraphicBufferConsumer.h
@@ -278,7 +278,7 @@
virtual status_t discardFreeBuffers() = 0;
// dump state into a string
- virtual void dump(String8& result, const char* prefix) const = 0;
+ virtual void dumpState(String8& result, const char* prefix) const = 0;
public:
DECLARE_META_INTERFACE(GraphicBufferConsumer);
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp
index 73d2042..9f3018a 100644
--- a/libs/gui/BufferQueueConsumer.cpp
+++ b/libs/gui/BufferQueueConsumer.cpp
@@ -732,7 +732,7 @@
return NO_ERROR;
}
-void BufferQueueConsumer::dump(String8& result, const char* prefix) const {
+void BufferQueueConsumer::dumpState(String8& result, const char* prefix) const {
const IPCThreadState* ipc = IPCThreadState::self();
const pid_t pid = ipc->getCallingPid();
const uid_t uid = ipc->getCallingUid();
@@ -743,7 +743,7 @@
"from pid=%d, uid=%d\n", pid, uid);
android_errorWriteWithInfoLog(0x534e4554, "27046057", uid, NULL, 0);
} else {
- mCore->dump(result, prefix);
+ mCore->dumpState(result, prefix);
}
}
diff --git a/libs/gui/BufferQueueCore.cpp b/libs/gui/BufferQueueCore.cpp
index c4714e3..d610971 100644
--- a/libs/gui/BufferQueueCore.cpp
+++ b/libs/gui/BufferQueueCore.cpp
@@ -113,7 +113,7 @@
BufferQueueCore::~BufferQueueCore() {}
-void BufferQueueCore::dump(String8& result, const char* prefix) const {
+void BufferQueueCore::dumpState(String8& result, const char* prefix) const {
Mutex::Autolock lock(mMutex);
String8 fifo;
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp
index 65e4fee..3cf3078 100644
--- a/libs/gui/ConsumerBase.cpp
+++ b/libs/gui/ConsumerBase.cpp
@@ -254,11 +254,11 @@
return mConsumer->discardFreeBuffers();
}
-void ConsumerBase::dump(String8& result) const {
- dump(result, "");
+void ConsumerBase::dumpState(String8& result) const {
+ dumpState(result, "");
}
-void ConsumerBase::dump(String8& result, const char* prefix) const {
+void ConsumerBase::dumpState(String8& result, const char* prefix) const {
Mutex::Autolock _l(mMutex);
dumpLocked(result, prefix);
}
@@ -267,7 +267,7 @@
result.appendFormat("%smAbandoned=%d\n", prefix, int(mAbandoned));
if (!mAbandoned) {
- mConsumer->dump(result, prefix);
+ mConsumer->dumpState(result, prefix);
}
}
diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp
index c8eff00..6a964c8 100644
--- a/libs/gui/IGraphicBufferConsumer.cpp
+++ b/libs/gui/IGraphicBufferConsumer.cpp
@@ -302,7 +302,7 @@
return result;
}
- virtual void dump(String8& result, const char* prefix) const {
+ virtual void dumpState(String8& result, const char* prefix) const {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
data.writeString8(result);
@@ -480,7 +480,7 @@
CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
String8 result = data.readString8();
String8 prefix = data.readString8();
- static_cast<IGraphicBufferConsumer*>(this)->dump(result, prefix);
+ static_cast<IGraphicBufferConsumer*>(this)->dumpState(result, prefix);
reply->writeString8(result);
return NO_ERROR;
}
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index 7368d77..18c7945 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -240,7 +240,7 @@
#endif
void FramebufferSurface::dumpAsString(String8& result) const {
- ConsumerBase::dump(result);
+ ConsumerBase::dumpState(result);
}
void FramebufferSurface::dumpLocked(String8& result, const char* prefix) const
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c60e99b..4b21004 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2375,7 +2375,7 @@
mQueuedFrames, mRefreshPending);
if (mSurfaceFlingerConsumer != 0) {
- mSurfaceFlingerConsumer->dump(result, " ");
+ mSurfaceFlingerConsumer->dumpState(result, " ");
}
}