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

2570 lines
71 KiB

.class public Lcom/viatech/gallery/EditVideoActivity;
.super Landroid/app/Activity;
.source "EditVideoActivity.java"
# interfaces
.implements Landroid/media/MediaPlayer$OnCompletionListener;
.implements Landroid/media/MediaPlayer$OnErrorListener;
.implements Landroid/media/MediaPlayer$OnInfoListener;
.implements Landroid/media/MediaPlayer$OnPreparedListener;
.implements Landroid/view/TextureView$SurfaceTextureListener;
.implements Lcom/viatech/gallery/ClipBarView$OnTimeChangeListener;
# annotations
.annotation build Landroid/annotation/SuppressLint;
value = {
"NewApi"
}
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
}
.end annotation
# static fields
.field private static final FILE_SELECT_CODE:I = 0x64
.field private static final MSG_PROGRESS:I = 0x110
.field private static final MSG_PROGRESS_AUDIO:I = 0x111
.field private static final SEND_VIDEO_CODE:I = 0x65
.field private static final TAG:Ljava/lang/String; = "EditVideoActivity"
# instance fields
.field private mClipBarView:Lcom/viatech/gallery/ClipBarView;
.field private mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
.field private mEndTime:J
.field private mFileInfo:Lcom/viatech/gallery/FileInfo;
.field private final mHandler:Landroid/os/Handler;
.field private mIntentUri:Landroid/net/Uri;
.field private mKeepAudio:Z
.field private mMediaPlayer:Landroid/media/MediaPlayer;
.field private mMixAudioFile:Lcom/viatech/gallery/AudioFile;
.field private mMusicFileList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/viatech/gallery/AudioFile;",
">;"
}
.end annotation
.end field
.field private mMusicItemAdaper:Lcom/viatech/gallery/MusicItemAdaper;
.field private mMusicListView:Landroid/widget/ListView;
.field private mMusicPlayer:Landroid/media/MediaPlayer;
.field private mShareType:I
.field private mShareVideoStartImage:Landroid/view/View;
.field private mStartTime:J
.field private mTextureView:Landroid/view/TextureView;
.field private mThumbnailImage:[Landroid/widget/ImageView;
.field private mThumbnailImageIndex:I
.field private mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
.field private mTime:J
.field private mTimeTextView:Landroid/widget/TextView;
.field private mTotalTime:Landroid/widget/TextView;
.field private mWorkHandler:Landroid/os/Handler;
.field private mWorkThread:Landroid/os/HandlerThread;
# direct methods
.method public constructor <init>()V
.locals 6
.prologue
const-wide/16 v4, 0x0
const/4 v2, 0x0
const/4 v1, 0x0
.line 59
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
.line 77
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicFileList:Ljava/util/ArrayList;
.line 78
iput-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
.line 83
iput v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImageIndex:I
.line 84
const/4 v0, 0x6
new-array v0, v0, [Landroid/widget/ImageView;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
.line 87
iput-wide v4, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
.line 88
iput-wide v4, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
.line 91
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mKeepAudio:Z
.line 92
iput-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
.line 98
iput-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
.line 100
iput v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
.line 566
new-instance v0, Lcom/viatech/gallery/EditVideoActivity$6;
invoke-direct {v0, p0}, Lcom/viatech/gallery/EditVideoActivity$6;-><init>(Lcom/viatech/gallery/EditVideoActivity;)V
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
return-void
.end method
.method static synthetic access$000(Lcom/viatech/gallery/EditVideoActivity;)Landroid/media/MediaPlayer;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
return-object v0
.end method
.method static synthetic access$100(Lcom/viatech/gallery/EditVideoActivity;)Landroid/view/View;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareVideoStartImage:Landroid/view/View;
return-object v0
.end method
.method static synthetic access$1000(Lcom/viatech/gallery/EditVideoActivity;)Lcom/viatech/gallery/ClipBarView;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
return-object v0
.end method
.method static synthetic access$1100(Lcom/viatech/gallery/EditVideoActivity;)Landroid/media/MediaPlayer;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
return-object v0
.end method
.method static synthetic access$1200(Lcom/viatech/gallery/EditVideoActivity;)Lcom/viatech/gallery/AudioFile;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
return-object v0
.end method
.method static synthetic access$1202(Lcom/viatech/gallery/EditVideoActivity;Lcom/viatech/gallery/AudioFile;)Lcom/viatech/gallery/AudioFile;
.locals 0
.prologue
.line 59
iput-object p1, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
return-object p1
.end method
.method static synthetic access$1300(Lcom/viatech/gallery/EditVideoActivity;)Landroid/os/Handler;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
return-object v0
.end method
.method static synthetic access$200(Lcom/viatech/gallery/EditVideoActivity;)Lcom/viatech/gallery/MusicItemAdaper;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicItemAdaper:Lcom/viatech/gallery/MusicItemAdaper;
return-object v0
.end method
.method static synthetic access$302(Lcom/viatech/gallery/EditVideoActivity;Z)Z
.locals 0
.prologue
.line 59
iput-boolean p1, p0, Lcom/viatech/gallery/EditVideoActivity;->mKeepAudio:Z
return p1
.end method
.method static synthetic access$400(Lcom/viatech/gallery/EditVideoActivity;)Lcom/viatech/gallery/AudioFile;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
return-object v0
.end method
.method static synthetic access$402(Lcom/viatech/gallery/EditVideoActivity;Lcom/viatech/gallery/AudioFile;)Lcom/viatech/gallery/AudioFile;
.locals 0
.prologue
.line 59
iput-object p1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
return-object p1
.end method
.method static synthetic access$500(Lcom/viatech/gallery/EditVideoActivity;Lcom/viatech/gallery/AudioFile;)V
.locals 0
.prologue
.line 59
invoke-direct {p0, p1}, Lcom/viatech/gallery/EditVideoActivity;->playOrPauseMusic(Lcom/viatech/gallery/AudioFile;)V
return-void
.end method
.method static synthetic access$600(Lcom/viatech/gallery/EditVideoActivity;)Ljava/util/ArrayList;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicFileList:Ljava/util/ArrayList;
return-object v0
.end method
.method static synthetic access$700(Lcom/viatech/gallery/EditVideoActivity;)Landroid/widget/ListView;
.locals 1
.prologue
.line 59
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicListView:Landroid/widget/ListView;
return-object v0
.end method
.method static synthetic access$800(Lcom/viatech/gallery/EditVideoActivity;)J
.locals 2
.prologue
.line 59
iget-wide v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
return-wide v0
.end method
.method static synthetic access$900(Lcom/viatech/gallery/EditVideoActivity;)J
.locals 2
.prologue
.line 59
iget-wide v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
return-wide v0
.end method
.method private getPath(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;
.locals 7
.prologue
const/4 v6, 0x0
.line 716
const-string v0, "content"
invoke-virtual {p2}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_2
.line 717
const/4 v0, 0x1
new-array v2, v0, [Ljava/lang/String;
const/4 v0, 0x0
const-string v1, "_data"
aput-object v1, v2, v0
.line 721
:try_start_0
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
move-object v1, p2
invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v1
.line 722
:try_start_1
const-string v0, "_data"
invoke-interface {v1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I
move-result v0
.line 723
invoke-interface {v1}, Landroid/database/Cursor;->moveToFirst()Z
move-result v2
if-eqz v2, :cond_0
.line 724
invoke-interface {v1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
move-result-object v0
.line 736
:goto_0
return-object v0
.line 726
:catch_0
move-exception v0
move-object v1, v6
.line 727
:goto_1
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
.line 730
:cond_0
if-eqz v1, :cond_1
.line 731
invoke-interface {v1}, Landroid/database/Cursor;->close()V
:cond_1
move-object v0, v6
.line 736
goto :goto_0
.line 732
:cond_2
const-string v0, "file"
invoke-virtual {p2}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_1
.line 733
invoke-virtual {p2}, Landroid/net/Uri;->getPath()Ljava/lang/String;
move-result-object v0
goto :goto_0
.line 726
:catch_1
move-exception v0
goto :goto_1
.end method
.method private playOrPauseMusic(Lcom/viatech/gallery/AudioFile;)V
.locals 4
.prologue
const/4 v3, 0x0
const/16 v2, 0x111
.line 654
if-nez p1, :cond_1
.line 655
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 656
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V
.line 657
iput-object v3, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
.line 658
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V
.line 712
:cond_0
:goto_0
return-void
.line 663
:cond_1
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
if-nez v0, :cond_2
.line 664
new-instance v0, Landroid/media/MediaPlayer;
invoke-direct {v0}, Landroid/media/MediaPlayer;-><init>()V
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
.line 665
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
new-instance v1, Lcom/viatech/gallery/EditVideoActivity$7;
invoke-direct {v1, p0}, Lcom/viatech/gallery/EditVideoActivity$7;-><init>(Lcom/viatech/gallery/EditVideoActivity;)V
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setOnPreparedListener(Landroid/media/MediaPlayer$OnPreparedListener;)V
.line 679
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
new-instance v1, Lcom/viatech/gallery/EditVideoActivity$8;
invoke-direct {v1, p0}, Lcom/viatech/gallery/EditVideoActivity$8;-><init>(Lcom/viatech/gallery/EditVideoActivity;)V
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V
.line 700
:goto_1
:try_start_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {p1}, Lcom/viatech/gallery/AudioFile;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;)V
.line 701
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepareAsync()V
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_3
goto :goto_0
.line 702
:catch_0
move-exception v0
.line 703
invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V
goto :goto_0
.line 689
:cond_2
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
if-eqz v0, :cond_3
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
invoke-virtual {v0}, Lcom/viatech/gallery/AudioFile;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-virtual {p1}, Lcom/viatech/gallery/AudioFile;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
.line 690
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V
.line 691
iput-object v3, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
.line 692
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V
goto :goto_0
.line 695
:cond_3
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V
goto :goto_1
.line 704
:catch_1
move-exception v0
.line 705
invoke-virtual {v0}, Ljava/lang/SecurityException;->printStackTrace()V
goto :goto_0
.line 706
:catch_2
move-exception v0
.line 707
invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V
goto :goto_0
.line 708
:catch_3
move-exception v0
.line 709
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
goto :goto_0
.end method
# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
.locals 6
.prologue
const v5, 0x7f0700c4
.line 333
invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V
.line 334
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onActivityResult "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, " "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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 335
const/16 v0, 0x65
if-ne p1, v0, :cond_1
.line 336
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->finish()V
.line 418
:cond_0
:goto_0
return-void
.line 337
:cond_1
const/16 v0, 0x64
if-ne p1, v0, :cond_0
.line 338
const/4 v0, -0x1
if-ne p2, v0, :cond_0
.line 339
invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;
move-result-object v0
.line 340
invoke-direct {p0, p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->getPath(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;
move-result-object v1
.line 341
const-string v2, "EditVideoActivity"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "uri = "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 342
const-string v0, "EditVideoActivity"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "path = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v1}, 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 {v0, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 343
if-nez v1, :cond_2
.line 344
invoke-static {v5}, Lcom/viatech/VPaiApplication;->b(I)V
goto :goto_0
.line 348
:cond_2
new-instance v0, Lcom/viatech/gallery/AudioFile;
invoke-direct {v0, v1}, Lcom/viatech/gallery/AudioFile;-><init>(Ljava/lang/String;)V
.line 349
invoke-virtual {v0}, Lcom/viatech/gallery/AudioFile;->exists()Z
move-result v1
if-nez v1, :cond_3
.line 350
invoke-static {v5}, Lcom/viatech/VPaiApplication;->b(I)V
goto :goto_0
.line 359
:cond_3
new-instance v1, Lcom/viatech/gallery/ClipAudioView;
invoke-direct {v1, p0}, Lcom/viatech/gallery/ClipAudioView;-><init>(Landroid/content/Context;)V
.line 360
new-instance v2, Lcom/viatech/widget/VPaiDialog$Builder;
invoke-direct {v2, p0}, Lcom/viatech/widget/VPaiDialog$Builder;-><init>(Landroid/content/Context;)V
.line 361
const v3, 0x7f070063
invoke-virtual {v2, v3}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;
.line 362
invoke-virtual {v2, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;
.line 363
const v3, 0x7f07005c
const/4 v4, 0x0
invoke-virtual {v2, v3, v4}, Lcom/viatech/widget/VPaiDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 364
const v3, 0x7f07012d
new-instance v4, Lcom/viatech/gallery/EditVideoActivity$3;
invoke-direct {v4, p0, v1, v0}, Lcom/viatech/gallery/EditVideoActivity$3;-><init>(Lcom/viatech/gallery/EditVideoActivity;Lcom/viatech/gallery/ClipAudioView;Lcom/viatech/gallery/AudioFile;)V
invoke-virtual {v2, v3, v4}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 397
invoke-virtual {v2}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v2
.line 398
new-instance v3, Lcom/viatech/gallery/EditVideoActivity$4;
invoke-direct {v3, p0, v1, v0}, Lcom/viatech/gallery/EditVideoActivity$4;-><init>(Lcom/viatech/gallery/EditVideoActivity;Lcom/viatech/gallery/ClipAudioView;Lcom/viatech/gallery/AudioFile;)V
invoke-virtual {v2, v3}, Landroid/app/Dialog;->setOnShowListener(Landroid/content/DialogInterface$OnShowListener;)V
.line 406
new-instance v0, Lcom/viatech/gallery/EditVideoActivity$5;
invoke-direct {v0, p0, v1}, Lcom/viatech/gallery/EditVideoActivity$5;-><init>(Lcom/viatech/gallery/EditVideoActivity;Lcom/viatech/gallery/ClipAudioView;)V
invoke-virtual {v2, v0}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V
.line 414
const/4 v0, 0x0
invoke-virtual {v2, v0}, Landroid/app/Dialog;->setCancelable(Z)V
.line 415
invoke-virtual {v2}, Landroid/app/Dialog;->show()V
goto/16 :goto_0
.end method
.method public onBarLeftUp()V
.locals 4
.prologue
.line 543
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 544
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onBarLeftUp seek to "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
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 545
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
long-to-int v1, v2
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->seekTo(I)V
.line 546
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
invoke-virtual {v0, v2, v3}, Lcom/viatech/gallery/ClipBarView;->setProgressTime(J)V
.line 548
:cond_0
return-void
.end method
.method public onBarRightUp()V
.locals 4
.prologue
.line 552
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 553
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onBarRightUp seek to "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
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 554
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
long-to-int v1, v2
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->seekTo(I)V
.line 555
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
invoke-virtual {v0, v2, v3}, Lcom/viatech/gallery/ClipBarView;->setProgressTime(J)V
.line 557
:cond_0
return-void
.end method
.method public onCompletion(Landroid/media/MediaPlayer;)V
.locals 4
.prologue
.line 485
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onCompletion try to seek to "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
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;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 487
return-void
.end method
.method protected onCreate(Landroid/os/Bundle;)V
.locals 10
.prologue
const/4 v9, 0x3
const/4 v8, 0x2
const/4 v7, -0x2
const/4 v6, 0x0
const/4 v5, 0x1
.line 106
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 107
const v0, 0x7f030028
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->setContentView(I)V
.line 108
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 110
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->getIntent()Landroid/content/Intent;
move-result-object v1
.line 111
if-nez v1, :cond_0
.line 112
const-string v0, "EditVideoActivity"
const-string v2, "can not get intent"
invoke-static {v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 113
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->finish()V
.line 116
:cond_0
const-string v0, "android.intent.extra.STREAM"
invoke-virtual {v1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v0
check-cast v0, Landroid/net/Uri;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
.line 117
const-string v0, "share_type"
invoke-virtual {v1, v0, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v0
iput v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
.line 118
const-string v0, "FileInfo"
invoke-virtual {v1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v0
check-cast v0, Lcom/viatech/gallery/FileInfo;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mFileInfo:Lcom/viatech/gallery/FileInfo;
.line 119
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "uri = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, ", mShareType="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)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;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 120
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
if-nez v0, :cond_1
.line 121
const-string v0, "EditVideoActivity"
const-string v1, "can not get uri"
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 122
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->finish()V
.line 125
:cond_1
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->getActionBar()Landroid/app/ActionBar;
move-result-object v1
.line 126
if-eqz v1, :cond_4
.line 127
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v2, 0x7f02023d
invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/app/ActionBar;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.line 128
invoke-virtual {v1, v5}, Landroid/app/ActionBar;->setDisplayHomeAsUpEnabled(Z)V
.line 129
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x12
if-lt v0, v2, :cond_2
.line 130
const v0, 0x7f020081
invoke-virtual {v1, v0}, Landroid/app/ActionBar;->setHomeAsUpIndicator(I)V
.line 131
:cond_2
const/4 v0, 0x0
invoke-virtual {v1, v0}, Landroid/app/ActionBar;->setTitle(Ljava/lang/CharSequence;)V
.line 132
invoke-virtual {v1, v5}, Landroid/app/ActionBar;->setDisplayShowTitleEnabled(Z)V
.line 133
invoke-virtual {v1, v6}, Landroid/app/ActionBar;->setDisplayShowHomeEnabled(Z)V
.line 134
new-instance v2, Landroid/widget/TextView;
invoke-direct {v2, p0}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V
.line 136
const-string v0, ""
.line 137
iget v3, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
if-ne v3, v5, :cond_5
.line 138
const v0, 0x7f0700a5
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->getString(I)Ljava/lang/String;
move-result-object v0
.line 144
:cond_3
:goto_0
const v3, 0x7f070183
new-array v4, v5, [Ljava/lang/Object;
aput-object v0, v4, v6
invoke-virtual {p0, v3, v4}, Lcom/viatech/gallery/EditVideoActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 146
const/4 v0, -0x1
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setTextColor(I)V
.line 147
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v3, 0x7f0800c0
invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getDimension(I)F
move-result v0
invoke-virtual {v2, v6, v0}, Landroid/widget/TextView;->setTextSize(IF)V
.line 148
new-instance v0, Landroid/app/ActionBar$LayoutParams;
const/16 v3, 0x11
invoke-direct {v0, v7, v7, v3}, Landroid/app/ActionBar$LayoutParams;-><init>(III)V
invoke-virtual {v1, v2, v0}, Landroid/app/ActionBar;->setCustomView(Landroid/view/View;Landroid/app/ActionBar$LayoutParams;)V
.line 150
invoke-virtual {v1, v5}, Landroid/app/ActionBar;->setDisplayShowCustomEnabled(Z)V
.line 153
:cond_4
const v0, 0x7f0c00d3
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/viatech/gallery/ClipBarView;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
.line 154
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
invoke-virtual {v0, p0}, Lcom/viatech/gallery/ClipBarView;->setOnTimeChangeListener(Lcom/viatech/gallery/ClipBarView$OnTimeChangeListener;)V
.line 156
const v0, 0x7f0c00cb
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mTimeTextView:Landroid/widget/TextView;
.line 157
const v0, 0x7f0c00cc
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mTotalTime:Landroid/widget/TextView;
.line 158
const v0, 0x7f0c00ca
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareVideoStartImage:Landroid/view/View;
.line 159
const v0, 0x7f0c00c9
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/TextureView;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mTextureView:Landroid/view/TextureView;
.line 160
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mTextureView:Landroid/view/TextureView;
invoke-virtual {v0, p0}, Landroid/view/TextureView;->setSurfaceTextureListener(Landroid/view/TextureView$SurfaceTextureListener;)V
.line 161
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mTextureView:Landroid/view/TextureView;
new-instance v1, Lcom/viatech/gallery/EditVideoActivity$1;
invoke-direct {v1, p0}, Lcom/viatech/gallery/EditVideoActivity$1;-><init>(Lcom/viatech/gallery/EditVideoActivity;)V
invoke-virtual {v0, v1}, Landroid/view/TextureView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 180
const v0, 0x7f0c00d4
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ListView;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicListView:Landroid/widget/ListView;
.line 182
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicFileList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 183
new-instance v0, Lcom/viatech/gallery/AudioFile;
const-string v1, "/"
const v2, 0x7f0700c6
invoke-virtual {p0, v2}, Lcom/viatech/gallery/EditVideoActivity;->getString(I)Ljava/lang/String;
move-result-object v2
invoke-direct {v0, v1, v2}, Lcom/viatech/gallery/AudioFile;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 184
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicFileList:Ljava/util/ArrayList;
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 185
new-instance v1, Lcom/viatech/gallery/AudioFile;
const-string v2, "/"
const v3, 0x7f07010b
invoke-virtual {p0, v3}, Lcom/viatech/gallery/EditVideoActivity;->getString(I)Ljava/lang/String;
move-result-object v3
invoke-direct {v1, v2, v3}, Lcom/viatech/gallery/AudioFile;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 186
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicFileList:Ljava/util/ArrayList;
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 192
new-instance v1, Lcom/viatech/gallery/MusicItemAdaper;
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicFileList:Ljava/util/ArrayList;
invoke-direct {v1, v2, p0}, Lcom/viatech/gallery/MusicItemAdaper;-><init>(Ljava/util/List;Landroid/content/Context;)V
iput-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicItemAdaper:Lcom/viatech/gallery/MusicItemAdaper;
.line 193
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicItemAdaper:Lcom/viatech/gallery/MusicItemAdaper;
invoke-virtual {v1, v5}, Lcom/viatech/gallery/MusicItemAdaper;->setShowMore(Z)V
.line 194
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicItemAdaper:Lcom/viatech/gallery/MusicItemAdaper;
invoke-virtual {v0}, Lcom/viatech/gallery/AudioFile;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Lcom/viatech/gallery/MusicItemAdaper;->setCurrent(Ljava/lang/String;)V
.line 195
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicListView:Landroid/widget/ListView;
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicItemAdaper:Lcom/viatech/gallery/MusicItemAdaper;
invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V
.line 196
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicListView:Landroid/widget/ListView;
new-instance v1, Lcom/viatech/gallery/EditVideoActivity$2;
invoke-direct {v1, p0}, Lcom/viatech/gallery/EditVideoActivity$2;-><init>(Lcom/viatech/gallery/EditVideoActivity;)V
invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V
.line 231
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
const v0, 0x7f0c00cd
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
aput-object v0, v1, v6
.line 232
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
const v0, 0x7f0c00ce
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
aput-object v0, v1, v5
.line 233
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
const v0, 0x7f0c00cf
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
aput-object v0, v1, v8
.line 234
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
const v0, 0x7f0c00d0
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
aput-object v0, v1, v9
.line 235
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
const/4 v2, 0x4
const v0, 0x7f0c00d1
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
aput-object v0, v1, v2
.line 236
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
const/4 v2, 0x5
const v0, 0x7f0c00d2
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
aput-object v0, v1, v2
.line 238
new-instance v0, Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
invoke-direct {v0, p0, v1}, Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;-><init>(Lcom/viatech/gallery/EditVideoActivity;Landroid/net/Uri;)V
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
.line 239
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
invoke-virtual {v0, p0}, Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;->setListerner(Lcom/viatech/gallery/EditVideoActivity;)V
.line 240
new-instance v0, Landroid/os/HandlerThread;
const-string v1, "EditVideoThread"
invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mWorkThread:Landroid/os/HandlerThread;
.line 241
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mWorkThread:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V
.line 242
new-instance v0, Landroid/os/Handler;
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mWorkThread:Landroid/os/HandlerThread;
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mWorkHandler:Landroid/os/Handler;
.line 243
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mWorkHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 244
return-void
.line 139
:cond_5
iget v3, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
if-ne v3, v8, :cond_6
.line 140
const v0, 0x7f0701eb
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->getString(I)Ljava/lang/String;
move-result-object v0
goto/16 :goto_0
.line 141
:cond_6
iget v3, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
if-ne v3, v9, :cond_3
.line 142
const v0, 0x7f070046
invoke-virtual {p0, v0}, Lcom/viatech/gallery/EditVideoActivity;->getString(I)Ljava/lang/String;
move-result-object v0
goto/16 :goto_0
.end method
.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
.locals 2
.prologue
.line 301
const-string v0, "EditVideoActivity"
const-string v1, "onCreateOptionsMenu"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 303
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->getMenuInflater()Landroid/view/MenuInflater;
move-result-object v0
const v1, 0x7f0e0001
invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V
.line 304
const/4 v0, 0x1
return v0
.end method
.method protected onDestroy()V
.locals 3
.prologue
const/4 v2, 0x0
.line 248
const-string v0, "EditVideoActivity"
const-string v1, "onDestroy()"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 249
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 250
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V
.line 251
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V
.line 252
iput-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
.line 254
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_1
.line 255
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V
.line 256
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V
.line 257
iput-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
.line 258
iput-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
.line 261
:cond_1
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
if-eqz v0, :cond_2
.line 262
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailTask:Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;
invoke-virtual {v0}, Lcom/viatech/gallery/EditVideoActivity$ThumbnailTask;->stop()I
.line 264
:cond_2
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mWorkThread:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->quit()Z
.line 266
invoke-super {p0}, Landroid/app/Activity;->onDestroy()V
.line 267
return-void
.end method
.method public onError(Landroid/media/MediaPlayer;II)Z
.locals 3
.prologue
.line 491
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onError:what = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 492
const/4 v0, 0x0
return v0
.end method
.method public onInfo(Landroid/media/MediaPlayer;II)Z
.locals 3
.prologue
.line 497
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onInfo:what = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 498
const/4 v0, 0x0
return v0
.end method
.method protected onNewIntent(Landroid/content/Intent;)V
.locals 3
.prologue
.line 422
const-string v0, "EditVideoActivity"
const-string v1, "onNewIntent"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 423
invoke-super {p0, p1}, Landroid/app/Activity;->onNewIntent(Landroid/content/Intent;)V
.line 424
const-string v0, "android.intent.extra.STREAM"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v0
check-cast v0, Landroid/net/Uri;
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
.line 425
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 426
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "mIntentUri = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)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;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 427
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V
.line 428
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V
.line 429
const/4 v0, 0x0
iput-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
.line 431
:cond_0
return-void
.end method
.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
.locals 4
.prologue
.line 310
invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I
move-result v0
const v1, 0x102002c
if-ne v0, v1, :cond_1
.line 311
invoke-virtual {p0}, Lcom/viatech/gallery/EditVideoActivity;->finish()V
.line 328
:cond_0
:goto_0
const/4 v0, 0x1
return v0
.line 312
:cond_1
invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I
move-result v0
const v1, 0x7f0c02f4
if-ne v0, v1, :cond_0
.line 313
new-instance v0, Landroid/content/Intent;
const-class v1, Lcom/viatech/gallery/SendVideoActivity;
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 314
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
invoke-virtual {v0, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
.line 315
const-string v1, "start_time"
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
.line 316
const-string v1, "end_time"
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
.line 317
const-string v1, "keep_audio"
iget-boolean v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mKeepAudio:Z
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
.line 318
const-string v1, "share_type"
iget v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 319
const-string v1, "FileInfo"
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mFileInfo:Lcom/viatech/gallery/FileInfo;
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
.line 320
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
if-eqz v1, :cond_2
.line 321
const-string v1, "mix_audio"
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
invoke-virtual {v2}, Lcom/viatech/gallery/AudioFile;->getAbsolutePath()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 322
const-string v1, "mix_audio_start"
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
invoke-virtual {v2}, Lcom/viatech/gallery/AudioFile;->getStart()J
move-result-wide v2
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
.line 323
const-string v1, "mix_audio_end"
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMixAudioFile:Lcom/viatech/gallery/AudioFile;
invoke-virtual {v2}, Lcom/viatech/gallery/AudioFile;->getEnd()J
move-result-wide v2
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
.line 325
:cond_2
const/16 v1, 0x65
invoke-virtual {p0, v0, v1}, Lcom/viatech/gallery/EditVideoActivity;->startActivityForResult(Landroid/content/Intent;I)V
goto :goto_0
.end method
.method protected onPause()V
.locals 3
.prologue
const/4 v2, 0x0
.line 280
invoke-super {p0}, Landroid/app/Activity;->onPause()V
.line 281
const-string v0, "EditVideoActivity"
const-string v1, "onPause()"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 282
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 283
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
const/16 v1, 0x110
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V
.line 284
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z
move-result v0
if-eqz v0, :cond_0
.line 285
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V
.line 286
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareVideoStartImage:Landroid/view/View;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
.line 290
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_1
.line 291
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V
.line 292
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V
.line 293
iput-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mMusicPlayer:Landroid/media/MediaPlayer;
.line 294
iput-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mCurrentPlayAudioFile:Lcom/viatech/gallery/AudioFile;
.line 295
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
const/16 v1, 0x111
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V
.line 297
:cond_1
return-void
.end method
.method public onPrepared(Landroid/media/MediaPlayer;)V
.locals 6
.prologue
const/16 v2, 0x110
.line 503
const-string v0, "EditVideoActivity"
const-string v1, "onPrepared"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 504
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V
.line 505
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v2}, Landroid/os/Handler;->sendEmptyMessage(I)Z
.line 506
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->start()V
.line 507
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->getDuration()I
move-result v0
int-to-long v0, v0
iput-wide v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mTime:J
.line 510
iget v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
const/4 v1, 0x3
if-eq v0, v1, :cond_0
iget v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareType:I
const/4 v1, 0x5
if-ne v0, v1, :cond_1
.line 511
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
const-wide/16 v2, 0x2710
invoke-virtual {v0, v2, v3}, Lcom/viatech/gallery/ClipBarView;->setMaxIntervalTime(J)V
.line 516
:goto_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mTime:J
invoke-virtual {v0, v2, v3}, Lcom/viatech/gallery/ClipBarView;->setTimeLength(J)V
.line 517
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareVideoStartImage:Landroid/view/View;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
.line 518
new-instance v0, Ljava/text/DecimalFormat;
invoke-direct {v0}, Ljava/text/DecimalFormat;-><init>()V
.line 519
const-string v1, "0.0"
invoke-virtual {v0, v1}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V
.line 520
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mTotalTime:Landroid/widget/TextView;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, ""
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-wide v4, p0, Lcom/viatech/gallery/EditVideoActivity;->mTime:J
long-to-float v3, v4
const/high16 v4, 0x447a0000 # 1000.0f
div-float/2addr v3, v4
float-to-double v4, v3
invoke-virtual {v0, v4, v5}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
move-result-object v0
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v2, "sec."
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
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 521
return-void
.line 513
:cond_1
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mClipBarView:Lcom/viatech/gallery/ClipBarView;
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mTime:J
invoke-virtual {v0, v2, v3}, Lcom/viatech/gallery/ClipBarView;->setMaxIntervalTime(J)V
goto :goto_0
.end method
.method protected onResume()V
.locals 2
.prologue
const/16 v1, 0x110
.line 271
invoke-super {p0}, Landroid/app/Activity;->onResume()V
.line 272
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
.line 273
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V
.line 274
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z
.line 276
:cond_0
return-void
.end method
.method public onSurfaceTextureAvailable(Landroid/graphics/SurfaceTexture;II)V
.locals 3
.prologue
.line 435
const-string v0, "EditVideoActivity"
const-string v1, "onSurfaceTextureAvailable"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 437
new-instance v0, Landroid/view/Surface;
invoke-direct {v0, p1}, Landroid/view/Surface;-><init>(Landroid/graphics/SurfaceTexture;)V
.line 439
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v1, :cond_0
.line 440
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v1, v0}, Landroid/media/MediaPlayer;->setSurface(Landroid/view/Surface;)V
.line 464
:goto_0
return-void
.line 445
:cond_0
:try_start_0
new-instance v1, Landroid/media/MediaPlayer;
invoke-direct {v1}, Landroid/media/MediaPlayer;-><init>()V
iput-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
.line 446
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
iget-object v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mIntentUri:Landroid/net/Uri;
invoke-virtual {v1, p0, v2}, Landroid/media/MediaPlayer;->setDataSource(Landroid/content/Context;Landroid/net/Uri;)V
.line 447
iget-object v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v1, v0}, Landroid/media/MediaPlayer;->setSurface(Landroid/view/Surface;)V
.line 448
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
const/4 v1, 0x3
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setAudioStreamType(I)V
.line 449
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnPreparedListener(Landroid/media/MediaPlayer$OnPreparedListener;)V
.line 450
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V
.line 451
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setLooping(Z)V
.line 452
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnErrorListener(Landroid/media/MediaPlayer$OnErrorListener;)V
.line 453
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnInfoListener(Landroid/media/MediaPlayer$OnInfoListener;)V
.line 454
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepareAsync()V
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_3
goto :goto_0
.line 455
:catch_0
move-exception v0
.line 456
invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V
goto :goto_0
.line 457
:catch_1
move-exception v0
.line 458
invoke-virtual {v0}, Ljava/lang/SecurityException;->printStackTrace()V
goto :goto_0
.line 459
:catch_2
move-exception v0
.line 460
invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V
goto :goto_0
.line 461
:catch_3
move-exception v0
.line 462
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
goto :goto_0
.end method
.method public onSurfaceTextureDestroyed(Landroid/graphics/SurfaceTexture;)Z
.locals 2
.prologue
.line 468
const-string v0, "EditVideoActivity"
const-string v1, "onSurfaceTextureDestroyed"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 469
const/4 v0, 0x0
return v0
.end method
.method public onSurfaceTextureSizeChanged(Landroid/graphics/SurfaceTexture;II)V
.locals 2
.prologue
.line 474
const-string v0, "EditVideoActivity"
const-string v1, "onSurfaceTextureSizeChanged"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 476
return-void
.end method
.method public onSurfaceTextureUpdated(Landroid/graphics/SurfaceTexture;)V
.locals 0
.prologue
.line 481
return-void
.end method
.method public onThumnailUpdate(Landroid/graphics/Bitmap;I)V
.locals 3
.prologue
.line 560
const-string v0, "EditVideoActivity"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onThumnailUpdate time = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 561
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImage:[Landroid/widget/ImageView;
iget v1, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImageIndex:I
add-int/lit8 v2, v1, 0x1
iput v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mThumbnailImageIndex:I
aget-object v0, v0, v1
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
.line 562
return-void
.end method
.method public onTimeChange(JJ)V
.locals 9
.prologue
const-wide/16 v4, 0x0
const/4 v1, 0x0
const/high16 v8, 0x447a0000 # 1000.0f
.line 525
const-string v0, "EditVideoActivity"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "onTimeChange:start = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " ,end = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p3, p4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 527
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
cmp-long v0, v2, v4
if-nez v0, :cond_1
iget-wide v2, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
cmp-long v0, v2, v4
if-nez v0, :cond_1
.line 528
const/4 v0, 0x1
.line 529
:goto_0
iput-wide p1, p0, Lcom/viatech/gallery/EditVideoActivity;->mStartTime:J
.line 530
iput-wide p3, p0, Lcom/viatech/gallery/EditVideoActivity;->mEndTime:J
.line 531
new-instance v2, Ljava/text/DecimalFormat;
invoke-direct {v2}, Ljava/text/DecimalFormat;-><init>()V
.line 532
const-string v3, "0.0"
invoke-virtual {v2, v3}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V
.line 533
iget-object v3, p0, Lcom/viatech/gallery/EditVideoActivity;->mTimeTextView:Landroid/widget/TextView;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, ""
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
long-to-float v5, p1
div-float/2addr v5, v8
float-to-double v6, v5
invoke-virtual {v2, v6, v7}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, "sec. -- "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
long-to-float v5, p3
div-float/2addr v5, v8
float-to-double v6, v5
.line 534
invoke-virtual {v2, v6, v7}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v4, "sec."
invoke-virtual {v2, v4}, 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
.line 533
invoke-virtual {v3, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 535
if-nez v0, :cond_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z
move-result v0
if-eqz v0, :cond_0
.line 536
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mMediaPlayer:Landroid/media/MediaPlayer;
invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V
.line 537
iget-object v0, p0, Lcom/viatech/gallery/EditVideoActivity;->mShareVideoStartImage:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
.line 539
:cond_0
return-void
:cond_1
move v0, v1
goto :goto_0
.end method