glasses: switch to rikka.shizuku.ShizukuProvider, fix binder acquisition

- Add dev.rikka.shizuku:provider:13.1.5 dependency.
- Replace custom ShizukuInitProvider with rikka.shizuku.ShizukuProvider
  from the upstream library; configured per Shizuku v12+ docs with
  android:permission='android.permission.INTERACT_ACROSS_USERS_FULL'
  to protect the provider from ordinary apps.
- Move ShizukuBootstrap.attach() from GlassesVmApp.onCreate to
  MainActivity.onCreate (requestPermission needs an Activity context).
- MainActivity now overrides onRequestPermissionsResult and forwards
  the grant to ShizukuBootstrap.
- Rewrite ShizukuBootstrap strictly per the Shizuku-API guide:
  addBinderReceivedListenerSticky + addRequestPermissionResultListener
  in attach(); pingBinder / checkSelfPermission / requestPermission
  in refresh().
- Drop ShizukuInitProvider.kt — its job is now done by
  rikka.shizuku.ShizukuProvider.onCreate (verified in logcat:
  'ShizukuProvider: binder received').

Verified on device ARGF20 (A06B4AB933C4103, API 32): Shizuku dialog
'Allow rayneo-vm to use Shizuku?' opens correctly; binder received
via ShizukuProvider; launcher icon now visible (meta-data fix).
This commit is contained in:
2026-09-25 14:44:52 +03:00
parent 987f9e5547
commit e01fafd5a9
5 changed files with 109 additions and 11 deletions
+2
View File
@@ -8,6 +8,7 @@ lifecycle = "2.11.0"
activityCompose = "1.11.0"
composeBom = "2026.09.00"
shizukuApi = "13.1.5"
shizukuProvider = "13.1.5"
navCompose = "2.10.2"
mercury = "0.1.0-SNAPSHOT"
mercuryTransport = "0.1.0-SNAPSHOT"
@@ -45,6 +46,7 @@ androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.15.0" }
# Shizuku
shizuku-api = { module = "dev.rikka.shizuku:api", version.ref = "shizukuApi" }
shizuku-provider = { module = "dev.rikka.shizuku:provider", version.ref = "shizukuProvider" }
# rayneo-mercury (библиотеки)
mercury-library = { module = "pw.binom.mercury:rayneo-mercury", version.ref = "mercury" }