summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-02-10 16:18:36 -0800
committerJamie Gennis <jgennis@google.com>2011-02-10 16:18:36 -0800
commitc86d904b71be950ad973d803d1a19c6cd13be669 (patch)
treebff2e5ca7e0e4972dab6da13f721ab79309a2242 /services
parent58c9d4726ebf3165b0dbbcebb1130dfc5502bfe9 (diff)
downloadframeworks_base-c86d904b71be950ad973d803d1a19c6cd13be669.zip
frameworks_base-c86d904b71be950ad973d803d1a19c6cd13be669.tar.gz
frameworks_base-c86d904b71be950ad973d803d1a19c6cd13be669.tar.bz2
Prevent SurfaceFlinger from using layer token 31.
Bug: 2964479 Change-Id: I81e948924bff35b8b300d409f2c09f3779bcdeec
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 4876946..4b3235d 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2427,7 +2427,7 @@ ssize_t UserClient::getTokenForSurface(const sp<ISurface>& sur) const
}
break;
}
- if (++name > 31)
+ if (++name >= SharedBufferStack::NUM_LAYERS_MAX)
name = NO_MEMORY;
} while(name >= 0);