Skip to content

Instantly share code, notes, and snippets.

@hdani9307
Created March 29, 2019 14:10
Show Gist options
  • Save hdani9307/fd1a9dbe06afec217e80fd724a0497fa to your computer and use it in GitHub Desktop.
Save hdani9307/fd1a9dbe06afec217e80fd724a0497fa to your computer and use it in GitHub Desktop.
.method public static d(Landroid/content/Context;)Z
.locals 2
const-string v0, "location"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/location/LocationManager;
const-string v1, "gps"
invoke-virtual {v0, v1}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment