Removing some dependency on Launcher UI
Change-Id: Ic1c84880cfe4daa9398b8eb27c3afc0837c5a8ca
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 75e2f70..7a6a244 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -214,6 +214,11 @@
mBadgeRenderer = new BadgeRenderer(iconSizePx);
}
+ public DeviceProfile copy(Context context) {
+ Point size = new Point(availableWidthPx, availableHeightPx);
+ return new DeviceProfile(context, inv, size, size, widthPx, heightPx, isLandscape);
+ }
+
DeviceProfile getMultiWindowProfile(Context context, Point mwSize) {
// We take the minimum sizes of this profile and it's multi-window variant to ensure that
// the system decor is always excluded.
@@ -376,6 +381,10 @@
updateWorkspacePadding();
}
+ public Rect getInsets() {
+ return mInsets;
+ }
+
public void updateAppsViewNumCols() {
allAppsNumCols = allAppsNumPredictiveCols = inv.numColumns;
}
@@ -509,6 +518,5 @@
Configuration context = new Configuration(c.getResources().getConfiguration());
context.orientation = orientation;
return c.createConfigurationContext(context);
-
}
}