Only remove task if it was uninstalled or removed from the recents list

- Was missing additional checks and unconditionally removing the task
  whenever the task was removed from the active tasks in AM. Instead, check
  that the app still exists both in the system and in the recents list
  before removing.

Bug: 79698015
Test: a) get incoming call, go to overview, end call and ensure removed
      b) install app, open app, go to overview, uninstall app and ensure removed

Change-Id: I8901cb232ef7ff0759923d6a98f65df4e4adf88b
1 file changed