OSDN Git Service

Only update reported configuration when triggered from AM side.
authorBryce Lee <brycelee@google.com>
Thu, 17 Aug 2017 16:16:03 +0000 (09:16 -0700)
committerBryce Lee <brycelee@google.com>
Thu, 17 Aug 2017 18:07:41 +0000 (11:07 -0700)
commit8104e7a258a9d3f230980eae7da05694320f746f
treec9be0ce596fb27c38899e906918883a8c694f5b6
parentc3e7f875b41f78de26d07f6c8ab8fe78747886c0
Only update reported configuration when triggered from AM side.

Previously we were updating the last reported Configuration whenever
it was reported to WM. However, the original intention of last
reported Configuration was reporting from AM side to the
ActivityRecord, not AM to WM. Updating this value in the latter case
leads to scenarios where we may update the Configuration too soon,
compromising any logic relying on comparing against the truly last
reported value.

This changelist removes call points other than messaging from the AM
side which change this value. It also consolidates all changes to the
method ActivityRecord#setLastReportedConfiguration to better track
where the value is being set.

Change-Id: I958daf6cd2f2163637f8b7e567a0f3e2be540b7d
Fixes: 63813517
Test: go/wm-smoke
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests
services/core/java/com/android/server/am/ActivityRecord.java
services/core/java/com/android/server/am/TaskRecord.java