SplashFragment: Drop app restart logic

No longer required with new permissions logic

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-07-29 19:19:27 +07:00
parent 8f72599cda
commit 5bdddac9d6
3 changed files with 0 additions and 24 deletions

View File

@@ -43,7 +43,6 @@ import com.aurora.gplayapi.data.models.App
import com.aurora.store.R
import com.aurora.store.util.Log
import com.aurora.store.util.Preferences
import kotlin.system.exitProcess
val Context.inflater: LayoutInflater
get() = LayoutInflater.from(this)
@@ -145,18 +144,6 @@ fun Context.isIgnoringBatteryOptimizations(): Boolean {
}
}
fun Context.restartApp() {
val intent = packageManager.getLaunchIntentForPackage(packageName)
val componentName = intent?.component
val newIntent = Intent.makeRestartActivityTask(componentName)
newIntent.setPackage(packageName)
startActivity(newIntent)
exitProcess(0)
}
fun Context.checkManifestPermission(permission: String): Boolean {
return ActivityCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED
}