X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/3ac67b3001eb36b0bcf49b0798a8d4e0dc1e9953..f15c2f32ceea2f2e6abff36f828a37196db3040a:/src/com/owncloud/android/media/MediaService.java diff --git a/src/com/owncloud/android/media/MediaService.java b/src/com/owncloud/android/media/MediaService.java index db64610a..7bd9c0c6 100644 --- a/src/com/owncloud/android/media/MediaService.java +++ b/src/com/owncloud/android/media/MediaService.java @@ -217,15 +217,16 @@ public class MediaService extends Service implements OnCompletionListener, OnPre public static AlertDialog.Builder streamWithExternalApp(final String uri, final Activity activity){ AlertDialog.Builder builder = new AlertDialog.Builder(activity); - builder.setMessage("May expose password?") - .setPositiveButton("Stream", new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - Intent i = new Intent(android.content.Intent.ACTION_VIEW); - i.setData(Uri.parse(uri)); - activity.startActivity(i); - } - }) - .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { + builder.setMessage(activity.getString(R.string.stream_expose_password)) + .setPositiveButton(activity.getString(R.string.common_yes), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(uri)); + activity.startActivity(i); + } + }) + .setNegativeButton(activity.getString(R.string.common_no), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User cancelled the dialog } @@ -453,11 +454,6 @@ public class MediaService extends Service implements OnCompletionListener, OnPre releaseResources(false); // release everything except MediaPlayer try { -// if (mFile == null) { -// Toast.makeText(this, R.string.media_err_nothing_to_play, Toast.LENGTH_LONG).show(); -// processStopRequest(true); -// return; - if (mAccount == null) { Toast.makeText(this, R.string.media_err_not_in_owncloud, Toast.LENGTH_LONG).show(); processStopRequest(true); @@ -467,7 +463,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre createMediaPlayerIfNeeded(); mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); String url = mFile.getStoragePath(); - // Streaming is not possible right now + if (url == null || url.length() <= 0) { url = AccountUtils.constructFullURLForAccount(this, mAccount) + mFile.getRemotePath(); }