Added Surface Duo 2 support

pull/212/head
M66B 2 years ago
parent 03a1e598d1
commit 8fe9f6c555

@ -280,7 +280,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
content_frame.setLayoutParams(lparam);
}
// https://docs.microsoft.com/en-us/dual-screen/android/duo-dimensions
content_separator.getLayoutParams().width = Helper.dp2pixels(this, 34);
int seam = (Helper.isSurfaceDuo2() ? 26 : 34);
content_separator.getLayoutParams().width = Helper.dp2pixels(this, seam);
} else {
int column_width = prefs.getInt("column_width", 67);
ViewGroup.LayoutParams lparam = content_pane.getLayoutParams();

@ -1472,7 +1472,19 @@ public class Helper {
}
static boolean isSurfaceDuo() {
return ("Microsoft".equalsIgnoreCase(Build.MANUFACTURER) && "Surface Duo".equals(Build.MODEL));
return (isSurfaceDuo2() ||
("Microsoft".equalsIgnoreCase(Build.MANUFACTURER) && "Surface Duo".equals(Build.MODEL)));
}
static boolean isSurfaceDuo2() {
/*
Brand: surface
Manufacturer: Microsoft
Model: Surface Duo 2
Product: duo2
Device: duo2
*/
return ("Microsoft".equalsIgnoreCase(Build.MANUFACTURER) && "Surface Duo 2".equals(Build.MODEL));
}
static boolean isArc() {

Loading…
Cancel
Save