Browse Source

PassCodeManager: fix compilation error with kotlin 1.7.10

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 years ago
parent
commit
45bcd5e33a

+ 1 - 1
app/src/main/java/com/owncloud/android/authentication/PassCodeManager.kt

@@ -121,7 +121,7 @@ class PassCodeManager(private val preferences: AppPreferences, private val clock
             visibleActivitiesCounter--
         }
         val powerMgr = activity.getSystemService(Context.POWER_SERVICE) as PowerManager
-        if ((isPassCodeEnabled() || deviceCredentialsAreEnabled(activity)) && !powerMgr?.isScreenOn) {
+        if ((isPassCodeEnabled() || deviceCredentialsAreEnabled(activity)) && !powerMgr.isScreenOn) {
             activity.moveTaskToBack(true)
         }
     }