Rewrite RootUtils in Kotlin

This commit is contained in:
topjohnwu
2019-05-03 03:36:39 -04:00
parent a2a3c7f438
commit d3f5f5ee59
8 changed files with 195 additions and 178 deletions
@@ -1,5 +1,6 @@
package com.topjohnwu.magisk.utils
import android.content.Context
import android.content.pm.ApplicationInfo
import android.content.pm.ComponentInfo
import android.content.pm.PackageInfo
@@ -47,4 +48,6 @@ fun PackageManager.receivers(packageName: String) =
getPackageInfo(packageName, GET_RECEIVERS).receivers
fun PackageManager.providers(packageName: String) =
getPackageInfo(packageName, GET_PROVIDERS).providers
getPackageInfo(packageName, GET_PROVIDERS).providers
fun Context.rawResource(id: Int) = resources.openRawResource(id)