Merge "libgui: reset buffer count to max slots instead of returning BAD_VALUE." into android-15