From b61d8a3f786bd8e1d919899c69247d95bcf52da9 Mon Sep 17 00:00:00 2001 From: Karim Abou Zeid Date: Fri, 21 Aug 2015 21:45:52 +0200 Subject: [PATCH] Synced translations, clean up and increased build version. --- app/build.gradle | 4 +- app/src/main/assets/changelog.html | 2 +- .../gramophone/service/MusicService.java | 47 ++++++++++--------- app/src/main/res/values-pt-rBR/strings.xml | 22 ++++----- 4 files changed, 38 insertions(+), 37 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8ae9f37a..edb6ccdb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -50,8 +50,8 @@ android { applicationId "com.kabouzeid.gramophone" minSdkVersion 16 targetSdkVersion 23 - versionCode 66 - versionName "0.9.43 beta7" + versionCode 67 + versionName "0.9.44 beta1" } buildTypes { release { diff --git a/app/src/main/assets/changelog.html b/app/src/main/assets/changelog.html index deb56f17..77f098b2 100644 --- a/app/src/main/assets/changelog.html +++ b/app/src/main/assets/changelog.html @@ -25,7 +25,7 @@

You can view the changelog dialog again at any time from the about section.

-

Version 0.9.43 beta7

+

Version 0.9.43

  1. FIX: "Play next" not always working.. diff --git a/app/src/main/java/com/kabouzeid/gramophone/service/MusicService.java b/app/src/main/java/com/kabouzeid/gramophone/service/MusicService.java index 0abe8cd5..712a290b 100644 --- a/app/src/main/java/com/kabouzeid/gramophone/service/MusicService.java +++ b/app/src/main/java/com/kabouzeid/gramophone/service/MusicService.java @@ -55,8 +55,6 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; -import hugo.weaving.DebugLog; - /** * @author Karim Abou Zeid (kabouzeid), Andrew Neal */ @@ -398,7 +396,6 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP } } - @DebugLog private boolean prepareNext() { synchronized (this) { try { @@ -828,27 +825,31 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP } private void handleChange(@NonNull final String what) { - if (what.equals(PLAY_STATE_CHANGED)) { - final boolean isPlaying = isPlaying(); - playingNotificationHelper.updatePlayState(isPlaying); - WidgetMedium.updateWidgetsPlayState(this, isPlaying); - //noinspection deprecation - remoteControlClient.setPlaybackState(isPlaying ? RemoteControlClient.PLAYSTATE_PLAYING : RemoteControlClient.PLAYSTATE_PAUSED); - if (!isPlaying && getSongProgressMillis() > 0) { + switch (what) { + case PLAY_STATE_CHANGED: + final boolean isPlaying = isPlaying(); + playingNotificationHelper.updatePlayState(isPlaying); + WidgetMedium.updateWidgetsPlayState(this, isPlaying); + //noinspection deprecation + remoteControlClient.setPlaybackState(isPlaying ? RemoteControlClient.PLAYSTATE_PLAYING : RemoteControlClient.PLAYSTATE_PAUSED); + if (!isPlaying && getSongProgressMillis() > 0) { + savePositionInTrack(); + } + break; + case META_CHANGED: + updateNotification(); + updateWidgets(); + updateRemoteControlClient(); + savePosition(); savePositionInTrack(); - } - } else if (what.equals(META_CHANGED)) { - updateNotification(); - updateWidgets(); - updateRemoteControlClient(); - savePosition(); - savePositionInTrack(); - final Song currentSong = getCurrentSong(); - recentlyPlayedStore.addSongId(currentSong.id); - songPlayCountStore.bumpSongCount(currentSong.id); - } else if (what.equals(QUEUE_CHANGED)) { - saveState(); - prepareNext(); + final Song currentSong = getCurrentSong(); + recentlyPlayedStore.addSongId(currentSong.id); + songPlayCountStore.bumpSongCount(currentSong.id); + break; + case QUEUE_CHANGED: + saveState(); + prepareNext(); + break; } } diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 2665a5fc..b1d16a45 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -4,7 +4,7 @@ Atualmente ouvindo %1$s por %2$s. O arquivo de áudio Deseja definir %1$s como seu toque? - A faixa %1$s foi definida como seu toque. + Definir %1$s como seu toque. Definir como toque Compartilhar "Configurações" @@ -26,10 +26,10 @@ Artistas Músicas Playlists - Desculpe - ocorreu um erro ao tentar reproduzir esta faixa - Desculpe, n\u00e3o conseguimos encontrar a biografia deste artista. + N\u00e3o foi poss\u00edvel tocar essa m\u00fasica. + N\u00e3o foi poss\u00edvel encontrar a biografia dos artistas. Biografia - Não conseguimos obter o foco do áudio. + Foco do áudio negado. Álbum Artista Gênero @@ -37,7 +37,7 @@ Ano Faixa "Faixa (2 para faixa 2 ou 3004 para CD3 faixa 4)" - O campo de título ou artista do álbum está vazio. + O título ou artista está vazio. Gravando no arquivo Salvando alterações... Detalhes @@ -69,14 +69,14 @@ %1$d músicas excluidas N\u00e3o foi poss\u00edvel criar a playlist %1$s? ]]> - %1$s? Isto n\u00e3o pode ser desfeito!]]> - %1$d playlists? ]]> + %1$s? Isto n\u00e3o pode ser desfeito!]]> + %1$d playlists?]]> %1$s? ]]> %1$d faixas? ]]> - %1$s da playlist?]]> - %1$d musicas da playlist?]]> - Deletar Musica - Excluir Musicas + %1$s da playlist?]]> + %1$d músicas da playlist?]]> + Excluir música + Excluir músicas Remover Musica da Playlist Remover Musicas da Playlist Renomear Playlist