glasses: list all installed launchable apps on phone (Android 11+ queries)

- Add <intent MAIN+LAUNCHER> to <queries> so queryIntentActivities on the
  glasses side returns third-party apps (free.zona etc), not only system /
  RayNeo system apps. Without this entry Android 11+ package visibility
  filter strips apps whose package is not explicitly named.
- Pass MATCH_ALL | GET_RESOLVED_FILTER to queryIntentActivities as a
  belt-and-suspenders measure (no visible effect with queries above, but
  safe on Android 12+ where the platform may still filter).
- Default VmGlassesController state is NoAppSelected instead of Starting,
  so we don't show 'Подготавливаем очки...' on first launch when no
  LaunchAppCommand has been received yet.
- DriveShizukuState leaves Running state alone on re-check (don't drop
  a running guest back to ShizukuMissing just because Shizuku was
  re-polled).
This commit is contained in:
2026-09-25 15:19:57 +03:00
parent ca01a7b918
commit cc5866b373
4 changed files with 130 additions and 19 deletions
@@ -89,9 +89,13 @@ private fun DriveShizukuState(controller: VmGlassesController, shizuku: ShizukuB
ShizukuBootstrap.AllowState.NotRunning,
ShizukuBootstrap.AllowState.Waiting,
ShizukuBootstrap.AllowState.NeedsPermission -> {
controller.setState(GlassesScreenState.ShizukuMissing)
if (controller.state.value !is GlassesScreenState.Running) {
controller.setState(GlassesScreenState.ShizukuMissing)
}
}
ShizukuBootstrap.AllowState.Granted -> {
// Если мы сейчас в ShizukuMissing — переходим в NoAppSelected.
// Running не трогаем: приложение уже запущено, Shizuku-статус не должен его ронять.
if (controller.state.value is GlassesScreenState.ShizukuMissing) {
controller.setState(GlassesScreenState.NoAppSelected)
}