Fix kotlin nullable errors in Settings

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
Change-Id: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
Merged-In: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
This commit is contained in:
Colin Cross
2023-08-14 12:29:02 -07:00
parent dc5fd85f24
commit 84f8961e67
8 changed files with 11 additions and 11 deletions

View File

@@ -81,7 +81,7 @@ class FullScreenIntentPermissionPreferenceController(
private fun isPermissionRequested(): Boolean {
val packageInfo = packageManager.getPackageInfo(packageName, GET_PERMISSIONS)
for (requestedPermission in packageInfo.requestedPermissions) {
for (requestedPermission in packageInfo.requestedPermissions.orEmpty()) {
if (USE_FULL_SCREEN_INTENT.equals(requestedPermission)) {
return true
}
@@ -115,4 +115,4 @@ class FullScreenIntentPermissionPreferenceController(
const val KEY_FSI_PERMISSION = "fsi_permission"
const val TAG = "FsiPermPrefController"
}
}
}