I have tried on Samsung galaxy j1 (android 4.4.4) and Sony xperia something (android 7.0). On J1 those lines actually caused some flickering.
I assume that startCapture function’s surfaceCreated sets surfaceView invisible and that it stays like that.