granularity level: instruction

		.class public final Landroidx/core/os/EnvironmentCompat;
.super Ljava/lang/Object;
.source "EnvironmentCompat.java"


.field public static final MEDIA_UNKNOWN:Ljava/lang/String; = "unknown"
.field private static final TAG:Ljava/lang/String; = "EnvironmentCompat"


.method private constructor <init>()V
	.locals 0

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	return-void
.end method

.method public static getStorageState(Ljava/io/File;)Ljava/lang/String;
	.locals 2

	sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
	const/16 v1, 0x15
	if-lt v0, v1, :cond_0
	invoke-static {p0}, Landroid/os/Environment;->getExternalStorageState(Ljava/io/File;)Ljava/lang/String;
	move-result-object p0
	return-object p0
	:cond_0
	sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
	const/16 v1, 0x13
	if-lt v0, v1, :cond_1
	invoke-static {p0}, Landroid/os/Environment;->getStorageState(Ljava/io/File;)Ljava/lang/String;
	move-result-object p0
	return-object p0
	:try_start_0
	:cond_1
	invoke-virtual {p0}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;
	move-result-object p0
	invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;
	move-result-object v0
	invoke-virtual {v0}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;
	move-result-object v0
	invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
	move-result p0
	if-eqz p0, :cond_2
	invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;
	move-result-object p0
	:try_end_0
	.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
	return-object p0
	:catch_0
	move-exception p0
	new-instance v0, Ljava/lang/StringBuilder;
	invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
	const-string v1, "Failed to resolve canonical path: "
	invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
	invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p0
	const-string v0, "EnvironmentCompat"
	invoke-static {v0, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	:cond_2
	const-string p0, "unknown"
	return-object p0
.end method