package com.cpm.lorealbaautomation.utils;
public class EmulatorCheck {

    public static boolean isProbablyEmulator() {
        String fingerprint = android.os.Build.FINGERPRINT;
        String model = android.os.Build.MODEL;
        String manufacturer = android.os.Build.MANUFACTURER;
        String brand = android.os.Build.BRAND;
        String device = android.os.Build.DEVICE;
        String product = android.os.Build.PRODUCT;
        String tags = android.os.Build.TAGS;

        return (
                fingerprint != null && (fingerprint.startsWith("generic") || fingerprint.contains("test-keys")) ||
                        model != null && (model.contains("Emulator") || model.contains("Android SDK built for x86")) ||
                        manufacturer != null && (manufacturer.contains("Genymotion") || manufacturer.contains("unknown")) ||
                        brand != null && brand.startsWith("generic") && device != null && device.startsWith("generic") ||
                        product != null && (product.contains("sdk") || product.contains("emulator")) ||
                        tags != null && tags.contains("test-keys")
        );
    }
}

