mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Add some logging for transposed mode in landscape
Bug: 185820525 Test: Presubmit Change-Id: Id4cf605fd5c3277273025ac1a73f25add0608412
This commit is contained in:
@@ -48,6 +48,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.graphics.IconShape;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.ConfigMonitor;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.DisplayController.Info;
|
||||
@@ -338,6 +339,10 @@ public class InvariantDeviceProfile {
|
||||
DeviceProfile.Builder builder = new DeviceProfile.Builder(context, this, displayInfo)
|
||||
.setSizeRange(new Point(displayInfo.smallestSize),
|
||||
new Point(displayInfo.largestSize));
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED,
|
||||
"largeSide=" + largeSide + " smallSide=" + smallSide);
|
||||
}
|
||||
|
||||
landscapeProfile = builder.setSize(largeSide, smallSide).build();
|
||||
portraitProfile = builder.setSize(smallSide, largeSide).build();
|
||||
@@ -571,6 +576,10 @@ public class InvariantDeviceProfile {
|
||||
}
|
||||
|
||||
public DeviceProfile getDeviceProfile(Context context) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "getDeviceProfile: orientation="
|
||||
+ context.getResources().getConfiguration().orientation, new Throwable());
|
||||
}
|
||||
return context.getResources().getConfiguration().orientation
|
||||
== Configuration.ORIENTATION_LANDSCAPE ? landscapeProfile : portraitProfile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user