clean codes

use res id to make toast
convert class RestrictionData to a object
simplify some UI components
This commit is contained in:
BinTianqi
2024-05-08 19:59:06 +08:00
parent e19a9be2f7
commit b5e3981a41
15 changed files with 153 additions and 174 deletions

View File

@@ -225,12 +225,12 @@ fun userServiceControl(context:Context, status:Boolean){
if (binder.pingBinder()) {
service = IUserService.Stub.asInterface(binder)
} else {
Toast.makeText(context,context.getString(R.string.invalid_binder),Toast.LENGTH_SHORT).show()
Toast.makeText(context, R.string.invalid_binder, Toast.LENGTH_SHORT).show()
}
}
override fun onServiceDisconnected(componentName: ComponentName) {
service = null
Toast.makeText(context,context.getString(R.string.shizuku_service_disconnected),Toast.LENGTH_SHORT).show()
Toast.makeText(context, R.string.shizuku_service_disconnected, Toast.LENGTH_SHORT).show()
}
}
val userServiceArgs = Shizuku.UserServiceArgs(