Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bba209c authored by Colin Cross's avatar Colin Cross Committed by Xin Li
Browse files

Fix kotlin nullable errors in services.permission

Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6687a2caee0e1ab853c080924a5985fb5be71e28)
Merged-In: Iead08db297fa20963df7ee83b19d5ac76d0d4846

Change-Id: Iead08db297fa20963df7ee83b19d5ac76d0d4846
parent 936320c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -931,7 +931,7 @@ class PermissionService(
        isGranted: Boolean
    ) {
        val appOpPolicy = service.getSchemePolicy(UidUri.SCHEME, AppOpUri.SCHEME) as UidAppOpPolicy
        val appOpName = AppOpsManager.permissionToOp(permissionName)
        val appOpName = checkNotNull(AppOpsManager.permissionToOp(permissionName))
        val mode = if (isGranted) AppOpsManager.MODE_ALLOWED else AppOpsManager.MODE_ERRORED
        with(appOpPolicy) { setAppOpMode(packageState.appId, userId, appOpName, mode) }
    }