Skip to content

Conversation

@Autfy
Copy link
Owner

@Autfy Autfy commented Feb 8, 2026

Motivation

  • Prevent crashes when the demo attempts to start an app with no available launch Intent and make the foreground PendingIntent compatible with modern Android immutability requirements.

Description

  • In WaitAppAction.run guard the call to packageManager.getLaunchIntentForPackage(targetApp) and show toast("未找到应用: $targetApp") and return if the launch intent is null before calling startActivity.
  • In ForegroundService.getNotification compute pendingFlags using PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE on Build.VERSION_CODES.M and fall back to PendingIntent.FLAG_UPDATE_CURRENT on older versions, then pass pendingFlags into PendingIntent.getService.

Testing

  • No automated tests were run.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant