Merge "Only update reported configuration when triggered from AM side." into oc-mr1-dev
This commit is contained in:
@@ -947,8 +947,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
|
|||||||
// the user leaves that mode.
|
// the user leaves that mode.
|
||||||
mLastReportedMultiWindowMode = !task.mFullscreen;
|
mLastReportedMultiWindowMode = !task.mFullscreen;
|
||||||
mLastReportedPictureInPictureMode = (task.getStackId() == PINNED_STACK_ID);
|
mLastReportedPictureInPictureMode = (task.getStackId() == PINNED_STACK_ID);
|
||||||
|
|
||||||
onOverrideConfigurationSent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeWindowContainer() {
|
void removeWindowContainer() {
|
||||||
@@ -2212,15 +2210,12 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
|
|||||||
* a new merged configuration is sent to the client for this activity.
|
* a new merged configuration is sent to the client for this activity.
|
||||||
*/
|
*/
|
||||||
void setLastReportedConfiguration(@NonNull MergedConfiguration config) {
|
void setLastReportedConfiguration(@NonNull MergedConfiguration config) {
|
||||||
mLastReportedConfiguration.setTo(config);
|
setLastReportedConfiguration(config.getGlobalConfiguration(),
|
||||||
|
config.getOverrideConfiguration());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Call when override config was sent to the Window Manager to update internal records. */
|
void setLastReportedConfiguration(Configuration global, Configuration override) {
|
||||||
// TODO(b/36505427): Why do we set last reported based on sending the config to WM? Seems like
|
mLastReportedConfiguration.setConfiguration(global, override);
|
||||||
// we should only set this when we actually report to the activity which is what the method
|
|
||||||
// setLastReportedMergedOverrideConfiguration() does. Investigate if this is really needed.
|
|
||||||
void onOverrideConfigurationSent() {
|
|
||||||
mLastReportedConfiguration.setOverrideConfiguration(getMergedOverrideConfiguration());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -2234,9 +2229,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mWindowContainerController.onOverrideConfigurationChanged(newConfig, mBounds);
|
mWindowContainerController.onOverrideConfigurationChanged(newConfig, mBounds);
|
||||||
// TODO(b/36505427): Can we consolidate the call points of onOverrideConfigurationSent()
|
|
||||||
// to just use this method instead?
|
|
||||||
onOverrideConfigurationSent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(b/36505427): Consider moving this method and similar ones to ConfigurationContainer.
|
// TODO(b/36505427): Consider moving this method and similar ones to ConfigurationContainer.
|
||||||
@@ -2423,8 +2415,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
|
|||||||
|
|
||||||
// Update last reported values.
|
// Update last reported values.
|
||||||
final Configuration newMergedOverrideConfig = getMergedOverrideConfiguration();
|
final Configuration newMergedOverrideConfig = getMergedOverrideConfiguration();
|
||||||
mLastReportedConfiguration.setConfiguration(service.getGlobalConfiguration(),
|
|
||||||
newMergedOverrideConfig);
|
setLastReportedConfiguration(service.getGlobalConfiguration(), newMergedOverrideConfig);
|
||||||
|
|
||||||
if (changes == 0 && !forceNewConfig) {
|
if (changes == 0 && !forceNewConfig) {
|
||||||
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
|
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
|
||||||
|
|||||||
@@ -1294,7 +1294,6 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
|
|||||||
// created controller for the activity we are starting yet.
|
// created controller for the activity we are starting yet.
|
||||||
mWindowContainerController.positionChildAt(appController, index);
|
mWindowContainerController.positionChildAt(appController, index);
|
||||||
}
|
}
|
||||||
r.onOverrideConfigurationSent();
|
|
||||||
|
|
||||||
// Make sure the list of display UID whitelists is updated
|
// Make sure the list of display UID whitelists is updated
|
||||||
// now that this record is in a new task.
|
// now that this record is in a new task.
|
||||||
|
|||||||
Reference in New Issue
Block a user