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.
1414 lines
39 KiB
1414 lines
39 KiB
.class public Lcom/viatech/camera/YoutubeLiveActivity; |
|
.super Landroid/app/Activity; |
|
.source "YoutubeLiveActivity.java" |
|
|
|
# interfaces |
|
.implements Lcom/viatech/camera/EventsListFragment$Callbacks; |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/MemberClasses; |
|
value = { |
|
Lcom/viatech/camera/YoutubeLiveActivity$EndEventTask;, |
|
Lcom/viatech/camera/YoutubeLiveActivity$StartEventTask;, |
|
Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;, |
|
Lcom/viatech/camera/YoutubeLiveActivity$GetLiveEventsTask;, |
|
Lcom/viatech/camera/YoutubeLiveActivity$ListRefresher; |
|
} |
|
.end annotation |
|
|
|
|
|
# static fields |
|
.field public static final ACCOUNT_KEY:Ljava/lang/String; = "YT_ACCOUNT_NAME" |
|
|
|
.field public static final BORADCAST_IDS:Ljava/lang/String; = "YT_BROADCAST_IDS" |
|
|
|
.field private static final CONCERNED_BROADCAST:Ljava/lang/String; = "ConceredBroadcast" |
|
|
|
.field public static final NAME:Ljava/lang/String; = "VpaiLive" |
|
|
|
.field private static final REFERESH_LIST_INTERVAL:I = 0x9c4 |
|
|
|
.field private static final REFRESH_LIST:I = 0x3e9 |
|
|
|
.field private static final REQUEST_ACCOUNT_PICKER:I = 0x2 |
|
|
|
.field private static final REQUEST_AUTHORIZATION:I = 0x3 |
|
|
|
.field private static final REQUEST_GOOGLE_PLAY_SERVICES:I = 0x0 |
|
|
|
.field public static final SCOPES:[Ljava/lang/String; |
|
|
|
.field private static final TAG:Ljava/lang/String; = "YoutubeLiveActivity" |
|
|
|
|
|
# instance fields |
|
.field private credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
.field final jsonFactory:Lcom/google/api/client/json/JsonFactory; |
|
|
|
.field private mAvaibility:Lcom/google/android/gms/common/GoogleApiAvailability; |
|
|
|
.field private mBroadcastIds:Ljava/util/ArrayList; |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Ljava/util/ArrayList", |
|
"<", |
|
"Ljava/lang/String;", |
|
">;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
.field private mChosenAccountName:Ljava/lang/String; |
|
|
|
.field private mEventDlg:Landroid/app/AlertDialog; |
|
|
|
.field private mEventsListFragment:Lcom/viatech/camera/EventsListFragment; |
|
|
|
.field mHandler:Landroid/os/Handler; |
|
|
|
.field private mLiveView:Landroid/view/View; |
|
|
|
.field private mProgressBar:Landroid/widget/ProgressBar; |
|
|
|
.field final transport:Lcom/google/api/client/http/HttpTransport; |
|
|
|
|
|
# direct methods |
|
.method static constructor <clinit>()V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 70 |
|
const/4 v0, 0x2 |
|
|
|
new-array v0, v0, [Ljava/lang/String; |
|
|
|
const/4 v1, 0x0 |
|
|
|
const-string v2, "profile" |
|
|
|
aput-object v2, v0, v1 |
|
|
|
const/4 v1, 0x1 |
|
|
|
const-string v2, "https://www.googleapis.com/auth/youtube" |
|
|
|
aput-object v2, v0, v1 |
|
|
|
sput-object v0, Lcom/viatech/camera/YoutubeLiveActivity;->SCOPES:[Ljava/lang/String; |
|
|
|
return-void |
|
.end method |
|
|
|
.method public constructor <init>()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 53 |
|
invoke-direct {p0}, Landroid/app/Activity;-><init>()V |
|
|
|
.line 72 |
|
invoke-static {}, Lcom/google/api/client/extensions/android/http/AndroidHttp;->newCompatibleTransport()Lcom/google/api/client/http/HttpTransport; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->transport:Lcom/google/api/client/http/HttpTransport; |
|
|
|
.line 73 |
|
new-instance v0, Lcom/google/api/client/json/jackson2/JacksonFactory; |
|
|
|
invoke-direct {v0}, Lcom/google/api/client/json/jackson2/JacksonFactory;-><init>()V |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->jsonFactory:Lcom/google/api/client/json/JsonFactory; |
|
|
|
.line 92 |
|
new-instance v0, Lcom/viatech/camera/YoutubeLiveActivity$1; |
|
|
|
invoke-direct {v0, p0}, Lcom/viatech/camera/YoutubeLiveActivity$1;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;)V |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mHandler:Landroid/os/Handler; |
|
|
|
return-void |
|
.end method |
|
|
|
.method static synthetic access$000(Lcom/viatech/camera/YoutubeLiveActivity;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 53 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->loadData()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method static synthetic access$100(Lcom/viatech/camera/YoutubeLiveActivity;)Lcom/google/android/gms/common/GoogleApiAvailability; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 53 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mAvaibility:Lcom/google/android/gms/common/GoogleApiAvailability; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$1100(Lcom/viatech/camera/YoutubeLiveActivity;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 53 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->saveBroadcastIds()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method static synthetic access$1200(Lcom/viatech/camera/YoutubeLiveActivity;)Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 53 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->getBroadcastList()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$500(Lcom/viatech/camera/YoutubeLiveActivity;)Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 53 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$600(Lcom/viatech/camera/YoutubeLiveActivity;)Lcom/viatech/camera/EventsListFragment; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 53 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventsListFragment:Lcom/viatech/camera/EventsListFragment; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$700(Lcom/viatech/camera/YoutubeLiveActivity;)Ljava/util/ArrayList; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 53 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$702(Lcom/viatech/camera/YoutubeLiveActivity;Ljava/util/ArrayList;)Ljava/util/ArrayList; |
|
.locals 0 |
|
|
|
.prologue |
|
.line 53 |
|
iput-object p1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
return-object p1 |
|
.end method |
|
|
|
.method private checkGooglePlayServicesAvailable()Z |
|
.locals 4 |
|
|
|
.prologue |
|
.line 208 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mAvaibility:Lcom/google/android/gms/common/GoogleApiAvailability; |
|
|
|
invoke-virtual {v0, p0}, Lcom/google/android/gms/common/GoogleApiAvailability;->isGooglePlayServicesAvailable(Landroid/content/Context;)I |
|
|
|
move-result v0 |
|
|
|
.line 209 |
|
const-string v1, "YoutubeLiveActivity" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "checkGooglePlayService " |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 211 |
|
if-eqz v0, :cond_1 |
|
|
|
.line 212 |
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mAvaibility:Lcom/google/android/gms/common/GoogleApiAvailability; |
|
|
|
invoke-virtual {v1, v0}, Lcom/google/android/gms/common/GoogleApiAvailability;->isUserResolvableError(I)Z |
|
|
|
move-result v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 213 |
|
invoke-virtual {p0, v0}, Lcom/viatech/camera/YoutubeLiveActivity;->showGooglePlayServicesAvailabilityErrorDialog(I)V |
|
|
|
.line 215 |
|
:cond_0 |
|
const/4 v0, 0x0 |
|
|
|
.line 218 |
|
:goto_0 |
|
return v0 |
|
|
|
:cond_1 |
|
const/4 v0, 0x1 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method private chooseAccount()V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 256 |
|
const-string v0, "YoutubeLiveActivity" |
|
|
|
const-string v1, "chooseAccount" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 257 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
invoke-virtual {v0}, Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;->newChooseAccountIntent()Landroid/content/Intent; |
|
|
|
move-result-object v0 |
|
|
|
const/4 v1, 0x2 |
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity;->startActivityForResult(Landroid/content/Intent;I)V |
|
|
|
.line 259 |
|
return-void |
|
.end method |
|
|
|
.method private getBroadcastList()Ljava/lang/String; |
|
.locals 6 |
|
|
|
.prologue |
|
.line 222 |
|
const-string v1, "" |
|
|
|
.line 223 |
|
const/4 v0, 0x0 |
|
|
|
.line 224 |
|
new-instance v3, Ljava/util/ArrayList; |
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V |
|
|
|
.line 225 |
|
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z |
|
|
|
.line 227 |
|
invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; |
|
|
|
move-result-object v4 |
|
|
|
move-object v2, v1 |
|
|
|
move v1, v0 |
|
|
|
:goto_0 |
|
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/String; |
|
|
|
.line 229 |
|
new-instance v5, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 230 |
|
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I |
|
|
|
move-result v2 |
|
|
|
add-int/lit8 v2, v2, -0x1 |
|
|
|
if-ge v1, v2, :cond_0 |
|
|
|
.line 231 |
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v2, "," |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 233 |
|
:cond_0 |
|
add-int/lit8 v1, v1, 0x1 |
|
|
|
move-object v2, v0 |
|
|
|
.line 234 |
|
goto :goto_0 |
|
|
|
.line 235 |
|
:cond_1 |
|
return-object v2 |
|
.end method |
|
|
|
.method private getLiveEvents(Ljava/lang/String;Ljava/lang/String;)V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 393 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
if-nez v0, :cond_0 |
|
|
|
.line 394 |
|
const-string v0, "YoutubeLiveActivity" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "getLiveEvents accountName is " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 399 |
|
:goto_0 |
|
return-void |
|
|
|
.line 398 |
|
:cond_0 |
|
new-instance v0, Lcom/viatech/camera/YoutubeLiveActivity$GetLiveEventsTask; |
|
|
|
const/4 v1, 0x0 |
|
|
|
invoke-direct {v0, p0, v1}, Lcom/viatech/camera/YoutubeLiveActivity$GetLiveEventsTask;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;Lcom/viatech/camera/YoutubeLiveActivity$ListRefresher;)V |
|
|
|
const/4 v1, 0x2 |
|
|
|
new-array v1, v1, [Ljava/lang/String; |
|
|
|
const/4 v2, 0x0 |
|
|
|
aput-object p1, v1, v2 |
|
|
|
const/4 v2, 0x1 |
|
|
|
aput-object p2, v1, v2 |
|
|
|
invoke-virtual {v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity$GetLiveEventsTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask; |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method private haveGooglePlayServices()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 263 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
invoke-virtual {v0}, Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;->getSelectedAccountName()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
if-nez v0, :cond_0 |
|
|
|
.line 265 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->chooseAccount()V |
|
|
|
.line 267 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
.method private loadAccount()V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 148 |
|
.line 149 |
|
invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; |
|
|
|
move-result-object v0 |
|
|
|
.line 150 |
|
const-string v1, "YT_ACCOUNT_NAME" |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
.line 152 |
|
return-void |
|
.end method |
|
|
|
.method private loadBroadcastIds()V |
|
.locals 6 |
|
|
|
.prologue |
|
.line 162 |
|
.line 163 |
|
invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; |
|
|
|
move-result-object v0 |
|
|
|
.line 164 |
|
const-string v1, "YT_BROADCAST_IDS" |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 165 |
|
if-eqz v0, :cond_0 |
|
|
|
.line 167 |
|
:try_start_0 |
|
new-instance v2, Lorg/json/JSONArray; |
|
|
|
invoke-direct {v2, v0}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V |
|
|
|
.line 168 |
|
new-instance v0, Ljava/util/ArrayList; |
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
.line 169 |
|
const/4 v0, 0x0 |
|
|
|
move v1, v0 |
|
|
|
:goto_0 |
|
invoke-virtual {v2}, Lorg/json/JSONArray;->length()I |
|
|
|
move-result v0 |
|
|
|
if-ge v1, v0, :cond_0 |
|
|
|
.line 170 |
|
invoke-virtual {v2, v1}, Lorg/json/JSONArray;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/String; |
|
|
|
.line 171 |
|
iget-object v3, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z |
|
|
|
.line 172 |
|
const-string v3, "YoutubeLiveActivity" |
|
|
|
new-instance v4, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v5, "load " |
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v4 |
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v3, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
.line 169 |
|
add-int/lit8 v0, v1, 0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 174 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 175 |
|
invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V |
|
|
|
.line 178 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
.method private loadData()V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 239 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
if-nez v0, :cond_0 |
|
|
|
.line 249 |
|
:goto_0 |
|
return-void |
|
|
|
.line 243 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I |
|
|
|
move-result v0 |
|
|
|
if-lez v0, :cond_1 |
|
|
|
.line 245 |
|
const-string v0, "ConceredBroadcast" |
|
|
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->getBroadcastList()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-direct {p0, v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity;->getLiveEvents(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
goto :goto_0 |
|
|
|
.line 247 |
|
:cond_1 |
|
const-string v0, "upcoming&active" |
|
|
|
const/4 v1, 0x0 |
|
|
|
invoke-direct {p0, v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity;->getLiveEvents(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method private refreshUntilLive(Ljava/lang/String;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 253 |
|
return-void |
|
.end method |
|
|
|
.method private saveAccount()V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 155 |
|
.line 156 |
|
invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; |
|
|
|
move-result-object v0 |
|
|
|
.line 157 |
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "YT_ACCOUNT_NAME" |
|
|
|
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; |
|
|
|
move-result-object v0 |
|
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V |
|
|
|
.line 158 |
|
return-void |
|
.end method |
|
|
|
.method private saveBroadcastIds()V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 181 |
|
.line 182 |
|
invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; |
|
|
|
move-result-object v0 |
|
|
|
.line 183 |
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 184 |
|
new-instance v1, Lorg/json/JSONArray; |
|
|
|
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
invoke-direct {v1, v2}, Lorg/json/JSONArray;-><init>(Ljava/util/Collection;)V |
|
|
|
.line 185 |
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; |
|
|
|
move-result-object v0 |
|
|
|
const-string v2, "YT_BROADCAST_IDS" |
|
|
|
invoke-virtual {v1}, Lorg/json/JSONArray;->toString()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; |
|
|
|
move-result-object v0 |
|
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V |
|
|
|
.line 187 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public createEvent(Landroid/view/View;)V |
|
.locals 4 |
|
|
|
.prologue |
|
.line 402 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventDlg:Landroid/app/AlertDialog; |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventDlg:Landroid/app/AlertDialog; |
|
|
|
invoke-virtual {v0}, Landroid/app/AlertDialog;->isShowing()Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 426 |
|
:goto_0 |
|
return-void |
|
|
|
.line 405 |
|
:cond_0 |
|
new-instance v0, Lcom/viatech/widget/VPaiDialog$Builder; |
|
|
|
invoke-direct {v0, p0}, Lcom/viatech/widget/VPaiDialog$Builder;-><init>(Landroid/content/Context;)V |
|
|
|
.line 406 |
|
const v1, 0x7f0700c9 |
|
|
|
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder; |
|
|
|
.line 407 |
|
new-instance v1, Landroid/widget/EditText; |
|
|
|
invoke-direct {v1, p0}, Landroid/widget/EditText;-><init>(Landroid/content/Context;)V |
|
|
|
.line 408 |
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/EditText;->setInputType(I)V |
|
|
|
.line 409 |
|
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder; |
|
|
|
.line 411 |
|
const v2, 0x7f07012d |
|
|
|
new-instance v3, Lcom/viatech/camera/YoutubeLiveActivity$4; |
|
|
|
invoke-direct {v3, p0, v1}, Lcom/viatech/camera/YoutubeLiveActivity$4;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;Landroid/widget/EditText;)V |
|
|
|
invoke-virtual {v0, v2, v3}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder; |
|
|
|
.line 417 |
|
const v1, 0x7f07005c |
|
|
|
new-instance v2, Lcom/viatech/camera/YoutubeLiveActivity$5; |
|
|
|
invoke-direct {v2, p0}, Lcom/viatech/camera/YoutubeLiveActivity$5;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;)V |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/viatech/widget/VPaiDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder; |
|
|
|
.line 424 |
|
invoke-virtual {v0}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventDlg:Landroid/app/AlertDialog; |
|
|
|
.line 425 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventDlg:Landroid/app/AlertDialog; |
|
|
|
invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method protected onActivityResult(IILandroid/content/Intent;)V |
|
.locals 4 |
|
|
|
.prologue |
|
const/4 v0, -0x1 |
|
|
|
.line 301 |
|
invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V |
|
|
|
.line 302 |
|
packed-switch p1, :pswitch_data_0 |
|
|
|
.line 338 |
|
:cond_0 |
|
:goto_0 |
|
:pswitch_0 |
|
return-void |
|
|
|
.line 304 |
|
:pswitch_1 |
|
if-ne p2, v0, :cond_1 |
|
|
|
.line 305 |
|
const-string v0, "YoutubeLiveActivity" |
|
|
|
const-string v1, "have google service" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 306 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mLiveView:Landroid/view/View; |
|
|
|
const/4 v1, 0x0 |
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V |
|
|
|
.line 307 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mProgressBar:Landroid/widget/ProgressBar; |
|
|
|
const/16 v1, 0x8 |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V |
|
|
|
.line 308 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->haveGooglePlayServices()V |
|
|
|
goto :goto_0 |
|
|
|
.line 312 |
|
:cond_1 |
|
const-string v0, "YoutubeLiveActivity" |
|
|
|
const-string v1, "google service is not avialable" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 314 |
|
invoke-virtual {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->finish()V |
|
|
|
goto :goto_0 |
|
|
|
.line 318 |
|
:pswitch_2 |
|
if-ne p2, v0, :cond_0 |
|
|
|
if-eqz p3, :cond_0 |
|
|
|
.line 319 |
|
invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle; |
|
|
|
move-result-object v0 |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 320 |
|
invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "authAccount" |
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 322 |
|
const-string v1, "YoutubeLiveActivity" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "account is " |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 323 |
|
if-eqz v0, :cond_0 |
|
|
|
.line 324 |
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
.line 325 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;->setSelectedAccountName(Ljava/lang/String;)Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
.line 326 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventsListFragment:Lcom/viatech/camera/EventsListFragment; |
|
|
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Lcom/viatech/camera/EventsListFragment;->setProfile(Ljava/lang/String;)V |
|
|
|
.line 327 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->saveAccount()V |
|
|
|
.line 328 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->loadData()V |
|
|
|
goto :goto_0 |
|
|
|
.line 333 |
|
:pswitch_3 |
|
if-eq p2, v0, :cond_0 |
|
|
|
.line 334 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->chooseAccount()V |
|
|
|
goto :goto_0 |
|
|
|
.line 302 |
|
:pswitch_data_0 |
|
.packed-switch 0x0 |
|
:pswitch_1 |
|
:pswitch_0 |
|
:pswitch_2 |
|
:pswitch_3 |
|
.end packed-switch |
|
.end method |
|
|
|
.method protected onCreate(Landroid/os/Bundle;)V |
|
.locals 4 |
|
|
|
.prologue |
|
const/16 v3, 0x8 |
|
|
|
const/4 v2, 0x0 |
|
|
|
.line 105 |
|
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V |
|
|
|
.line 106 |
|
const v0, 0x7f030038 |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/camera/YoutubeLiveActivity;->setContentView(I)V |
|
|
|
.line 107 |
|
invoke-static {}, Lcom/viatech/Config;->a()Lcom/viatech/Config; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, p0}, Lcom/viatech/Config;->a(Landroid/app/Activity;)V |
|
|
|
.line 109 |
|
const v0, 0x7f0c014d |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/camera/YoutubeLiveActivity;->findViewById(I)Landroid/view/View; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mLiveView:Landroid/view/View; |
|
|
|
.line 110 |
|
const v0, 0x7f0c0150 |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/camera/YoutubeLiveActivity;->findViewById(I)Landroid/view/View; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Landroid/widget/ProgressBar; |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mProgressBar:Landroid/widget/ProgressBar; |
|
|
|
.line 113 |
|
invoke-virtual {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->getFragmentManager()Landroid/app/FragmentManager; |
|
|
|
move-result-object v0 |
|
|
|
const v1, 0x7f0c014e |
|
|
|
invoke-virtual {v0, v1}, Landroid/app/FragmentManager;->findFragmentById(I)Landroid/app/Fragment; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/camera/EventsListFragment; |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventsListFragment:Lcom/viatech/camera/EventsListFragment; |
|
|
|
.line 116 |
|
invoke-virtual {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->getApplicationContext()Landroid/content/Context; |
|
|
|
move-result-object v0 |
|
|
|
sget-object v1, Lcom/viatech/camera/YoutubeLiveActivity;->SCOPES:[Ljava/lang/String; |
|
|
|
invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List; |
|
|
|
move-result-object v1 |
|
|
|
.line 115 |
|
invoke-static {v0, v1}, Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;->usingOAuth2(Landroid/content/Context;Ljava/util/Collection;)Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
.line 118 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
new-instance v1, Lcom/google/api/client/util/ExponentialBackOff; |
|
|
|
invoke-direct {v1}, Lcom/google/api/client/util/ExponentialBackOff;-><init>()V |
|
|
|
invoke-virtual {v0, v1}, Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;->setBackOff(Lcom/google/api/client/util/BackOff;)Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
.line 120 |
|
if-eqz p1, :cond_0 |
|
|
|
.line 121 |
|
const-string v0, "YT_ACCOUNT_NAME" |
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
.line 122 |
|
const-string v0, "YT_BROADCAST_IDS" |
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
.line 128 |
|
:goto_0 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->credential:Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;->setSelectedAccountName(Ljava/lang/String;)Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential; |
|
|
|
.line 129 |
|
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailability;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailability; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mAvaibility:Lcom/google/android/gms/common/GoogleApiAvailability; |
|
|
|
.line 131 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->checkGooglePlayServicesAvailable()Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
.line 132 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mLiveView:Landroid/view/View; |
|
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V |
|
|
|
.line 133 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mProgressBar:Landroid/widget/ProgressBar; |
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/ProgressBar;->setVisibility(I)V |
|
|
|
.line 134 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
if-nez v0, :cond_1 |
|
|
|
.line 135 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->chooseAccount()V |
|
|
|
.line 144 |
|
:goto_1 |
|
return-void |
|
|
|
.line 124 |
|
:cond_0 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->loadAccount()V |
|
|
|
.line 125 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->loadBroadcastIds()V |
|
|
|
goto :goto_0 |
|
|
|
.line 137 |
|
:cond_1 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mEventsListFragment:Lcom/viatech/camera/EventsListFragment; |
|
|
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Lcom/viatech/camera/EventsListFragment;->setProfile(Ljava/lang/String;)V |
|
|
|
.line 138 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->loadData()V |
|
|
|
goto :goto_1 |
|
|
|
.line 141 |
|
:cond_2 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mLiveView:Landroid/view/View; |
|
|
|
invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V |
|
|
|
.line 142 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mProgressBar:Landroid/widget/ProgressBar; |
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V |
|
|
|
goto :goto_1 |
|
.end method |
|
|
|
.method public onCreateOptionsMenu(Landroid/view/Menu;)Z |
|
.locals 2 |
|
|
|
.prologue |
|
.line 272 |
|
invoke-super {p0, p1}, Landroid/app/Activity;->onCreateOptionsMenu(Landroid/view/Menu;)Z |
|
|
|
.line 273 |
|
invoke-virtual {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->getMenuInflater()Landroid/view/MenuInflater; |
|
|
|
move-result-object v0 |
|
|
|
const v1, 0x7f0e0007 |
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V |
|
|
|
.line 274 |
|
invoke-super {p0, p1}, Landroid/app/Activity;->onCreateOptionsMenu(Landroid/view/Menu;)Z |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public onEndEvent(Lcom/via/vpailib/vpaiinterface/EventData;)V |
|
.locals 4 |
|
|
|
.prologue |
|
.line 352 |
|
new-instance v0, Lcom/viatech/camera/YoutubeLiveActivity$EndEventTask; |
|
|
|
const/4 v1, 0x0 |
|
|
|
invoke-direct {v0, p0, v1}, Lcom/viatech/camera/YoutubeLiveActivity$EndEventTask;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;Lcom/viatech/camera/YoutubeLiveActivity$1;)V |
|
|
|
const/4 v1, 0x1 |
|
|
|
new-array v1, v1, [Ljava/lang/String; |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-virtual {p1}, Lcom/via/vpailib/vpaiinterface/EventData;->getId()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
aput-object v3, v1, v2 |
|
|
|
invoke-virtual {v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity$EndEventTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask; |
|
|
|
.line 353 |
|
return-void |
|
.end method |
|
|
|
.method public onGetImageLoader()Lcom/android/volley/toolbox/ImageLoader; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 342 |
|
invoke-static {p0}, Lcom/viatech/util/NetworkSingleton;->getInstance(Landroid/content/Context;)Lcom/viatech/util/NetworkSingleton; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Lcom/viatech/util/NetworkSingleton;->getImageLoader()Lcom/android/volley/toolbox/ImageLoader; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 279 |
|
invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I |
|
|
|
move-result v0 |
|
|
|
packed-switch v0, :pswitch_data_0 |
|
|
|
.line 287 |
|
:goto_0 |
|
invoke-super {p0, p1}, Landroid/app/Activity;->onOptionsItemSelected(Landroid/view/MenuItem;)Z |
|
|
|
move-result v0 |
|
|
|
:goto_1 |
|
return v0 |
|
|
|
.line 281 |
|
:pswitch_0 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->loadData()V |
|
|
|
goto :goto_0 |
|
|
|
.line 284 |
|
:pswitch_1 |
|
invoke-direct {p0}, Lcom/viatech/camera/YoutubeLiveActivity;->chooseAccount()V |
|
|
|
.line 285 |
|
const/4 v0, 0x1 |
|
|
|
goto :goto_1 |
|
|
|
.line 279 |
|
nop |
|
|
|
:pswitch_data_0 |
|
.packed-switch 0x7f0c02f8 |
|
:pswitch_1 |
|
:pswitch_0 |
|
.end packed-switch |
|
.end method |
|
|
|
.method protected onSaveInstanceState(Landroid/os/Bundle;)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 292 |
|
invoke-super {p0, p1}, Landroid/app/Activity;->onSaveInstanceState(Landroid/os/Bundle;)V |
|
|
|
.line 293 |
|
const-string v0, "YT_ACCOUNT_NAME" |
|
|
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mChosenAccountName:Ljava/lang/String; |
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 294 |
|
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 295 |
|
const-string v0, "YT_BROADCAST_IDS" |
|
|
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mBroadcastIds:Ljava/util/ArrayList; |
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V |
|
|
|
.line 297 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
.method public onStartEvent(Lcom/via/vpailib/vpaiinterface/EventData;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 347 |
|
invoke-virtual {p0, p1}, Lcom/viatech/camera/YoutubeLiveActivity;->startStreaming(Lcom/via/vpailib/vpaiinterface/EventData;)V |
|
|
|
.line 348 |
|
return-void |
|
.end method |
|
|
|
.method public showGooglePlayServicesAvailabilityErrorDialog(I)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 191 |
|
new-instance v0, Lcom/viatech/camera/YoutubeLiveActivity$2; |
|
|
|
invoke-direct {v0, p0, p1}, Lcom/viatech/camera/YoutubeLiveActivity$2;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;I)V |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/camera/YoutubeLiveActivity;->runOnUiThread(Ljava/lang/Runnable;)V |
|
|
|
.line 200 |
|
return-void |
|
.end method |
|
|
|
.method public startStreaming(Lcom/via/vpailib/vpaiinterface/EventData;)V |
|
.locals 6 |
|
|
|
.prologue |
|
.line 364 |
|
invoke-virtual {p1}, Lcom/via/vpailib/vpaiinterface/EventData;->getId()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 374 |
|
const-string v1, "YoutubeLiveActivity" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "RTMP_URL_KEY=" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {p1}, Lcom/via/vpailib/vpaiinterface/EventData;->getIngestionAddress()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 375 |
|
const-string v1, "YoutubeLiveActivity" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "BROADCAST_ID_KEY=" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 380 |
|
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity;->mHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/camera/YoutubeLiveActivity$3; |
|
|
|
invoke-direct {v2, p0, v0}, Lcom/viatech/camera/YoutubeLiveActivity$3;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;Ljava/lang/String;)V |
|
|
|
const-wide/16 v4, 0x2710 |
|
|
|
invoke-virtual {v1, v2, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z |
|
|
|
.line 390 |
|
return-void |
|
.end method
|
|
|