Files
rayneo-vm/app-glasses-vm
subochev 42f117796a glasses: ShizukuBootstrap rewrite per docs (sticky listener + activity context)
Rewrite the Shizuku integration to follow https://github.com/RikkaApps/Shizuku-API:

- attach(activity) instead of attach(): requestPermission() must run from
  an Activity context (Manager's RequestPermissionActivity is a normal
  Activity started from ours).
- addBinderReceivedListenerSticky: ensures our listener fires even if the
  binder was already received before we attached (race against the
  ShizukuProvider init).
- addRequestPermissionResultListener: routes the dialog's allow/deny
  back into the StateFlow.
- onRequestPermissionResult(requestCode, grant): helper for the Activity
  to forward the system callback.
- pingBinder / checkSelfPermission / requestPermission gates follow the
  state machine from the docs (Waiting → NeedsPermission → Granted).

Move attach() out of GlassesVmApp.onCreate (no Activity context there)
into MainActivity.onCreate after super.onCreate.
2026-09-25 15:21:34 +03:00
..
2026-09-25 13:24:56 +03:00