mirror of https://github.com/Corewala/Buran
Hide update checks if installed from repository
This commit is contained in:
parent
76145f80d5
commit
0b97d239c4
|
@ -185,10 +185,11 @@ class GemActivity : AppCompatActivity() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val isSideLoaded = packageManager.getInstallerPackageName(BuildConfig.APPLICATION_ID).isNullOrEmpty()
|
||||||
if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean(
|
if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean(
|
||||||
"check_for_updates",
|
"check_for_updates",
|
||||||
false
|
false
|
||||||
)) {
|
) and isSideLoaded) {
|
||||||
val updates = BuranUpdates()
|
val updates = BuranUpdates()
|
||||||
val latestVersion = updates.getLatestVersion()
|
val latestVersion = updates.getLatestVersion()
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import android.view.inputmethod.EditorInfo
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.biometric.BiometricPrompt
|
import androidx.biometric.BiometricPrompt
|
||||||
import androidx.preference.*
|
import androidx.preference.*
|
||||||
|
import corewala.buran.BuildConfig
|
||||||
import corewala.buran.Buran
|
import corewala.buran.Buran
|
||||||
import corewala.buran.R
|
import corewala.buran.R
|
||||||
import corewala.buran.io.keymanager.BuranBiometricManager
|
import corewala.buran.io.keymanager.BuranBiometricManager
|
||||||
|
@ -98,6 +99,12 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
|
||||||
checkForUpdates.title = getString(R.string.check_for_updates)
|
checkForUpdates.title = getString(R.string.check_for_updates)
|
||||||
appCategory.addPreference(checkForUpdates)
|
appCategory.addPreference(checkForUpdates)
|
||||||
|
|
||||||
|
val isSideLoaded = context.packageManager.getInstallerPackageName(BuildConfig.APPLICATION_ID).isNullOrEmpty()
|
||||||
|
checkForUpdates.isVisible = isSideLoaded
|
||||||
|
if(!isSideLoaded){
|
||||||
|
checkForUpdates.equals(false)
|
||||||
|
}
|
||||||
|
|
||||||
//Certificates
|
//Certificates
|
||||||
buildClientCertificateSection(context, screen)
|
buildClientCertificateSection(context, screen)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue