.class public Lua/b; .super Ljava/lang/Object; .source "MediaPlayerHelper.java" # static fields .field public static final a:Ljava/lang/String; = "MediaPlayerHelper" # direct methods .method public constructor ()V .locals 0 .line 1 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public static a(Landroid/media/MediaPlayer;)I .locals 1 if-eqz p0, :cond_0 .line 1 :try_start_0 invoke-virtual {p0}, Landroid/media/MediaPlayer;->getCurrentPosition()I move-result p0 :try_end_0 .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0 return p0 :catch_0 move-exception p0 const-string v0, "MediaPlayerHelper" .line 2 invoke-static {v0, p0}, Lcom/beyless/android/lib/util/log/BLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V :cond_0 const/4 p0, -0x1 return p0 .end method .method public static b(Landroid/media/MediaPlayer;)I .locals 1 if-eqz p0, :cond_0 .line 1 :try_start_0 invoke-virtual {p0}, Landroid/media/MediaPlayer;->getDuration()I move-result p0 :try_end_0 .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0 return p0 :catch_0 move-exception p0 const-string v0, "MediaPlayerHelper" .line 2 invoke-static {v0, p0}, Lcom/beyless/android/lib/util/log/BLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V :cond_0 const/4 p0, -0x1 return p0 .end method .method public static c(Landroid/media/MediaPlayer;)Z .locals 1 if-eqz p0, :cond_0 .line 1 :try_start_0 invoke-virtual {p0}, Landroid/media/MediaPlayer;->isPlaying()Z move-result p0 :try_end_0 .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0 return p0 :catch_0 move-exception p0 const-string v0, "MediaPlayerHelper" .line 2 invoke-static {v0, p0}, Lcom/beyless/android/lib/util/log/BLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V :cond_0 const/4 p0, 0x0 return p0 .end method .method public static d(Landroid/media/MediaPlayer;)Z .locals 1 if-eqz p0, :cond_0 .line 1 :try_start_0 invoke-virtual {p0}, Landroid/media/MediaPlayer;->pause()V :try_end_0 .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0 const/4 p0, 0x1 return p0 :catch_0 move-exception p0 const-string v0, "MediaPlayerHelper" .line 2 invoke-static {v0, p0}, Lcom/beyless/android/lib/util/log/BLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V :cond_0 const/4 p0, 0x0 return p0 .end method .method public static e(Landroid/media/MediaPlayer;I)Z .locals 0 if-eqz p0, :cond_0 .line 1 :try_start_0 invoke-virtual {p0, p1}, Landroid/media/MediaPlayer;->seekTo(I)V :try_end_0 .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0 const/4 p0, 0x1 return p0 :catch_0 move-exception p0 const-string p1, "MediaPlayerHelper" .line 2 invoke-static {p1, p0}, Lcom/beyless/android/lib/util/log/BLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V :cond_0 const/4 p0, 0x0 return p0 .end method .method public static f(Landroid/media/MediaPlayer;Ljava/lang/Object;)V .locals 1 .line 1 :try_start_0 instance-of v0, p1, Landroid/media/MediaDataSource; if-eqz v0, :cond_0 .line 2 check-cast p1, Landroid/media/MediaDataSource; invoke-virtual {p0, p1}, Landroid/media/MediaPlayer;->setDataSource(Landroid/media/MediaDataSource;)V return-void .line 3 :cond_0 instance-of v0, p1, Landroid/content/res/AssetFileDescriptor; if-eqz v0, :cond_1 .line 4 check-cast p1, Landroid/content/res/AssetFileDescriptor; invoke-virtual {p0, p1}, Landroid/media/MediaPlayer;->setDataSource(Landroid/content/res/AssetFileDescriptor;)V return-void .line 5 :cond_1 invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p1 invoke-virtual {p0, p1}, Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;)V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_1 :catch_0 move-exception p0 goto :goto_0 :catch_1 move-exception p0 :goto_0 const-string p1, "MediaPlayerHelper" .line 6 invoke-static {p1, p0}, Lcom/beyless/android/lib/util/log/BLog;->e(Ljava/lang/String;Ljava/lang/Throwable;)V :goto_1 return-void .end method .method public static g(Landroid/media/MediaPlayer;)Z .locals 1 if-eqz p0, :cond_0 .line 1 :try_start_0 invoke-virtual {p0}, Landroid/media/MediaPlayer;->start()V :try_end_0 .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0 const/4 p0, 0x1 return p0 :catch_0 move-exception p0 const-string v0, "MediaPlayerHelper" .line 2 invoke-static {v0, p0}, Lcom/beyless/android/lib/util/log/BLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V :cond_0 const/4 p0, 0x0 return p0 .end method