Loading app/src/main/java/net/sourceforge/opencamera/DeviceSettings.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package net.sourceforge.opencamera; import android.content.Context; import android.os.Build; import java.util.Locale; Loading @@ -42,4 +43,9 @@ public class DeviceSettings { public static boolean isMurenaTwo() { return Build.DEVICE.toLowerCase(Locale.US).contains("two"); } public static boolean isTablet(Context context) { int smallestScreenWidth = context.getResources().getConfiguration().smallestScreenWidthDp; return smallestScreenWidth >= 600; } } app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java +3 −1 Original line number Diff line number Diff line package net.sourceforge.opencamera.ui; import net.sourceforge.opencamera.DeviceSettings; import net.sourceforge.opencamera.MyApplicationInterface; import net.sourceforge.opencamera.ScaleUtils; import net.sourceforge.opencamera.cameracontroller.CameraController; Loading Loading @@ -226,7 +227,8 @@ public class MainUI { MainActivity.SystemOrientation system_orientation = main_activity.getSystemOrientation(); boolean system_orientation_portrait = system_orientation == MainActivity.SystemOrientation.PORTRAIT; boolean system_orientation_reversed_landscape = system_orientation == MainActivity.SystemOrientation.REVERSE_LANDSCAPE; boolean system_orientation_reversed_landscape = !DeviceSettings.isTablet(main_activity) && system_orientation == MainActivity.SystemOrientation.REVERSE_LANDSCAPE; if( MyDebug.LOG ) { Log.d(TAG, " system_orientation = " + system_orientation); Log.d(TAG, " system_orientation_portrait? " + system_orientation_portrait); Loading Loading
app/src/main/java/net/sourceforge/opencamera/DeviceSettings.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package net.sourceforge.opencamera; import android.content.Context; import android.os.Build; import java.util.Locale; Loading @@ -42,4 +43,9 @@ public class DeviceSettings { public static boolean isMurenaTwo() { return Build.DEVICE.toLowerCase(Locale.US).contains("two"); } public static boolean isTablet(Context context) { int smallestScreenWidth = context.getResources().getConfiguration().smallestScreenWidthDp; return smallestScreenWidth >= 600; } }
app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java +3 −1 Original line number Diff line number Diff line package net.sourceforge.opencamera.ui; import net.sourceforge.opencamera.DeviceSettings; import net.sourceforge.opencamera.MyApplicationInterface; import net.sourceforge.opencamera.ScaleUtils; import net.sourceforge.opencamera.cameracontroller.CameraController; Loading Loading @@ -226,7 +227,8 @@ public class MainUI { MainActivity.SystemOrientation system_orientation = main_activity.getSystemOrientation(); boolean system_orientation_portrait = system_orientation == MainActivity.SystemOrientation.PORTRAIT; boolean system_orientation_reversed_landscape = system_orientation == MainActivity.SystemOrientation.REVERSE_LANDSCAPE; boolean system_orientation_reversed_landscape = !DeviceSettings.isTablet(main_activity) && system_orientation == MainActivity.SystemOrientation.REVERSE_LANDSCAPE; if( MyDebug.LOG ) { Log.d(TAG, " system_orientation = " + system_orientation); Log.d(TAG, " system_orientation_portrait? " + system_orientation_portrait); Loading