105 lines
2.6 KiB
Smali
105 lines
2.6 KiB
Smali
.class public Lme/leolin/shortcutbadger/impl/EverythingMeHomeBadger;
|
|
.super Ljava/lang/Object;
|
|
.source "EverythingMeHomeBadger.java"
|
|
|
|
# interfaces
|
|
.implements Lme/leolin/shortcutbadger/Badger;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 19
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Ljava/util/List;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 37
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
const-string v1, "me.everything.launcher"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public a(Landroid/content/Context;Landroid/content/ComponentName;I)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lme/leolin/shortcutbadger/ShortcutBadgeException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 28
|
|
new-instance v0, Landroid/content/ContentValues;
|
|
|
|
invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V
|
|
|
|
const-string v1, "package_name"
|
|
|
|
.line 29
|
|
invoke-virtual {p2}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v1, "activity_name"
|
|
|
|
.line 30
|
|
invoke-virtual {p2}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v0, v1, p2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string p2, "count"
|
|
|
|
.line 31
|
|
invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {v0, p2, p3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
|
|
|
|
.line 32
|
|
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "content://me.everything.badger/apps"
|
|
|
|
invoke-static {p2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
|
|
|
|
return-void
|
|
.end method
|