getDrawingCache()
was never meant to be used by a View itself. It is managed by the parent. The reason why the flag is not set when the View is hardware accelerated is because the "drawing cache" takes on a different meaning with hardware acceleration. It is used to control the lifecycle of display lists. Even if the flag was set when you'd want it, you wouldn't get the behavior you want.
There are two solutions here: create your own bitmap or better yet, just enable the drawing cache on your View and don't call canvas.drawBitmap(getDrawingCache(), ...)
from onDraw()
. The parent will do it for you anyway!