am 38e84700
: Merge "Fix issue #7585876: When changing the font settings, the movie..." into jb-mr1.1-dev
* commit '38e847004978031c2b914714e92bc5407ba3ce65': Fix issue #7585876: When changing the font settings, the movie...
This commit is contained in:
@ -281,7 +281,7 @@ public class Presentation extends Dialog {
|
||||
private boolean isConfigurationStillValid() {
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
mDisplay.getMetrics(dm);
|
||||
return dm.equals(getResources().getDisplayMetrics());
|
||||
return dm.equalsPhysical(getResources().getDisplayMetrics());
|
||||
}
|
||||
|
||||
private static Context createPresentationContext(
|
||||
|
@ -232,19 +232,32 @@ public class DisplayMetrics {
|
||||
* @return True if the display metrics are equal.
|
||||
*/
|
||||
public boolean equals(DisplayMetrics other) {
|
||||
return equalsPhysical(other)
|
||||
&& scaledDensity == other.scaledDensity
|
||||
&& noncompatScaledDensity == other.noncompatScaledDensity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the physical aspects of the two display metrics
|
||||
* are equal. This ignores the scaled density, which is a logical
|
||||
* attribute based on the current desired font size.
|
||||
*
|
||||
* @param other The display metrics with which to compare.
|
||||
* @return True if the display metrics are equal.
|
||||
* @hide
|
||||
*/
|
||||
public boolean equalsPhysical(DisplayMetrics other) {
|
||||
return other != null
|
||||
&& widthPixels == other.widthPixels
|
||||
&& heightPixels == other.heightPixels
|
||||
&& density == other.density
|
||||
&& densityDpi == other.densityDpi
|
||||
&& scaledDensity == other.scaledDensity
|
||||
&& xdpi == other.xdpi
|
||||
&& ydpi == other.ydpi
|
||||
&& noncompatWidthPixels == other.noncompatWidthPixels
|
||||
&& noncompatHeightPixels == other.noncompatHeightPixels
|
||||
&& noncompatDensity == other.noncompatDensity
|
||||
&& noncompatDensityDpi == other.noncompatDensityDpi
|
||||
&& noncompatScaledDensity == other.noncompatScaledDensity
|
||||
&& noncompatXdpi == other.noncompatXdpi
|
||||
&& noncompatYdpi == other.noncompatYdpi;
|
||||
}
|
||||
|
Reference in New Issue
Block a user