Callback startWatchingMode with the right op
... in case the op has a switchOp.
Some ops have a switch-op. This means the mode of this op is not unique
to this op but shared with the switch-op.
E.g. FINE_LOCATIONs switch-op is COARSE_LOCATION.
Before R when you registered a startWatchingMode for FINE_LOCATION the
callbacks actually came for COARSE_LOCATION. Now the callbacks will
actually come for FINE_LOCATION
This is a subtle API change, hence guarded by a target-api change-id.
Bug: 148180766
Test: atest CtsAppOpsTestCases:android.app.appops.cts.ForegroundModeTest
Change-Id: I6bcb6f4876e524da65dd54c1d9f5cf1ce14c396c
2 files changed