  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 ~10^2 up to ~10^5 seconds. Based on the assumption that these tails
and flares are of internal shock 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/flare-tails in 22 GRB XRT light curves. Our results show
that the t0 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 ~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.
