mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-23 19:55:11 +00:00
fixed microg installation
This commit is contained in:
parent
ad39dfbb0c
commit
0ae2f57078
3 changed files with 4 additions and 11 deletions
|
@ -7,6 +7,7 @@ import android.os.IBinder
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||||
import com.dezlum.codelabs.getjson.GetJson
|
import com.dezlum.codelabs.getjson.GetJson
|
||||||
|
import com.vanced.manager.core.installer.MicrogInstaller.installMicrog
|
||||||
import com.vanced.manager.ui.fragments.HomeFragment
|
import com.vanced.manager.ui.fragments.HomeFragment
|
||||||
import io.reactivex.disposables.Disposable
|
import io.reactivex.disposables.Disposable
|
||||||
import io.reactivex.rxkotlin.subscribeBy
|
import io.reactivex.rxkotlin.subscribeBy
|
||||||
|
@ -54,6 +55,7 @@ class MicrogDownloadService: Service() {
|
||||||
},
|
},
|
||||||
onComplete = {
|
onComplete = {
|
||||||
prefs?.edit()?.putBoolean("isMicrogDownloading", false)?.apply()
|
prefs?.edit()?.putBoolean("isMicrogDownloading", false)?.apply()
|
||||||
|
installMicrog(this)
|
||||||
},
|
},
|
||||||
onError = { throwable ->
|
onError = { throwable ->
|
||||||
Toast.makeText(this, throwable.toString(), Toast.LENGTH_SHORT)
|
Toast.makeText(this, throwable.toString(), Toast.LENGTH_SHORT)
|
||||||
|
|
|
@ -35,7 +35,8 @@ open class About : BaseFragment() {
|
||||||
if (!devSettings) {
|
if (!devSettings) {
|
||||||
Toast.makeText(requireContext(), "Dev options unlocked!", Toast.LENGTH_SHORT).show()
|
Toast.makeText(requireContext(), "Dev options unlocked!", Toast.LENGTH_SHORT).show()
|
||||||
prefs.edit().putBoolean("devSettings", true).apply()
|
prefs.edit().putBoolean("devSettings", true).apply()
|
||||||
} else Toast.makeText(requireContext(), "Dev options already unlocked", Toast.LENGTH_SHORT).show()
|
} else
|
||||||
|
Toast.makeText(requireContext(), "Dev options already unlocked", Toast.LENGTH_SHORT).show()
|
||||||
|
|
||||||
}
|
}
|
||||||
return@setOnTouchListener true
|
return@setOnTouchListener true
|
||||||
|
|
|
@ -261,9 +261,6 @@ class HomeFragment : Home() {
|
||||||
progressbar?.visibility = View.VISIBLE
|
progressbar?.visibility = View.VISIBLE
|
||||||
progressbar?.progress = progress
|
progressbar?.progress = progress
|
||||||
}
|
}
|
||||||
MICROG_DOWNLOADED -> {
|
|
||||||
activity?.let { installMicrog(it) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -286,12 +283,6 @@ class HomeFragment : Home() {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
activity?.let {
|
|
||||||
LocalBroadcastManager.getInstance(it).registerReceiver(broadcastReceiver, IntentFilter(
|
|
||||||
MICROG_DOWNLOADED
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
activity?.let {
|
activity?.let {
|
||||||
LocalBroadcastManager.getInstance(it).registerReceiver(broadcastReceiver, IntentFilter(
|
LocalBroadcastManager.getInstance(it).registerReceiver(broadcastReceiver, IntentFilter(
|
||||||
MICROG_DOWNLOADING
|
MICROG_DOWNLOADING
|
||||||
|
@ -353,7 +344,6 @@ class HomeFragment : Home() {
|
||||||
const val SIGNATURE_DISABLED = "Signature verification disabled"
|
const val SIGNATURE_DISABLED = "Signature verification disabled"
|
||||||
const val SIGNATURE_ENABLED = "Signature verification enabled"
|
const val SIGNATURE_ENABLED = "Signature verification enabled"
|
||||||
const val VANCED_DOWNLOADING = "Vanced downloading"
|
const val VANCED_DOWNLOADING = "Vanced downloading"
|
||||||
const val MICROG_DOWNLOADED = "MicroG downloaded"
|
|
||||||
const val MICROG_DOWNLOADING = "MicroG downloading"
|
const val MICROG_DOWNLOADING = "MicroG downloading"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue