Merge "Fix app switch regression" into pi-dev