Make perm policy sve ready for additional usages

We want to use the permission policy services for other things than
restriction of permissions. Hence factor out the restriction code from
the framework.

Also add some comments

Test: atest CtsAppOpsTestCases:android.app.appops.cts.AppOpsTest
            CtsPermission2TestCases:android.permission2.cts.RestrictedPermissionsTest
Bug: 124731615
Change-Id: Ic32f2097af805c3f06dd9cf625b3160f62a576b2
1 file changed