270 lines
6.8 KiB
Smali
270 lines
6.8 KiB
Smali
.class public Lcom/moji/external/provider/AlertProvider;
|
|
.super Landroid/content/ContentProvider;
|
|
.source "AlertProvider.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final a:Landroid/content/UriMatcher;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
.line 24
|
|
new-instance v0, Landroid/content/UriMatcher;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/UriMatcher;-><init>(I)V
|
|
|
|
sput-object v0, Lcom/moji/external/provider/AlertProvider;->a:Landroid/content/UriMatcher;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 20
|
|
invoke-direct {p0}, Landroid/content/ContentProvider;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
|
|
.locals 0
|
|
.param p1 # Landroid/net/Uri;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # [Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getType(Landroid/net/Uri;)Ljava/lang/String;
|
|
.locals 1
|
|
.param p1 # Landroid/net/Uri;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 58
|
|
sget-object v0, Lcom/moji/external/provider/AlertProvider;->a:Landroid/content/UriMatcher;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/UriMatcher;->match(Landroid/net/Uri;)I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
const-string p1, "vnd.android.cursor.item/alerts"
|
|
|
|
return-object p1
|
|
|
|
.line 63
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
|
|
.locals 0
|
|
.param p1 # Landroid/net/Uri;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/content/ContentValues;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onCreate()Z
|
|
.locals 4
|
|
|
|
.line 28
|
|
sget-object v0, Lcom/moji/external/provider/AlertProvider;->a:Landroid/content/UriMatcher;
|
|
|
|
const-string v1, "com.moji.hisense.provider.alert"
|
|
|
|
const-string v2, "/hisense/alert/*"
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/content/UriMatcher;->addURI(Ljava/lang/String;Ljava/lang/String;I)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
|
|
.locals 0
|
|
.param p1 # Landroid/net/Uri;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # [Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # [Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p5 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 37
|
|
:try_start_0
|
|
sget-object p3, Lcom/moji/external/provider/AlertProvider;->a:Landroid/content/UriMatcher;
|
|
|
|
invoke-virtual {p3, p1}, Landroid/content/UriMatcher;->match(Landroid/net/Uri;)I
|
|
|
|
move-result p3
|
|
|
|
const/4 p4, 0x1
|
|
|
|
if-eq p3, p4, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 40
|
|
:cond_0
|
|
invoke-static {}, Lcom/moji/external/manager/ExternalWeatherManager;->a()Lcom/moji/external/manager/ExternalWeatherManager;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3}, Lcom/moji/external/manager/ExternalWeatherManager;->b()Landroid/database/Cursor;
|
|
|
|
move-result-object p3
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
:try_start_1
|
|
const-string p2, ""
|
|
|
|
.line 43
|
|
invoke-virtual {p1}, Landroid/net/Uri;->getPathSegments()Ljava/util/List;
|
|
|
|
move-result-object p4
|
|
|
|
invoke-interface {p4}, Ljava/util/List;->size()I
|
|
|
|
move-result p4
|
|
|
|
const/4 p5, 0x3
|
|
|
|
if-lt p4, p5, :cond_1
|
|
|
|
.line 44
|
|
invoke-virtual {p1}, Landroid/net/Uri;->getPathSegments()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x2
|
|
|
|
invoke-interface {p1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
move-object p2, p1
|
|
|
|
check-cast p2, Ljava/lang/String;
|
|
|
|
.line 46
|
|
:cond_1
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p4, Lcom/moji/statistics/EVENT_TAG;->ALERT_READ:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {p1, p4, p2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
:try_end_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
move-object p2, p3
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
move-object p2, p3
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
:goto_0
|
|
const-string p3, "AlertProvider"
|
|
|
|
.line 50
|
|
invoke-static {p3, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_1
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
|
|
.locals 0
|
|
.param p1 # Landroid/net/Uri;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/content/ContentValues;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # [Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|