diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index ba55b36a8b..ea52324a5f 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -249,6 +249,14 @@ public class DeviceProfile { return profile; } + /** + * Inverse of {@link #getMultiWindowProfile(Context, Point)} + * @return device profile corresponding to the current orientation in non multi-window mode. + */ + public DeviceProfile getFullScreenProfile() { + return isLandscape ? inv.landscapeProfile : inv.portraitProfile; + } + /** * Adjusts the profile so that the labels on the Workspace are hidden. * It is important to call this method after the All Apps variables have been set. diff --git a/src/com/android/launcher3/widget/DeferredAppWidgetHostView.java b/src/com/android/launcher3/widget/DeferredAppWidgetHostView.java index 37e5efcb78..3a24c3d21a 100644 --- a/src/com/android/launcher3/widget/DeferredAppWidgetHostView.java +++ b/src/com/android/launcher3/widget/DeferredAppWidgetHostView.java @@ -44,7 +44,8 @@ public class DeferredAppWidgetHostView extends LauncherAppWidgetHostView { mPaint = new TextPaint(); mPaint.setColor(Color.WHITE); mPaint.setTextSize(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, - mLauncher.getDeviceProfile().iconTextSizePx, getResources().getDisplayMetrics())); + mLauncher.getDeviceProfile().getFullScreenProfile().iconTextSizePx, + getResources().getDisplayMetrics())); setBackgroundResource(R.drawable.bg_deferred_app_widget); }