Fix issue with multiple recent tasks showing after restarting the device

- A task's activity type is not persisted to disk, so a strict activity
  type comparison will fail to find and remove a reloaded task in the
  recents list. Instead, check for a compatible activity type (which
  accounts for a task with an undefined type)

Bug: 75286152
Test: atest FrameworksServicesTests:RecentTasksTest
Test: atest FrameworksServicesTests:TaskPersisterTest
Change-Id: I3a858ebcdaca310bcc9acbcd4167a62a88466743
3 files changed