Set panels after everything is initialized in media dialog

Only change the panels (and focus the caption surface) after the
surface is actually appended and initialized.

Bug: T76074
Change-Id: I3d514f38b5fd9f794c4ff8c44a64f5f3475a84bd
(cherry picked from commit 78b86cd72da1b16994edb86096dc58a332da3b5e)