Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
clean up & removed er-rUS translation (-> duplicate ressource)
Browse files Browse the repository at this point in the history
  • Loading branch information
y20k committed Oct 16, 2017
1 parent 3e14fe2 commit 12f2756
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 197 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {

vectorDrawables.useSupportLibrary = true

resConfigs "en", "ca", "de", "en-rUS", "el", "es", "eu", "fr", "ja", "nb-rNO", "pl", "ru", "sl", "sr", "tr", "uk", "v21", "v24", "w820dp", "zh-rCN"
resConfigs "en", "ca", "de", "el", "es", "eu", "fr", "ja", "nb-rNO", "pl", "ru", "sl", "sr", "tr", "uk", "v21", "v24", "w820dp", "zh-rCN"

}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/y20k/transistor/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public int handleStationRename(Station station, String newStationName) {
// initialize StorageHelper
StorageHelper storageHelper = new StorageHelper(this);

// create copys of station and main list of stations
// create copies of station and main list of stations
ArrayList<Station> newStationList = StationListHelper.copyStationList(mStationList);
Station newStation = new Station(station);

Expand Down
11 changes: 7 additions & 4 deletions app/src/main/java/org/y20k/transistor/PlayerFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private void copyToClipboard(int contentType) {
switch (contentType) {
case COPY_STATION_ALL:
// set clip text
if ( mThisStation.getMetadata() != null) {
if (mThisStation.getMetadata() != null) {
clipboardText = mThisStation.getStationName() + " - " + mThisStation.getMetadata() + " (" + mThisStation.getStreamUri().toString() + ")";
} else {
clipboardText = mThisStation.getStationName() + " (" + mThisStation.getStreamUri().toString() + ")";
Expand All @@ -483,13 +483,17 @@ private void copyToClipboard(int contentType) {

case COPY_STATION_METADATA:
// set clip text and notify user
clipboardText = mThisStation.getMetadata();
if (mThisStation.getMetadata() != null) {
clipboardText = mThisStation.getMetadata();
}
Toast.makeText(mActivity, mActivity.getString(R.string.toastmessage_copied_to_clipboard_metadata), Toast.LENGTH_SHORT).show();
break;

case COPY_STREAM_URL:
// set clip text and notify user
clipboardText = mThisStation.getStreamUri().toString();
if (mThisStation.getStreamUri() != null) {
clipboardText = mThisStation.getStreamUri().toString();
}
Toast.makeText(mActivity, mActivity.getString(R.string.toastmessage_copied_to_clipboard_url), Toast.LENGTH_SHORT).show();
break;

Expand Down Expand Up @@ -756,7 +760,6 @@ else if (!(newMetaData.equals(oldMetaData))) {
updateStationMetadataView(newStation);
}
// CASE: PLAYBACK STATE
// if (mThisStation.getStreamUri().equals(newStation.getStreamUri()) && mPlaybackState != newStation.getPlaybackState()) { // todo remove
if (mPlaybackState != newStation.getPlaybackState()) {
mPlaybackState = newStation.getPlaybackState();
changeVisualState(newStation);
Expand Down
21 changes: 18 additions & 3 deletions app/src/main/java/org/y20k/transistor/PlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,6 @@ private void saveAppState() {
* Inner class: Handles callback from active media session ***
*/
private final class MediaSessionCallback extends MediaSessionCompat.Callback {
// note: this can be replaced by MediaSessionConnector.PlaybackController (ExoPlayer)
@Override
public void onPlay() {
// start playback
Expand All @@ -855,7 +854,6 @@ public void onPlay() {
}
}


@Override
public void onPlayFromMediaId(String mediaId, Bundle extras) {
super.onPlayFromMediaId(mediaId, extras);
Expand All @@ -866,7 +864,6 @@ public void onPlayFromMediaId(String mediaId, Bundle extras) {
startPlayback();
}


@Override
public void onPause() {
// stop playback
Expand All @@ -879,6 +876,24 @@ public void onStop() {
stopPlayback(true);
}

@Override
public void onPlayFromSearch(String query, Bundle extras) {
super.onPlayFromSearch(query, extras);
// handle requests to begin playback from a search query (eg. Assistant, Android Auto, etc.)
}

@Override
public void onSkipToNext() {
super.onSkipToNext();
// handle requests to skip to the next media item
}

@Override
public void onSkipToPrevious() {
super.onSkipToPrevious();
// handle requests to skip to the previous media item
}

}
/**
* End of inner class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,14 +466,6 @@ private void handlePlaybackStateChange(Intent intent) {
private void handlePlaybackStateError(Intent intent) {
LogHelper.e(LOG_TAG, "Forcing a reload of station list. Did Transistor crash?");

// todo remove
// // check if a station has been transmitted
// if (intent != null && intent.hasExtra(EXTRA_STATION) && intent.getParcelableExtra(EXTRA_STATION) != null) {
// Station newStation = intent.getParcelableExtra(EXTRA_STATION);
// newStation.setPlaybackState(PLAYBACK_STATE_STOPPED);
// mCollectionViewModel.getPlayerServiceStation().setValue(newStation);
// }

mCollectionViewModel.getStationList().setValue(StationListHelper.loadStationListFromStorage(mActivity));

}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/org/y20k/transistor/core/Station.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public Station(File folder, Uri fileLocation) {

/* Constructor when given MediaMetadata (e.g. from Android Auto) */
public Station (MediaMetadataCompat stationMediaMetadata) {
// todo implement
mStationImageFile = new File(stationMediaMetadata.getString(METADATA_CUSTOM_KEY_IMAGE_FILE));
mStationImageSize = mStationImageFile.length();
mStationName = stationMediaMetadata.getString(METADATA_KEY_TITLE);
Expand Down
Loading

0 comments on commit 12f2756

Please sign in to comment.