From the description when you caught him looking at you and he looked away, I would have said there was a chance he did like you (even if it was just tiny bit for a short time).
However from bit about him smiling to himself, I'd say he clocked you looking at him, and he probably thinks "yep, she still likes me". From a guys point of view, knowing a girl likes him can be an ego boost (even if you don't fancy them, yourself)... without wanting to sound at all unpleasant, it's like he knows if thing ever got bad, he's still got that option.