  Almost all the X-ray afterglows of gamma-ray bursts (GRBs) observed by the
Swift satellite have a shallow decay phase in the first thousands of seconds.
We show that in an inhomogeneous jet (multiple-subjet or patchy-shell) model
the superposition of the afterglows of off-axis subjets (patchy shells) can
have the shallow decay phase. The necessary condition for obtaining the shallow
decay phase is that gamma-ray bright subjets (patchy shells) should have
gamma-ray efficiency higher than previously estimated, and should be surrounded
by gamma-ray dim subjets (patchy shells) with low gamma-ray efficiency. Our
model predicts that events with dim prompt emission have the conventional
afterglow light curve without the shallow decay phase like GRB 050416A.
