parent
2f568c6400
commit
9dc003a753
1 changed files with 14 additions and 0 deletions
|
@ -29,6 +29,8 @@ import org.thoughtcrime.securesms.util.Util;
|
|||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import de.greenrobot.event.EventBus;
|
||||
|
||||
public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener {
|
||||
|
||||
private static final String TAG = AudioView.class.getSimpleName();
|
||||
|
@ -76,6 +78,18 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
if (!EventBus.getDefault().isRegistered(this)) EventBus.getDefault().registerSticky(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
public void setAudio(final @NonNull MasterSecret masterSecret,
|
||||
final @NonNull AudioSlide audio,
|
||||
final boolean showControls)
|
||||
|
|
Loading…
Add table
Reference in a new issue