mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 11:05:59 +00:00
Bind Shizuku service before navigate to it
Fix CI building
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.bintianqi.owndroid
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.admin.DevicePolicyManager
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
@@ -85,3 +86,8 @@ val Long.humanReadableDate: String
|
||||
fun Context.showOperationResultToast(success: Boolean) {
|
||||
Toast.makeText(this, if(success) R.string.success else R.string.failed, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
@SuppressLint("PrivateApi")
|
||||
fun getContext(): Context {
|
||||
return Class.forName("android.app.ActivityThread").getMethod("currentApplication").invoke(null) as Context
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user