Merge "Fix bugs around restoring submenu state after activity teardown/restore"