summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InvariantDeviceProfile.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-03-13 09:57:05 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-03-13 17:22:52 -0700
commitf633ef5f4310b6f79087797a2dc215812f841b70 (patch)
tree6d5796276a540c854ef71abe4956c48926c30dea /src/com/android/launcher3/InvariantDeviceProfile.java
parent87dd782e406a069684dd47edeb37b80c65bac101 (diff)
downloadandroid_packages_apps_Trebuchet-f633ef5f4310b6f79087797a2dc215812f841b70.tar.gz
android_packages_apps_Trebuchet-f633ef5f4310b6f79087797a2dc215812f841b70.tar.bz2
android_packages_apps_Trebuchet-f633ef5f4310b6f79087797a2dc215812f841b70.zip
Adding fallback recents activity
> Refactoring RecentsView to a common base class > Moving some dependency form Launcher to BaseActivity > Using the Recents view in RecentsActivity Change-Id: Ie0e6741d356291e77420798c140c999121de3a0d
Diffstat (limited to 'src/com/android/launcher3/InvariantDeviceProfile.java')
-rw-r--r--src/com/android/launcher3/InvariantDeviceProfile.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index e4609119f..f63cce58d 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -22,6 +22,7 @@ import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Point;
+import android.support.annotation.VisibleForTesting;
import android.util.DisplayMetrics;
import android.util.Xml;
import android.view.Display;
@@ -88,17 +89,18 @@ public class InvariantDeviceProfile {
public Point defaultWallpaperSize;
+ @VisibleForTesting
public InvariantDeviceProfile() {
}
- public InvariantDeviceProfile(InvariantDeviceProfile p) {
+ private InvariantDeviceProfile(InvariantDeviceProfile p) {
this(p.name, p.minWidthDps, p.minHeightDps, p.numRows, p.numColumns,
p.numFolderRows, p.numFolderColumns,
p.iconSize, p.landscapeIconSize, p.iconTextSize, p.numHotseatIcons,
p.defaultLayoutId, p.demoModeLayoutId);
}
- InvariantDeviceProfile(String n, float w, float h, int r, int c, int fr, int fc,
+ private InvariantDeviceProfile(String n, float w, float h, int r, int c, int fr, int fc,
float is, float lis, float its, int hs, int dlId, int dmlId) {
name = n;
minWidthDps = w;
@@ -116,7 +118,7 @@ public class InvariantDeviceProfile {
}
@TargetApi(23)
- InvariantDeviceProfile(Context context) {
+ public InvariantDeviceProfile(Context context) {
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
DisplayMetrics dm = new DisplayMetrics();