The X-ray light curves of many gamma-ray bursts ( GRBs ) observed by the Swift X-Ray Telescope ( XRT ) have a very steep-decay component ( tail ) following the prompt gamma-rays in the early phase and have some erratic flares occurring at a time from \sim 10 ^ { 2 } up to \sim 10 ^ { 5 } seconds . Based on the assumption that these prompt emission tails and flares are of “ internal ” origin and that their decline behaviors are dominated by the curvature effect of the fireball , we present a self-consistency test for this scenario with a sample of 36 prompt-emission-tails/flares in 22 GRB XRT light curves . The curvature effect suggests that the temporal decay slope of the late steep-decay part of the light curves is \alpha = 2 + \beta , where \beta is the X-ray spectral index . We derive the zero time ( t _ { 0 } ) for each steep decay component by fitting the light curves with the constraint of \alpha = 2 + \beta . Our results show that the t _ { 0 } ’ s of the prompt emission tails and the tails of well-separated flares are usually at the rising segment of the last pulse of the prompt emission or the corresponding X-ray flare , being self-consistent with the expectation of the internal dissipation models for the prompt emission and X-ray flares . Our results indicate that each X-ray flare forms a distinct new episode of central engine activity and the GRB central engine remains active after the prompt emission is over , sometimes up to \sim 1 day after the GRB trigger ( e.g . GRB 050502B & GRB 050724 ) . This challenges the conventional central engine models and calls for new ideas to re-start the central engine . We further show that the on-set time of the late central engine activity does not depend on the GRB duration . We also identify a minority group of GRBs whose combined BAT-XRT light curves are smoothly connected without an abrupt transition between the prompt emission and the afterglow . These GRBs may have an external origin for both the prompt emission and the afterglow .