Merge "Fix bug where font size (etc.) doesn't change after changing display settings." into ub-launcher3-rvc-dev am: 77aaa94bc2
Original change: undetermined Change-Id: Ibe1ef5eb41e20d23a17c111f46a232cb6f6a66fa
This commit is contained in:
@@ -200,7 +200,7 @@ public class InvariantDeviceProfile {
|
||||
DefaultDisplay.INSTANCE.get(context).getInfo(),
|
||||
getPredefinedDeviceProfiles(context, gridName));
|
||||
|
||||
Info myInfo = new Info(display);
|
||||
Info myInfo = new Info(context, display);
|
||||
DisplayOption myDisplayOption = invDistWeightedInterpolate(
|
||||
myInfo, getPredefinedDeviceProfiles(context, gridName));
|
||||
|
||||
|
||||
@@ -145,10 +145,11 @@ public class DefaultDisplay implements DisplayListener {
|
||||
}
|
||||
|
||||
private Info(Context context) {
|
||||
this(context.getSystemService(DisplayManager.class).getDisplay(DEFAULT_DISPLAY));
|
||||
this(context, context.getSystemService(DisplayManager.class)
|
||||
.getDisplay(DEFAULT_DISPLAY));
|
||||
}
|
||||
|
||||
public Info(Display display) {
|
||||
public Info(Context context, Display display) {
|
||||
id = display.getDisplayId();
|
||||
rotation = display.getRotation();
|
||||
|
||||
@@ -161,8 +162,8 @@ public class DefaultDisplay implements DisplayListener {
|
||||
display.getRealSize(realSize);
|
||||
display.getCurrentSizeRange(smallestSize, largestSize);
|
||||
|
||||
metrics = new DisplayMetrics();
|
||||
display.getMetrics(metrics);
|
||||
Context defaultDisplayContext = context.createDisplayContext(display);
|
||||
metrics = defaultDisplayContext.getResources().getDisplayMetrics();
|
||||
}
|
||||
|
||||
private boolean hasDifferentSize(Info info) {
|
||||
|
||||
Reference in New Issue
Block a user