summaryrefslogtreecommitdiff
path: root/core/java/android/view/Display.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-04-17 01:39:27 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-05-11 22:17:03 +0800
commitd490c57905bc47a4d583d69049864e6348171c61 (patch)
treeabd702ae9a451a9c372910d143fea32d65644c40 /core/java/android/view/Display.java
parente03b9669e3c6e34329198404a718f66cf8d7bf85 (diff)
Send fixed rotation adjustments to the associated client
So the real information of display can be adjusted according to the adjustments for the application started with fixed rotation transform. The enabling adjustments may be sent in different ways: - Launch activity The information is bundled with LaunchActivityItem. - Resume activity or update non-activity window Send a standalone FixedRotationAdjustmentsItem. The disabling adjustments (null) are always sent by FixedRotationAdjustmentsItem. Bug: 147213487 Test: AppConfigurationTests#testRotatedInfoWithFixedRotationTransform TransactionParcelTests#testFixedRotationAdjustments Change-Id: I5238888a5c8352db83fc12749f4de2bfabf46026
Diffstat (limited to 'core/java/android/view/Display.java')
-rw-r--r--core/java/android/view/Display.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 8e2efe3f2b38..8db1703a627f 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -1244,10 +1244,8 @@ public final class Display {
}
}
- // TODO(b/147213487): Replace the condition with per-resources state.
- mMayAdjustByFixedRotation = mIsValid && mResources != null
- && mResources.getConfiguration().windowConfiguration.getRotation()
- != mDisplayInfo.rotation;
+ mMayAdjustByFixedRotation = mResources != null
+ && mResources.hasOverrideDisplayAdjustments();
}
private void updateCachedAppSizeIfNeededLocked() {