You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
2.3 KiB
94 lines
2.3 KiB
.class public Lcom/viatech/util/APPChannelManager; |
|
.super Ljava/lang/Object; |
|
.source "APPChannelManager.java" |
|
|
|
|
|
# static fields |
|
.field public static final VPAI_APP_CHANNEL_GOOGLEPLAY:Ljava/lang/String; = "googleplay" |
|
|
|
.field private static final VPAI_APP_CHANNEL_META:Ljava/lang/String; = "VPAI_APP_CHANNEL" |
|
|
|
.field public static final VPAI_APP_CHANNEL_UNKNOWN:Ljava/lang/String; = "unknown" |
|
|
|
.field public static final VPAI_APP_CHANNEL_VPAIWEB:Ljava/lang/String; = "vpaiweb" |
|
|
|
|
|
# direct methods |
|
.method public constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 11 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method public static getChannelName(Landroid/content/Context;)Ljava/lang/String; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 20 |
|
const-string v0, "unknown" |
|
|
|
.line 22 |
|
:try_start_0 |
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
const/16 v2, 0x80 |
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo; |
|
|
|
move-result-object v0 |
|
|
|
.line 23 |
|
iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle; |
|
|
|
const-string v1, "VPAI_APP_CHANNEL" |
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String; |
|
:try_end_0 |
|
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
move-result-object v0 |
|
|
|
.line 28 |
|
:goto_0 |
|
return-object v0 |
|
|
|
.line 24 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 25 |
|
invoke-virtual {v0}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V |
|
|
|
.line 26 |
|
const-string v0, "unknown" |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public static isGooglePlayChannel(Landroid/content/Context;)Z |
|
.locals 2 |
|
|
|
.prologue |
|
.line 32 |
|
const-string v0, "googleplay" |
|
|
|
invoke-static {p0}, Lcom/viatech/util/APPChannelManager;->getChannelName(Landroid/content/Context;)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method
|
|
|