Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java

Issue 2859313002: android: Fix display size under multiwindow (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java
diff --git a/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java b/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java
index 9092e61c2f2bf15cd61bfcfa5e63e681184bf220..7bb899059bd0bcc379e08d40abe0157889a674a9 100644
--- a/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java
@@ -46,7 +46,6 @@ public class DisplayAndroid {
private final int mDisplayId;
private Point mSize;
- private Point mPhysicalSize;
private float mDipScale;
private int mBitsPerPixel;
private int mBitsPerComponent;
@@ -98,20 +97,6 @@ public class DisplayAndroid {
}
/**
- * @return Real physical display height in physical pixels. Or 0 if not supported.
- */
- public int getPhysicalDisplayHeight() {
- return mPhysicalSize.y;
- }
-
- /**
- * @return Real physical display width in physical pixels. Or 0 if not supported.
- */
- public int getPhysicalDisplayWidth() {
- return mPhysicalSize.x;
- }
-
- /**
* @return current orientation. One of Surface.ORIENTATION_* values.
*/
public int getRotation() {
@@ -195,7 +180,6 @@ public class DisplayAndroid {
mDisplayId = displayId;
mObservers = new WeakHashMap<>();
mSize = new Point();
- mPhysicalSize = new Point();
}
private DisplayAndroidObserver[] getObservers() {
@@ -206,24 +190,22 @@ public class DisplayAndroid {
/**
* Update the display to the provided parameters. Null values leave the parameter unchanged.
*/
- protected void update(Point size, Point physicalSize, Float dipScale, Integer bitsPerPixel,
+ protected void update(Point size, Float dipScale, Integer bitsPerPixel,
Integer bitsPerComponent, Integer rotation) {
boolean sizeChanged = size != null && !mSize.equals(size);
- boolean physicalSizeChanged = physicalSize != null && !mPhysicalSize.equals(physicalSize);
// Intentional comparison of floats: we assume that if scales differ, they differ
// significantly.
boolean dipScaleChanged = dipScale != null && mDipScale != dipScale;
boolean bitsPerPixelChanged = bitsPerPixel != null && mBitsPerPixel != bitsPerPixel;
- boolean bitsPerComponentChanged = bitsPerComponent != null
- && mBitsPerComponent != bitsPerComponent;
+ boolean bitsPerComponentChanged =
+ bitsPerComponent != null && mBitsPerComponent != bitsPerComponent;
boolean rotationChanged = rotation != null && mRotation != rotation;
- boolean changed = sizeChanged || physicalSizeChanged || dipScaleChanged
- || bitsPerPixelChanged || bitsPerComponentChanged || rotationChanged;
+ boolean changed = sizeChanged || dipScaleChanged || bitsPerPixelChanged
+ || bitsPerComponentChanged || rotationChanged;
if (!changed) return;
if (sizeChanged) mSize = size;
- if (physicalSizeChanged) mPhysicalSize = physicalSize;
if (dipScaleChanged) mDipScale = dipScale;
if (bitsPerPixelChanged) mBitsPerPixel = bitsPerPixel;
if (bitsPerComponentChanged) mBitsPerComponent = bitsPerComponent;
« no previous file with comments | « ui/android/display_android_manager.cc ('k') | ui/android/java/src/org/chromium/ui/display/DisplayAndroidManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698