Speaking as an African-American male I can say I've spoken both for a long time. When I’m around friends and family I speak AAVE and when I’m around ‘judgmental others’ and for business purposes I speak American English.
Code switching is actually when you wander between two or more languages in the scope of a single conversation (which is downright weird to listen to if you speak only one; girl I knew would wander between Russian and English conversing with her mother and I would try like the devil to follow when she started in Russian and eventually realize that it wasn't some weird English words). Based on my own (small) experience with it in English and French it's sometimes easier to find the word you're looking for in the other language; this only happens to me when I'm trying to speak English in public after I've been speaking French for a while tho. The grammar gets ... complicated.