mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Use normalized CachedDisplayInfo as key
- For system Launcher, migrate to use getPossibleMaximumWindowMetrics instead of getDisplays - Removed usage of displayId - In estimateInternalDisplayBounds, use CachedDisplayInfo directly as a key - When cache retunrs null for the current display (e.g. the 3P launcher case), invalidate the cache and estimate again, and only add to supportedBounds if current display is not found in the new cache Bug: 227459045 Bug: 198965093 Test: manual Change-Id: Ibcc05ba483ed31a40d16e3cf49c3f3d43af68cf6
This commit is contained in:
@@ -234,7 +234,8 @@ public class InvariantDeviceProfile {
|
||||
/*allowDisabledGrid=*/false),
|
||||
defaultDeviceType);
|
||||
|
||||
Info myInfo = new Info(context, display);
|
||||
Context displayContext = context.createDisplayContext(display);
|
||||
Info myInfo = new Info(displayContext);
|
||||
@DeviceType int deviceType = getDeviceType(myInfo);
|
||||
DisplayOption myDisplayOption = invDistWeightedInterpolate(
|
||||
myInfo,
|
||||
@@ -642,7 +643,7 @@ public class InvariantDeviceProfile {
|
||||
+ "\nconfig: " + config
|
||||
+ "\ndisplayMetrics: " + res.getDisplayMetrics()
|
||||
+ "\nrotation: " + rotation
|
||||
+ "\n" + stringWriter.toString(),
|
||||
+ "\n" + stringWriter,
|
||||
new Exception());
|
||||
}
|
||||
return getBestMatch(screenWidth, screenHeight, rotation);
|
||||
|
||||
Reference in New Issue
Block a user