PowerManagerService: Do not hold lock for the duration of PowerHal call

Make getPowerHal return a local copy of sp<IPower> which
can be used to do PowerHAL calls without holding gPowerHal mutex.

Bug: 69475681
Test: Do powerhint with loop of adb shell "setprop ctl.restart POWERHAL_SERVICE"
Change-Id: I8d538de11a5b2347b554b64cc26aad2f3ce5d801
2 files changed