mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Unconditionally disable auto updates.
This commit is contained in:
committed by
jeffrey-signal
parent
717794a12e
commit
39fe5b1eb5
@@ -10,17 +10,14 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageInstaller
|
||||
import android.os.Build
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.signal.core.util.PendingIntentFlags
|
||||
import org.signal.core.util.StreamUtil
|
||||
import org.signal.core.util.getDownloadManager
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies
|
||||
import org.thoughtcrime.securesms.events.WebRtcViewModel
|
||||
import org.thoughtcrime.securesms.jobs.ApkUpdateJob
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.util.AppForegroundObserver
|
||||
import org.thoughtcrime.securesms.util.Environment
|
||||
import org.thoughtcrime.securesms.util.FileUtils
|
||||
import java.io.FileInputStream
|
||||
import java.io.IOException
|
||||
@@ -150,10 +147,12 @@ object ApkUpdateInstaller {
|
||||
}
|
||||
|
||||
private fun shouldAutoUpdate(): Boolean {
|
||||
val webRtcViewModel = EventBus.getDefault().getStickyEvent(WebRtcViewModel::class.java)
|
||||
val isCallActive = webRtcViewModel != null && webRtcViewModel.state != WebRtcViewModel.State.IDLE
|
||||
// Once we have designs for allowing users to opt-out of auto-updates, we can re-enable this
|
||||
return false
|
||||
|
||||
// TODO Auto-updates temporarily restricted to nightlies. Once we have designs for allowing users to opt-out of auto-updates, we can re-enable this
|
||||
return Environment.IS_NIGHTLY && Build.VERSION.SDK_INT >= 31 && SignalStore.apkUpdate.autoUpdate && !AppForegroundObserver.isForegrounded() && !isCallActive
|
||||
// val webRtcViewModel = EventBus.getDefault().getStickyEvent(WebRtcViewModel::class.java)
|
||||
// val isCallActive = webRtcViewModel != null && webRtcViewModel.state != WebRtcViewModel.State.IDLE
|
||||
//
|
||||
// return Build.VERSION.SDK_INT >= 31 && SignalStore.apkUpdate.autoUpdate && !AppForegroundObserver.isForegrounded() && !isCallActive
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user