pulling changes from aospa-legacy