From 4d7c1ce651bd5e283e694fa34641e1dc080613c0 Mon Sep 17 00:00:00 2001 From: Iliyan Malchev Date: Thu, 14 Apr 2011 16:54:38 -0700 Subject: frameworks/base: make the ANativeWindow query() method const query() does not modify the object's data, so it needs to be a const method Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f Signed-off-by: Iliyan Malchev --- libs/gui/Surface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/gui/Surface.cpp') diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index 44d9b4b4d329..812bd6ab2d57 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -536,9 +536,9 @@ int Surface::queueBuffer(ANativeWindow* window, return self->queueBuffer(buffer); } -int Surface::query(ANativeWindow* window, +int Surface::query(const ANativeWindow* window, int what, int* value) { - Surface* self = getSelf(window); + const Surface* self = getSelf(window); return self->query(what, value); } @@ -697,7 +697,7 @@ int Surface::queueBuffer(android_native_buffer_t* buffer) return err; } -int Surface::query(int what, int* value) +int Surface::query(int what, int* value) const { switch (what) { case NATIVE_WINDOW_WIDTH: -- cgit v1.2.3-59-g8ed1b