Merge "Add logs for InvariantDeviceProfile.getDeviceProfile" into tm-dev am: 92ad55a549 am: 3eb86247dc am: f195f81443
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18140270 Change-Id: I33e56d17abbe17dc4f980d40b4fd32b475504a3d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -61,6 +61,8 @@ import org.xmlpull.v1.XmlPullParser;
|
|||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -628,8 +630,21 @@ public class InvariantDeviceProfile {
|
|||||||
|
|
||||||
float screenWidth = config.screenWidthDp * res.getDisplayMetrics().density;
|
float screenWidth = config.screenWidthDp * res.getDisplayMetrics().density;
|
||||||
float screenHeight = config.screenHeightDp * res.getDisplayMetrics().density;
|
float screenHeight = config.screenHeightDp * res.getDisplayMetrics().density;
|
||||||
return getBestMatch(screenWidth, screenHeight,
|
int rotation = WindowManagerProxy.INSTANCE.get(context).getRotation(context);
|
||||||
WindowManagerProxy.INSTANCE.get(context).getRotation(context));
|
|
||||||
|
if (Utilities.IS_DEBUG_DEVICE) {
|
||||||
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
PrintWriter printWriter = new PrintWriter(stringWriter);
|
||||||
|
DisplayController.INSTANCE.get(context).dump(printWriter);
|
||||||
|
printWriter.flush();
|
||||||
|
Log.d("b/231312158", "getDeviceProfile -"
|
||||||
|
+ "\nconfig: " + config
|
||||||
|
+ "\ndisplayMetrics: " + res.getDisplayMetrics()
|
||||||
|
+ "\nrotation: " + rotation
|
||||||
|
+ "\n" + stringWriter.toString(),
|
||||||
|
new Exception());
|
||||||
|
}
|
||||||
|
return getBestMatch(screenWidth, screenHeight, rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user