.class Lorg/webrtc/audio/VolumeLogger; .super Ljava/lang/Object; .source "VolumeLogger.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lorg/webrtc/audio/VolumeLogger$LogVolumeTask; } .end annotation # static fields .field private static final TAG:Ljava/lang/String; = "VolumeLogger" .field private static final THREAD_NAME:Ljava/lang/String; = "WebRtcVolumeLevelLoggerThread" .field private static final TIMER_PERIOD_IN_SECONDS:I = 0x1e # instance fields .field private final audioManager:Landroid/media/AudioManager; .field private timer:Ljava/util/Timer; # direct methods .method public constructor (Landroid/media/AudioManager;)V .locals 0 .line 34 invoke-direct {p0}, Ljava/lang/Object;->()V iput-object p1, p0, Lorg/webrtc/audio/VolumeLogger;->audioManager:Landroid/media/AudioManager; return-void .end method .method static synthetic access$000(Lorg/webrtc/audio/VolumeLogger;)Landroid/media/AudioManager; .locals 0 .line 26 iget-object p0, p0, Lorg/webrtc/audio/VolumeLogger;->audioManager:Landroid/media/AudioManager; return-object p0 .end method # virtual methods .method public start()V .locals 8 .line 39 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "start" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-static {}, Lorg/webrtc/audio/WebRtcAudioUtils;->getThreadInfo()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, 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 const-string v1, "VolumeLogger" invoke-static {v1, v0}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V iget-object v0, p0, Lorg/webrtc/audio/VolumeLogger;->timer:Ljava/util/Timer; if-eqz v0, :cond_0 return-void .line 43 :cond_0 new-instance v0, Ljava/lang/StringBuilder; const-string v2, "audio mode is: " invoke-direct {v0, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-object v2, p0, Lorg/webrtc/audio/VolumeLogger;->audioManager:Landroid/media/AudioManager; invoke-virtual {v2}, Landroid/media/AudioManager;->getMode()I move-result v2 invoke-static {v2}, Lorg/webrtc/audio/WebRtcAudioUtils;->modeToString(I)Ljava/lang/String; move-result-object 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 invoke-static {v1, v0}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V .line 45 new-instance v2, Ljava/util/Timer; const-string v0, "WebRtcVolumeLevelLoggerThread" invoke-direct {v2, v0}, Ljava/util/Timer;->(Ljava/lang/String;)V iput-object v2, p0, Lorg/webrtc/audio/VolumeLogger;->timer:Ljava/util/Timer; .line 46 new-instance v3, Lorg/webrtc/audio/VolumeLogger$LogVolumeTask; iget-object v0, p0, Lorg/webrtc/audio/VolumeLogger;->audioManager:Landroid/media/AudioManager; const/4 v1, 0x2 invoke-virtual {v0, v1}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I move-result v0 iget-object v1, p0, Lorg/webrtc/audio/VolumeLogger;->audioManager:Landroid/media/AudioManager; const/4 v4, 0x0 .line 47 invoke-virtual {v1, v4}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I move-result v1 invoke-direct {v3, p0, v0, v1}, Lorg/webrtc/audio/VolumeLogger$LogVolumeTask;->(Lorg/webrtc/audio/VolumeLogger;II)V const-wide/16 v4, 0x0 const-wide/16 v6, 0x7530 .line 46 invoke-virtual/range {v2 .. v7}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;JJ)V return-void .end method .method public stop()V .locals 2 .line 77 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "stop" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-static {}, Lorg/webrtc/audio/WebRtcAudioUtils;->getThreadInfo()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, 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 const-string v1, "VolumeLogger" invoke-static {v1, v0}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V iget-object v0, p0, Lorg/webrtc/audio/VolumeLogger;->timer:Ljava/util/Timer; if-eqz v0, :cond_0 .line 79 invoke-virtual {v0}, Ljava/util/Timer;->cancel()V const/4 v0, 0x0 iput-object v0, p0, Lorg/webrtc/audio/VolumeLogger;->timer:Ljava/util/Timer; :cond_0 return-void .end method