Fix the highlight error after unfolding the device

Unfolding a device generates mutiple lifecycle events and resets the
highlight key.

Check if there's only one activity in the task and then perform the
reset.

Fix: 209016927
Test: manual
Change-Id: I49988fa913270d35a04436777433b7669afb72df
2 files changed