549 lines
15 KiB
Smali
549 lines
15 KiB
Smali
|
|
.class public final Lcom/blankj/utilcode/util/ServiceUtils;
|
||
|
|
.super Ljava/lang/Object;
|
||
|
|
.source "ServiceUtils.java"
|
||
|
|
|
||
|
|
|
||
|
|
# direct methods
|
||
|
|
.method private constructor <init>()V
|
||
|
|
.locals 2
|
||
|
|
|
||
|
|
.line 25
|
||
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
|
||
|
|
.line 26
|
||
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
||
|
|
|
||
|
|
const-string v1, "u can\'t instantiate me..."
|
||
|
|
|
||
|
|
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
||
|
|
|
||
|
|
throw v0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)V
|
||
|
|
.locals 1
|
||
|
|
|
||
|
|
const-string v0, "Argument \'intent\' of type Intent (#0 out of 3, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 189
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
const-string v0, "Argument \'conn\' of type ServiceConnection (#1 out of 3, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 190
|
||
|
|
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 193
|
||
|
|
:try_start_0
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
invoke-virtual {v0, p0, p1, p2}, Landroid/app/Application;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
move-exception p0
|
||
|
|
|
||
|
|
.line 195
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
|
|
||
|
|
:goto_0
|
||
|
|
return-void
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static bindService(Ljava/lang/Class;Landroid/content/ServiceConnection;I)V
|
||
|
|
.locals 2
|
||
|
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
|
value = {
|
||
|
|
"(",
|
||
|
|
"Ljava/lang/Class<",
|
||
|
|
"*>;",
|
||
|
|
"Landroid/content/ServiceConnection;",
|
||
|
|
"I)V"
|
||
|
|
}
|
||
|
|
.end annotation
|
||
|
|
|
||
|
|
const-string v0, "Argument \'cls\' of type Class<?> (#0 out of 3, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 167
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
const-string v0, "Argument \'conn\' of type ServiceConnection (#1 out of 3, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 168
|
||
|
|
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 170
|
||
|
|
new-instance v0, Landroid/content/Intent;
|
||
|
|
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
invoke-direct {v0, v1, p0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
||
|
|
|
||
|
|
invoke-static {v0, p1, p2}, Lcom/blankj/utilcode/util/ServiceUtils;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)V
|
||
|
|
|
||
|
|
return-void
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static bindService(Ljava/lang/String;Landroid/content/ServiceConnection;I)V
|
||
|
|
.locals 1
|
||
|
|
|
||
|
|
const-string v0, "Argument \'className\' of type String (#0 out of 3, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 141
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
const-string v0, "Argument \'conn\' of type ServiceConnection (#1 out of 3, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 142
|
||
|
|
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 145
|
||
|
|
:try_start_0
|
||
|
|
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
||
|
|
|
||
|
|
move-result-object p0
|
||
|
|
|
||
|
|
invoke-static {p0, p1, p2}, Lcom/blankj/utilcode/util/ServiceUtils;->bindService(Ljava/lang/Class;Landroid/content/ServiceConnection;I)V
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
move-exception p0
|
||
|
|
|
||
|
|
.line 147
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
|
|
||
|
|
:goto_0
|
||
|
|
return-void
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static getAllRunningServices()Ljava/util/Set;
|
||
|
|
.locals 3
|
||
|
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
|
value = {
|
||
|
|
"()",
|
||
|
|
"Ljava/util/Set<",
|
||
|
|
"Ljava/lang/String;",
|
||
|
|
">;"
|
||
|
|
}
|
||
|
|
.end annotation
|
||
|
|
|
||
|
|
.line 35
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
const-string v1, "activity"
|
||
|
|
|
||
|
|
invoke-virtual {v0, v1}, Landroid/app/Application;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
check-cast v0, Landroid/app/ActivityManager;
|
||
|
|
|
||
|
|
const v1, 0x7fffffff
|
||
|
|
|
||
|
|
.line 36
|
||
|
|
invoke-virtual {v0, v1}, Landroid/app/ActivityManager;->getRunningServices(I)Ljava/util/List;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
.line 37
|
||
|
|
new-instance v1, Ljava/util/HashSet;
|
||
|
|
|
||
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
||
|
|
|
||
|
|
if-eqz v0, :cond_2
|
||
|
|
|
||
|
|
.line 38
|
||
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
||
|
|
|
||
|
|
move-result v2
|
||
|
|
|
||
|
|
if-nez v2, :cond_0
|
||
|
|
|
||
|
|
goto :goto_1
|
||
|
|
|
||
|
|
.line 39
|
||
|
|
:cond_0
|
||
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
:goto_0
|
||
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
||
|
|
|
||
|
|
move-result v2
|
||
|
|
|
||
|
|
if-eqz v2, :cond_1
|
||
|
|
|
||
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||
|
|
|
||
|
|
move-result-object v2
|
||
|
|
|
||
|
|
check-cast v2, Landroid/app/ActivityManager$RunningServiceInfo;
|
||
|
|
|
||
|
|
.line 40
|
||
|
|
iget-object v2, v2, Landroid/app/ActivityManager$RunningServiceInfo;->service:Landroid/content/ComponentName;
|
||
|
|
|
||
|
|
invoke-virtual {v2}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String;
|
||
|
|
|
||
|
|
move-result-object v2
|
||
|
|
|
||
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
:cond_1
|
||
|
|
return-object v1
|
||
|
|
|
||
|
|
:cond_2
|
||
|
|
:goto_1
|
||
|
|
const/4 v0, 0x0
|
||
|
|
|
||
|
|
return-object v0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static isServiceRunning(Ljava/lang/Class;)Z
|
||
|
|
.locals 1
|
||
|
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
|
value = {
|
||
|
|
"(",
|
||
|
|
"Ljava/lang/Class<",
|
||
|
|
"*>;)Z"
|
||
|
|
}
|
||
|
|
.end annotation
|
||
|
|
|
||
|
|
const-string v0, "Argument \'cls\' of type Class<?> (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 214
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 215
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
||
|
|
|
||
|
|
move-result-object p0
|
||
|
|
|
||
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/ServiceUtils;->isServiceRunning(Ljava/lang/String;)Z
|
||
|
|
|
||
|
|
move-result p0
|
||
|
|
|
||
|
|
return p0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static isServiceRunning(Ljava/lang/String;)Z
|
||
|
|
.locals 3
|
||
|
|
|
||
|
|
const-string v0, "Argument \'className\' of type String (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 224
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
const/4 v0, 0x0
|
||
|
|
|
||
|
|
.line 226
|
||
|
|
:try_start_0
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
const-string v2, "activity"
|
||
|
|
|
||
|
|
invoke-virtual {v1, v2}, Landroid/app/Application;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
check-cast v1, Landroid/app/ActivityManager;
|
||
|
|
|
||
|
|
const v2, 0x7fffffff
|
||
|
|
|
||
|
|
.line 227
|
||
|
|
invoke-virtual {v1, v2}, Landroid/app/ActivityManager;->getRunningServices(I)Ljava/util/List;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
if-eqz v1, :cond_2
|
||
|
|
|
||
|
|
.line 228
|
||
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
||
|
|
|
||
|
|
move-result v2
|
||
|
|
|
||
|
|
if-nez v2, :cond_0
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
.line 229
|
||
|
|
:cond_0
|
||
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
:cond_1
|
||
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
||
|
|
|
||
|
|
move-result v2
|
||
|
|
|
||
|
|
if-eqz v2, :cond_2
|
||
|
|
|
||
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||
|
|
|
||
|
|
move-result-object v2
|
||
|
|
|
||
|
|
check-cast v2, Landroid/app/ActivityManager$RunningServiceInfo;
|
||
|
|
|
||
|
|
.line 230
|
||
|
|
iget-object v2, v2, Landroid/app/ActivityManager$RunningServiceInfo;->service:Landroid/content/ComponentName;
|
||
|
|
|
||
|
|
invoke-virtual {v2}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String;
|
||
|
|
|
||
|
|
move-result-object v2
|
||
|
|
|
||
|
|
invoke-virtual {p0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
|
||
|
|
move-result v2
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
if-eqz v2, :cond_1
|
||
|
|
|
||
|
|
const/4 p0, 0x1
|
||
|
|
|
||
|
|
return p0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
:cond_2
|
||
|
|
:goto_0
|
||
|
|
return v0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static startService(Landroid/content/Intent;)V
|
||
|
|
.locals 2
|
||
|
|
|
||
|
|
const/16 v0, 0x20
|
||
|
|
|
||
|
|
.line 74
|
||
|
|
:try_start_0
|
||
|
|
invoke-virtual {p0, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
|
||
|
|
|
||
|
|
.line 75
|
||
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
||
|
|
|
||
|
|
const/16 v1, 0x1a
|
||
|
|
|
||
|
|
if-lt v0, v1, :cond_0
|
||
|
|
|
||
|
|
.line 76
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
invoke-virtual {v0, p0}, Landroid/app/Application;->startForegroundService(Landroid/content/Intent;)Landroid/content/ComponentName;
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
.line 78
|
||
|
|
:cond_0
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
invoke-virtual {v0, p0}, Landroid/app/Application;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
move-exception p0
|
||
|
|
|
||
|
|
.line 81
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
|
|
||
|
|
:goto_0
|
||
|
|
return-void
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static startService(Ljava/lang/Class;)V
|
||
|
|
.locals 2
|
||
|
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
|
value = {
|
||
|
|
"(",
|
||
|
|
"Ljava/lang/Class<",
|
||
|
|
"*>;)V"
|
||
|
|
}
|
||
|
|
.end annotation
|
||
|
|
|
||
|
|
const-string v0, "Argument \'cls\' of type Class<?> (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 63
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 64
|
||
|
|
new-instance v0, Landroid/content/Intent;
|
||
|
|
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
invoke-direct {v0, v1, p0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
||
|
|
|
||
|
|
invoke-static {v0}, Lcom/blankj/utilcode/util/ServiceUtils;->startService(Landroid/content/Intent;)V
|
||
|
|
|
||
|
|
return-void
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static startService(Ljava/lang/String;)V
|
||
|
|
.locals 1
|
||
|
|
|
||
|
|
const-string v0, "Argument \'className\' of type String (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 50
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 52
|
||
|
|
:try_start_0
|
||
|
|
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
||
|
|
|
||
|
|
move-result-object p0
|
||
|
|
|
||
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/ServiceUtils;->startService(Ljava/lang/Class;)V
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
goto :goto_0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
move-exception p0
|
||
|
|
|
||
|
|
.line 54
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
|
|
||
|
|
:goto_0
|
||
|
|
return-void
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static stopService(Landroid/content/Intent;)Z
|
||
|
|
.locals 1
|
||
|
|
|
||
|
|
const-string v0, "Argument \'intent\' of type Intent (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 116
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 118
|
||
|
|
:try_start_0
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
invoke-virtual {v0, p0}, Landroid/app/Application;->stopService(Landroid/content/Intent;)Z
|
||
|
|
|
||
|
|
move-result p0
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
return p0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
move-exception p0
|
||
|
|
|
||
|
|
.line 120
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
|
|
||
|
|
const/4 p0, 0x0
|
||
|
|
|
||
|
|
return p0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static stopService(Ljava/lang/Class;)Z
|
||
|
|
.locals 2
|
||
|
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
|
value = {
|
||
|
|
"(",
|
||
|
|
"Ljava/lang/Class<",
|
||
|
|
"*>;)Z"
|
||
|
|
}
|
||
|
|
.end annotation
|
||
|
|
|
||
|
|
const-string v0, "Argument \'cls\' of type Class<?> (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 106
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 107
|
||
|
|
new-instance v0, Landroid/content/Intent;
|
||
|
|
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v1
|
||
|
|
|
||
|
|
invoke-direct {v0, v1, p0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
||
|
|
|
||
|
|
invoke-static {v0}, Lcom/blankj/utilcode/util/ServiceUtils;->stopService(Landroid/content/Intent;)Z
|
||
|
|
|
||
|
|
move-result p0
|
||
|
|
|
||
|
|
return p0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static stopService(Ljava/lang/String;)Z
|
||
|
|
.locals 1
|
||
|
|
|
||
|
|
const-string v0, "Argument \'className\' of type String (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 91
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 93
|
||
|
|
:try_start_0
|
||
|
|
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
||
|
|
|
||
|
|
move-result-object p0
|
||
|
|
|
||
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/ServiceUtils;->stopService(Ljava/lang/Class;)Z
|
||
|
|
|
||
|
|
move-result p0
|
||
|
|
:try_end_0
|
||
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
|
||
|
|
return p0
|
||
|
|
|
||
|
|
:catch_0
|
||
|
|
move-exception p0
|
||
|
|
|
||
|
|
.line 95
|
||
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
|
|
||
|
|
const/4 p0, 0x0
|
||
|
|
|
||
|
|
return p0
|
||
|
|
.end method
|
||
|
|
|
||
|
|
.method public static unbindService(Landroid/content/ServiceConnection;)V
|
||
|
|
.locals 1
|
||
|
|
|
||
|
|
const-string v0, "Argument \'conn\' of type ServiceConnection (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
||
|
|
|
||
|
|
.line 204
|
||
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
|
||
|
|
.line 205
|
||
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
||
|
|
|
||
|
|
move-result-object v0
|
||
|
|
|
||
|
|
invoke-virtual {v0, p0}, Landroid/app/Application;->unbindService(Landroid/content/ServiceConnection;)V
|
||
|
|
|
||
|
|
return-void
|
||
|
|
.end method
|