今奥全景相机
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.

451 lines
13 KiB

.class Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;
.super Landroid/os/AsyncTask;
.source "YoutubeLiveActivity.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/viatech/camera/YoutubeLiveActivity;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x2
name = "CreateLiveEventTask"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroid/os/AsyncTask",
"<",
"Ljava/lang/String;",
"Ljava/lang/Void;",
"Ljava/util/List",
"<",
"Lcom/via/vpailib/vpaiinterface/EventData;",
">;>;"
}
.end annotation
# instance fields
.field private mStartTime:J
.field private progressDialog:Landroid/app/ProgressDialog;
.field final synthetic this$0:Lcom/viatech/camera/YoutubeLiveActivity;
# direct methods
.method private constructor <init>(Lcom/viatech/camera/YoutubeLiveActivity;)V
.locals 0
.prologue
.line 524
iput-object p1, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V
return-void
.end method
.method synthetic constructor <init>(Lcom/viatech/camera/YoutubeLiveActivity;Lcom/viatech/camera/YoutubeLiveActivity$1;)V
.locals 0
.prologue
.line 524
invoke-direct {p0, p1}, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;-><init>(Lcom/viatech/camera/YoutubeLiveActivity;)V
return-void
.end method
# virtual methods
.method protected bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
.locals 1
.prologue
.line 524
check-cast p1, [Ljava/lang/String;
invoke-virtual {p0, p1}, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->doInBackground([Ljava/lang/String;)Ljava/util/List;
move-result-object v0
return-object v0
.end method
.method protected varargs doInBackground([Ljava/lang/String;)Ljava/util/List;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Ljava/lang/String;",
")",
"Ljava/util/List",
"<",
"Lcom/via/vpailib/vpaiinterface/EventData;",
">;"
}
.end annotation
.prologue
.line 539
new-instance v0, Lcom/google/api/services/youtube/YouTube$Builder;
iget-object v1, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
iget-object v1, v1, Lcom/viatech/camera/YoutubeLiveActivity;->transport:Lcom/google/api/client/http/HttpTransport;
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
iget-object v2, v2, Lcom/viatech/camera/YoutubeLiveActivity;->jsonFactory:Lcom/google/api/client/json/JsonFactory;
iget-object v3, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
.line 540
invoke-static {v3}, Lcom/viatech/camera/YoutubeLiveActivity;->access$500(Lcom/viatech/camera/YoutubeLiveActivity;)Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/google/api/services/youtube/YouTube$Builder;-><init>(Lcom/google/api/client/http/HttpTransport;Lcom/google/api/client/json/JsonFactory;Lcom/google/api/client/http/HttpRequestInitializer;)V
const-string v1, "VpaiLive"
invoke-virtual {v0, v1}, Lcom/google/api/services/youtube/YouTube$Builder;->setApplicationName(Ljava/lang/String;)Lcom/google/api/services/youtube/YouTube$Builder;
move-result-object v0
.line 541
invoke-virtual {v0}, Lcom/google/api/services/youtube/YouTube$Builder;->build()Lcom/google/api/services/youtube/YouTube;
move-result-object v1
.line 543
:try_start_0
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
invoke-virtual {v0}, Ljava/util/Date;->toString()Ljava/lang/String;
move-result-object v2
.line 544
const/4 v0, 0x0
aget-object v0, p1, v0
.line 545
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
move-result v3
if-eqz v3, :cond_1
:cond_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Vpai - "
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
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 546
:cond_1
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Event - "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v2}, 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, v0}, Lcom/via/vpailib/vpaiinterface/YouTubeApi;->createLiveEvent(Lcom/google/api/services/youtube/YouTube;Ljava/lang/String;Ljava/lang/String;)V
.line 548
invoke-static {v1}, Lcom/via/vpailib/vpaiinterface/YouTubeApi;->getUpcomingAndActiveEvents(Lcom/google/api/services/youtube/YouTube;)Ljava/util/List;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
.line 557
:goto_0
return-object v0
.line 554
:catch_0
move-exception v0
.line 555
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
.line 557
const/4 v0, 0x0
goto :goto_0
.end method
.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
.locals 0
.prologue
.line 524
check-cast p1, Ljava/util/List;
invoke-virtual {p0, p1}, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->onPostExecute(Ljava/util/List;)V
return-void
.end method
.method protected onPostExecute(Ljava/util/List;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Lcom/via/vpailib/vpaiinterface/EventData;",
">;)V"
}
.end annotation
.prologue
.line 564
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
const v1, 0x7f0c014f
invoke-virtual {v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/Button;
.line 565
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V
.line 567
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->progressDialog:Landroid/app/ProgressDialog;
invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V
.line 568
const-string v0, "YoutubeLiveActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "createevent cost "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v2
iget-wide v4, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->mStartTime:J
sub-long/2addr v2, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)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;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 570
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
invoke-static {v0}, Lcom/viatech/camera/YoutubeLiveActivity;->access$700(Lcom/viatech/camera/YoutubeLiveActivity;)Ljava/util/ArrayList;
move-result-object v0
if-nez v0, :cond_0
.line 571
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
invoke-static {v0, v1}, Lcom/viatech/camera/YoutubeLiveActivity;->access$702(Lcom/viatech/camera/YoutubeLiveActivity;Ljava/util/ArrayList;)Ljava/util/ArrayList;
.line 575
:goto_0
if-eqz p1, :cond_1
.line 576
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_1
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/via/vpailib/vpaiinterface/EventData;
.line 577
const-string v2, "YoutubeLiveActivity"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "id:"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v0}, Lcom/via/vpailib/vpaiinterface/EventData;->getId()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, ", event: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v0}, Lcom/via/vpailib/vpaiinterface/EventData;->getIngestionAddress()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 578
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
invoke-static {v2}, Lcom/viatech/camera/YoutubeLiveActivity;->access$700(Lcom/viatech/camera/YoutubeLiveActivity;)Ljava/util/ArrayList;
move-result-object v2
invoke-virtual {v0}, Lcom/via/vpailib/vpaiinterface/EventData;->getId()Ljava/lang/String;
move-result-object v0
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_1
.line 573
:cond_0
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
invoke-static {v0}, Lcom/viatech/camera/YoutubeLiveActivity;->access$700(Lcom/viatech/camera/YoutubeLiveActivity;)Ljava/util/ArrayList;
move-result-object v0
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
goto :goto_0
.line 582
:cond_1
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
invoke-static {v0}, Lcom/viatech/camera/YoutubeLiveActivity;->access$600(Lcom/viatech/camera/YoutubeLiveActivity;)Lcom/viatech/camera/EventsListFragment;
move-result-object v0
invoke-virtual {v0, p1}, Lcom/viatech/camera/EventsListFragment;->setEvents(Ljava/util/List;)V
.line 583
return-void
.end method
.method protected onPreExecute()V
.locals 5
.prologue
const/4 v4, 0x1
.line 531
iget-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
const/4 v1, 0x0
iget-object v2, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->this$0:Lcom/viatech/camera/YoutubeLiveActivity;
.line 532
invoke-virtual {v2}, Lcom/viatech/camera/YoutubeLiveActivity;->getResources()Landroid/content/res/Resources;
move-result-object v2
const v3, 0x7f070074
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
.line 531
invoke-static {v0, v1, v2, v4, v4}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZZ)Landroid/app/ProgressDialog;
move-result-object v0
iput-object v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->progressDialog:Landroid/app/ProgressDialog;
.line 533
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
iput-wide v0, p0, Lcom/viatech/camera/YoutubeLiveActivity$CreateLiveEventTask;->mStartTime:J
.line 534
return-void
.end method