I know this is an old question, but I came across this now and had to take additional steps to remove the back arrow.
So in addition to this part of the code, as indicated, the correct answer
getActionBar().setDisplayHomeAsUpEnabled(false);
You will also need to remove the parent-child relationship in the AndroidManifest.xml file. Your activity should not have the following entry
android:parentActivityName
May help someone else who stumbles over it.
source share