// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.util; import android.content.Intent; import android.os.Build; import java.security.InvalidParameterException; import java.util.Objects; public class OlioCompat { public static final int BATTERY_LOG_TYPE_API_19 = 0; public static final int BATTERY_LOG_TYPE_API_23 = 1; public static final String OLIO_G2_BUILD_MODEL = "msm8909w"; public static final String OLIO_H1_BUILD_MODEL = "h1"; public OlioCompat() { } public static int batteryLogType() { int i = 1; if (Objects.equals(Build.MODEL, "h1")) { i = 0; } else if (Objects.equals(Build.MODEL, "msm8909w")) { return 1; } return i; } public static boolean isCharging(Intent intent) { boolean flag; label0: { label1: { flag = true; boolean flag1 = false; if (!isH1()) { break label0; } int i = intent.getIntExtra("status", -1); if (i == -1) { throw new InvalidParameterException("chargingIntent needs to have an EXTRA_STATUS."); } if (i != 2) { flag = flag1; if (i != 5) { break label1; } } flag = true; } return flag; } int j = intent.getIntExtra("plugged", -1); if (j == -1) { throw new InvalidParameterException("chargingIntent needs to have an EXTRA_PLUGGED"); } if ((j & 4) == 0) { flag = false; } return flag; } public static boolean isH1() { boolean flag = false; if (Objects.equals(Build.MODEL, "h1")) { flag = true; } else if (Objects.equals(Build.MODEL, "msm8909w")) { return false; } return flag; } public static boolean supportsLegacyBluetooth() { return isH1(); } }