Merge "Fix NPE when deciding whether to defer task stack animation." into pi-dev