mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-26 05:05:15 +00:00
Merge pull request #40 from YTVanced/dev
Fixed issue with ROMs relaunching service
This commit is contained in:
commit
d3520f4ab9
3 changed files with 2 additions and 7 deletions
|
@ -29,7 +29,7 @@ class AppInstaller: Service() {
|
||||||
inputStream.close()
|
inputStream.close()
|
||||||
outputStream.close()
|
outputStream.close()
|
||||||
session.commit(pendingIntent.intentSender)
|
session.commit(pendingIntent.intentSender)
|
||||||
return START_STICKY
|
return START_NOT_STICKY
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent?): IBinder? {
|
override fun onBind(intent: Intent?): IBinder? {
|
||||||
|
|
|
@ -13,7 +13,7 @@ class SplitInstaller: Service() {
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
installSplitApk(this)
|
installSplitApk(this)
|
||||||
return START_STICKY
|
return START_NOT_STICKY
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent?): IBinder? {
|
override fun onBind(intent: Intent?): IBinder? {
|
||||||
|
|
|
@ -12,7 +12,6 @@ import android.widget.ProgressBar
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.preference.PreferenceManager
|
|
||||||
import com.dezlum.codelabs.getjson.GetJson
|
import com.dezlum.codelabs.getjson.GetJson
|
||||||
import com.downloader.Error
|
import com.downloader.Error
|
||||||
import com.downloader.OnDownloadListener
|
import com.downloader.OnDownloadListener
|
||||||
|
@ -74,10 +73,6 @@ class UpdateCheckFragment : DialogFragment() {
|
||||||
}
|
}
|
||||||
.start(object : OnDownloadListener{
|
.start(object : OnDownloadListener{
|
||||||
override fun onDownloadComplete() {
|
override fun onDownloadComplete() {
|
||||||
val prefs = PreferenceManager.getDefaultSharedPreferences(requireContext())
|
|
||||||
prefs.getBoolean("isUpgrading", false)
|
|
||||||
prefs.edit().putBoolean("isUpgrading", true).apply()
|
|
||||||
|
|
||||||
activity?.let {
|
activity?.let {
|
||||||
installApp(
|
installApp(
|
||||||
it,
|
it,
|
||||||
|
|
Loading…
Reference in a new issue