summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-01-11 10:15:03 -0800
committerSunny Goyal <sunnygoyal@google.com>2018-01-11 15:33:23 -0800
commit1a52ef57c72291a87d4ca6bb1e752fd746646991 (patch)
tree7cb910c63f4ee834823375f50045accdc4099173 /src/com/android/launcher3/DeviceProfile.java
parent9bb0d726409a62fe262798795db76d20313d5d2c (diff)
downloadandroid_packages_apps_Trebuchet-1a52ef57c72291a87d4ca6bb1e752fd746646991.tar.gz
android_packages_apps_Trebuchet-1a52ef57c72291a87d4ca6bb1e752fd746646991.tar.bz2
android_packages_apps_Trebuchet-1a52ef57c72291a87d4ca6bb1e752fd746646991.zip
Removing some dependency on Launcher UI
Change-Id: Ic1c84880cfe4daa9398b8eb27c3afc0837c5a8ca
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 75e2f70ca..7a6a24431 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -214,6 +214,11 @@ public class DeviceProfile {
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 @@ public class DeviceProfile {
updateWorkspacePadding();
}
+ public Rect getInsets() {
+ return mInsets;
+ }
+
public void updateAppsViewNumCols() {
allAppsNumCols = allAppsNumPredictiveCols = inv.numColumns;
}
@@ -509,6 +518,5 @@ public class DeviceProfile {
Configuration context = new Configuration(c.getResources().getConfiguration());
context.orientation = orientation;
return c.createConfigurationContext(context);
-
}
}