mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-30 04:36:47 +02:00
Can fold
This commit is contained in:
@@ -1728,6 +1728,16 @@ public class Helper {
|
||||
return (Build.DEVICE != null) && Build.DEVICE.matches(".+_cheets|cheets_.+");
|
||||
}
|
||||
|
||||
static boolean canFold(Context context) {
|
||||
try {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
return pm.hasSystemFeature(PackageManager.FEATURE_SENSOR_HINGE_ANGLE);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static boolean isWatch(Context context) {
|
||||
if (isSmartwatch == null)
|
||||
isSmartwatch = _isWatch(context);
|
||||
|
||||
Reference in New Issue
Block a user