pulling changes from legacy AOSPA

review commits