shell pm: move context creation to where it's used

If something went wrong with the shell package, it's useful for pm
commands to still work so that a developer is still able to put
things back the way they were.

Test: atest CtsNativeMediaAAudioTestCases --user-type secondary_user
Bug: 159157348
Change-Id: I9d3b4f8f93496a5df2055681bd88c61adc435408
1 file changed