103 lines
2.6 KiB
Smali
103 lines
2.6 KiB
Smali
.class public Lcom/moji/appwidget/daemon/bind/CancelNotificationService;
|
|
.super Landroid/app/Service;
|
|
.source "CancelNotificationService.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 16
|
|
invoke-direct {p0}, Landroid/app/Service;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
.locals 0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onCreate()V
|
|
.locals 2
|
|
|
|
.line 22
|
|
invoke-super {p0}, Landroid/app/Service;->onCreate()V
|
|
|
|
.line 24
|
|
:try_start_0
|
|
new-instance v0, Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
invoke-direct {v0, p0}, Landroid/support/v4/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V
|
|
|
|
sget v1, Lcom/moji/appwidget/R$drawable;->account_icon:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v4/app/NotificationCompat$Builder;->setSmallIcon(I)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
.line 25
|
|
invoke-virtual {v0}, Landroid/support/v4/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object v0
|
|
|
|
const/16 v1, 0x33
|
|
|
|
invoke-virtual {p0, v1, v0}, Lcom/moji/appwidget/daemon/bind/CancelNotificationService;->startForeground(ILandroid/app/Notification;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 26
|
|
invoke-virtual {p0, v0}, Lcom/moji/appwidget/daemon/bind/CancelNotificationService;->stopForeground(Z)V
|
|
|
|
const-string v0, "notification"
|
|
|
|
.line 27
|
|
invoke-virtual {p0, v0}, Lcom/moji/appwidget/daemon/bind/CancelNotificationService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/app/NotificationManager;
|
|
|
|
.line 28
|
|
invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V
|
|
|
|
.line 29
|
|
invoke-virtual {p0}, Lcom/moji/appwidget/daemon/bind/CancelNotificationService;->stopSelf()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v1, "CancelNotificationService"
|
|
|
|
.line 31
|
|
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onStartCommand(Landroid/content/Intent;II)I
|
|
.locals 0
|
|
|
|
.line 43
|
|
invoke-super {p0, p1, p2, p3}, Landroid/app/Service;->onStartCommand(Landroid/content/Intent;II)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|