I just talked to an immigration lawyer about a month ago and he said if you are outside of the US working(flying for a US or foreign carrier) it doesn't count. It only counts if you leave the US on your own will.
The tax portion is a litte bit more complex and I can't explain it.
I hope this helps.