summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppState.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 00e4bf4dc..4dc5a9727 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -48,7 +48,7 @@ public class LauncherAppState {
private InvariantDeviceProfile mInvariantDeviceProfile;
- public static LauncherAppState getInstance() {
+ public static LauncherAppState getInstance(Context context) {
if (INSTANCE == null) {
INSTANCE = new LauncherAppState();
}
@@ -159,4 +159,11 @@ public class LauncherAppState {
public InvariantDeviceProfile getInvariantDeviceProfile() {
return mInvariantDeviceProfile;
}
+
+ /**
+ * Shorthand for {@link #getInvariantDeviceProfile()}
+ */
+ public static InvariantDeviceProfile getIDP(Context context) {
+ return LauncherAppState.getInstance(context).getInvariantDeviceProfile();
+ }
}