Skip to content
Commit e61400c6 authored by tomnatan's avatar tomnatan
Browse files

Fix issue where NOT_VISIBLE state is sometimes not logged

This happens because ActivityMetricsLogger#notifyActivityRemoved is sometimes called before ActivityMetricsLogger#logAppCompatState is called from ActivityRecord#setVisibleRequested. The solution is to keep the correct lastLoggedState and just mark the lastLoggedActivity as null when the activity is removed.

In addition, avoid logging the same state twice when an activity becomes invisible while there is another visible activity with the same state for the same package UID.

Note that these changes will be tested in a CTS test that will be added
in a follow up.

Fix: 203417779
Fix: 203506108
Test: atest WmTests:SizeCompatTests
Change-Id: I056584fc234a605bc0d39ac24f430e969ffc86ee
parent 539da553
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment