Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #40 from YTVanced/dev
Browse files Browse the repository at this point in the history
Fixed issue with ROMs relaunching service
  • Loading branch information
KevinX8 authored Jul 2, 2020
2 parents b08acb7 + 451c4b3 commit d3520f4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AppInstaller: Service() {
inputStream.close()
outputStream.close()
session.commit(pendingIntent.intentSender)
return START_STICKY
return START_NOT_STICKY
}

override fun onBind(intent: Intent?): IBinder? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SplitInstaller: Service() {

override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
installSplitApk(this)
return START_STICKY
return START_NOT_STICKY
}

override fun onBind(intent: Intent?): IBinder? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import android.widget.ProgressBar
import android.widget.TextView
import android.widget.Toast
import androidx.fragment.app.DialogFragment
import androidx.preference.PreferenceManager
import com.dezlum.codelabs.getjson.GetJson
import com.downloader.Error
import com.downloader.OnDownloadListener
Expand Down Expand Up @@ -74,10 +73,6 @@ class UpdateCheckFragment : DialogFragment() {
}
.start(object : OnDownloadListener{
override fun onDownloadComplete() {
val prefs = PreferenceManager.getDefaultSharedPreferences(requireContext())
prefs.getBoolean("isUpgrading", false)
prefs.edit().putBoolean("isUpgrading", true).apply()

activity?.let {
installApp(
it,
Expand Down

0 comments on commit d3520f4

Please sign in to comment.