76 lines
1.5 KiB
Smali
76 lines
1.5 KiB
Smali
.class public Lcom/google/api/client/extensions/android/AndroidUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "AndroidUtils.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcom/google/api/client/util/Beta;
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static checkMinimumSdkLevel(I)V
|
|
.locals 4
|
|
|
|
.line 1
|
|
invoke-static {p0}, Lcom/google/api/client/extensions/android/AndroidUtils;->isMinimumSdkLevel(I)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
const-string p0, "running on Android SDK level %s but requires minimum %s"
|
|
|
|
invoke-static {v0, p0, v1}, Lcom/google/api/client/util/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static isMinimumSdkLevel(I)Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-lt v0, p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|