51 lines
1.4 KiB
Java
51 lines
1.4 KiB
Java
package com.google.android.gms.common.util;
|
|
|
|
import android.annotation.TargetApi;
|
|
import android.content.Context;
|
|
import android.os.Build;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class DeviceProperties {
|
|
private static Boolean a;
|
|
private static Boolean b;
|
|
private static Boolean c;
|
|
|
|
@TargetApi(21)
|
|
public static boolean a(Context context) {
|
|
if (b == null) {
|
|
b = Boolean.valueOf(PlatformVersion.g() && context.getPackageManager().hasSystemFeature("cn.google"));
|
|
}
|
|
return b.booleanValue();
|
|
}
|
|
|
|
@TargetApi(20)
|
|
public static boolean b(Context context) {
|
|
if (a == null) {
|
|
a = Boolean.valueOf(PlatformVersion.f() && context.getPackageManager().hasSystemFeature("android.hardware.type.watch"));
|
|
}
|
|
return a.booleanValue();
|
|
}
|
|
|
|
@TargetApi(26)
|
|
public static boolean c(Context context) {
|
|
if (!b(context)) {
|
|
return false;
|
|
}
|
|
if (PlatformVersion.h()) {
|
|
return a(context) && !PlatformVersion.i();
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static boolean d(Context context) {
|
|
if (c == null) {
|
|
c = Boolean.valueOf(context.getPackageManager().hasSystemFeature("android.hardware.type.iot") || context.getPackageManager().hasSystemFeature("android.hardware.type.embedded"));
|
|
}
|
|
return c.booleanValue();
|
|
}
|
|
|
|
public static boolean a() {
|
|
return "user".equals(Build.TYPE);
|
|
}
|
|
}
|