Merge "Further flesh out app ops foreground state." into pi-dev