Fix a bug that onOpChanged callbacks are not called.

For a newly installed app, evalForegroundOps is not called when the
app's location permission is while in use. Also, uidState was committed
before comparing with the pending state.

Bug: 129093959, 126269233
Test: Manual, atest android.app.appops.cts.AppOpsTest
Change-Id: Ib9d209351e172275e891975a1de342a1599f98c3
1 file changed