Make sure we're locked

Before calling a method ending with LPw, we need to have the mPackages lock.
Make sure we do that.

Also, ditch the iterator for traversing an ArraySet.

Bug: 29356333
Change-Id: I67df971f2961b577f31153cef46fb153458d6965
1 file changed