summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorNaomi Musgrave <nmusgrave@google.com>2022-04-05 17:11:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-04-05 17:11:49 +0000
commit6fbe7b2017b431d23f1c73dcd3cd3af0c966e9b7 (patch)
treeee1fe46612cb69e005fbf1c1bbd60079dc6697bc /core/java/android
parent909510831250393fc61e451f87f7742b48df4dea (diff)
parent65474b0f43cc67a8bb1f86167a60e1762c2b79bd (diff)
Merge "Revert "Temporary flag for Launcher to debug their usage of sandboxed display APIs"" into tm-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/Display.java6
-rw-r--r--core/java/android/view/DisplayInfo.java13
2 files changed, 3 insertions, 16 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 5f0098c25e55..0c4d9bf08583 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -1584,10 +1584,10 @@ public final class Display {
return false;
}
final Configuration config = mResources.getConfiguration();
- // TODO(b/179308296) Temporarily - never report max bounds to only Launcher if the feature
- // is disabled.
+ // TODO(b/179308296) Temporarily exclude Launcher from being given max bounds, by checking
+ // if the caller is the recents component.
return config != null && !config.windowConfiguration.getMaxBounds().isEmpty()
- && (mDisplayInfo.shouldConstrainMetricsForLauncher || !isRecentsComponent());
+ && !isRecentsComponent();
}
/**
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index 6917d664327f..9264d2ed42a3 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -306,13 +306,6 @@ public final class DisplayInfo implements Parcelable {
public float brightnessDefault;
/**
- * @hide
- * True if Display#getRealSize and getRealMetrics should be constrained for Launcher, false
- * otherwise.
- */
- public boolean shouldConstrainMetricsForLauncher = false;
-
- /**
* The {@link RoundedCorners} if present, otherwise {@code null}.
*/
@Nullable
@@ -395,7 +388,6 @@ public final class DisplayInfo implements Parcelable {
&& brightnessMaximum == other.brightnessMaximum
&& brightnessDefault == other.brightnessDefault
&& Objects.equals(roundedCorners, other.roundedCorners)
- && shouldConstrainMetricsForLauncher == other.shouldConstrainMetricsForLauncher
&& installOrientation == other.installOrientation;
}
@@ -447,7 +439,6 @@ public final class DisplayInfo implements Parcelable {
brightnessMaximum = other.brightnessMaximum;
brightnessDefault = other.brightnessDefault;
roundedCorners = other.roundedCorners;
- shouldConstrainMetricsForLauncher = other.shouldConstrainMetricsForLauncher;
installOrientation = other.installOrientation;
}
@@ -505,7 +496,6 @@ public final class DisplayInfo implements Parcelable {
for (int i = 0; i < numUserDisabledFormats; i++) {
userDisabledHdrTypes[i] = source.readInt();
}
- shouldConstrainMetricsForLauncher = source.readBoolean();
installOrientation = source.readInt();
}
@@ -561,7 +551,6 @@ public final class DisplayInfo implements Parcelable {
for (int i = 0; i < userDisabledHdrTypes.length; i++) {
dest.writeInt(userDisabledHdrTypes[i]);
}
- dest.writeBoolean(shouldConstrainMetricsForLauncher);
dest.writeInt(installOrientation);
}
@@ -817,8 +806,6 @@ public final class DisplayInfo implements Parcelable {
sb.append(brightnessMaximum);
sb.append(", brightnessDefault ");
sb.append(brightnessDefault);
- sb.append(", shouldConstrainMetricsForLauncher ");
- sb.append(shouldConstrainMetricsForLauncher);
sb.append(", installOrientation ");
sb.append(Surface.rotationToString(installOrientation));
sb.append("}");