Fix cts ApplicationTest#testApplication failing.
We should ignore orientation change requests only when a resizeable
activity is not in a full screen mode.
Bug: 25935368
Change-Id: I53bada8bbf0b429b1d48707f65da488e0edeb799
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 557b386..10f2ac4 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -4399,8 +4399,10 @@
if (r == null) {
return;
}
- if (r.task != null && r.task.mResizeable) {
- // Fixed screen orientation isn't supported with resizeable activities.
+ TaskRecord task = r.task;
+ if (task != null && (!task.mFullscreen || !task.stack.mFullscreen)) {
+ // Fixed screen orientation isn't supported when activities aren't in full screen
+ // mode.
return;
}
final long origId = Binder.clearCallingIdentity();
@@ -17761,7 +17763,7 @@
* @param userId is only used when persistent parameter is set to true to persist configuration
* for that particular user
*/
- boolean updateConfigurationLocked(Configuration values,
+ private boolean updateConfigurationLocked(Configuration values,
ActivityRecord starting, boolean initLocale, boolean persistent, int userId) {
int changes = 0;