0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-25 12:45:12 +00:00

haha gradle errors go brrrrr

This commit is contained in:
X1nto 2020-08-05 16:03:51 +04:00
parent 1a9575cf65
commit 122febcad2
2 changed files with 6 additions and 5 deletions

View file

@ -5,14 +5,12 @@ import com.crowdin.platform.Crowdin
import com.crowdin.platform.CrowdinConfig
import com.crowdin.platform.data.remote.NetworkType
import com.downloader.PRDownloader
import com.vanced.manager.utils.NotificationHelper.createNotifChannel
class App: Application() {
override fun onCreate() {
super.onCreate()
PRDownloader.initialize(this)
createNotifChannel(this)
Crowdin.init(this,
CrowdinConfig.Builder()

View file

@ -6,10 +6,13 @@ import android.content.pm.PackageInstaller
import android.os.Handler
import android.os.IBinder
import android.util.Log
import com.vanced.manager.utils.AppUtils.sendRefreshHome
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.vanced.manager.ui.fragments.HomeFragment
class AppUninstallerService: Service() {
private val localBroadcastManager by lazy { LocalBroadcastManager.getInstance(this) }
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
val pkgName = intent?.getStringExtra("pkg")
when (intent?.getIntExtra(PackageInstaller.EXTRA_STATUS, -999)) {
@ -24,13 +27,13 @@ class AppUninstallerService: Service() {
}
PackageInstaller.STATUS_SUCCESS -> {
Handler().postDelayed({
sendRefreshHome(this)
localBroadcastManager.sendBroadcast(Intent(HomeFragment.REFRESH_HOME))
Log.d("VMpm", "Successfully uninstalled $pkgName")
}, 500)
}
PackageInstaller.STATUS_FAILURE -> {
Handler().postDelayed({
sendRefreshHome(this)
localBroadcastManager.sendBroadcast(Intent(HomeFragment.REFRESH_HOME))
Log.d("VMpm", "Failed to uninstall $pkgName")
}, 500)
}