|
@@ -13,6 +13,7 @@ import android.app.KeyguardManager
|
|
import android.content.Context
|
|
import android.content.Context
|
|
import android.os.Bundle
|
|
import android.os.Bundle
|
|
import android.util.Log
|
|
import android.util.Log
|
|
|
|
+import android.view.View
|
|
import androidx.activity.result.ActivityResult
|
|
import androidx.activity.result.ActivityResult
|
|
import androidx.activity.result.contract.ActivityResultContracts
|
|
import androidx.activity.result.contract.ActivityResultContracts
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
@@ -21,6 +22,7 @@ import autodagger.AutoInjector
|
|
import com.nextcloud.talk.R
|
|
import com.nextcloud.talk.R
|
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
|
import com.nextcloud.talk.databinding.ActivityLockedBinding
|
|
import com.nextcloud.talk.databinding.ActivityLockedBinding
|
|
|
|
+import com.nextcloud.talk.utils.BrandingUtils
|
|
import com.nextcloud.talk.utils.SecurityUtils
|
|
import com.nextcloud.talk.utils.SecurityUtils
|
|
import com.nextcloud.talk.utils.preferences.AppPreferences
|
|
import com.nextcloud.talk.utils.preferences.AppPreferences
|
|
import java.util.concurrent.Executor
|
|
import java.util.concurrent.Executor
|
|
@@ -55,6 +57,7 @@ class LockedActivity : AppCompatActivity() {
|
|
|
|
|
|
override fun onResume() {
|
|
override fun onResume() {
|
|
super.onResume()
|
|
super.onResume()
|
|
|
|
+ hideLogoForBrandedClients()
|
|
|
|
|
|
binding.unlockContainer.setOnClickListener {
|
|
binding.unlockContainer.setOnClickListener {
|
|
checkIfWeAreSecure()
|
|
checkIfWeAreSecure()
|
|
@@ -62,6 +65,12 @@ class LockedActivity : AppCompatActivity() {
|
|
checkIfWeAreSecure()
|
|
checkIfWeAreSecure()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private fun hideLogoForBrandedClients() {
|
|
|
|
+ if (!BrandingUtils.isOriginalNextcloudClient(applicationContext)) {
|
|
|
|
+ binding.appLogo.visibility = View.GONE
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private fun checkIfWeAreSecure() {
|
|
private fun checkIfWeAreSecure() {
|
|
val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager?
|
|
val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager?
|
|
if (keyguardManager?.isKeyguardSecure == true && appPreferences.isScreenLocked) {
|
|
if (keyguardManager?.isKeyguardSecure == true && appPreferences.isScreenLocked) {
|