wip
authortobiasKaminsky <tobias@kaminsky.me>
Sun, 25 Oct 2015 11:50:54 +0000 (12:50 +0100)
committertobiasKaminsky <tobias@kaminsky.me>
Sun, 25 Oct 2015 11:50:54 +0000 (12:50 +0100)
res/values/strings.xml
src/com/owncloud/android/media/MediaService.java

index 2c101ae..9173f06 100644 (file)
     <string name="file_list__footer__files_and_folder">%1$d files, 1 folder</string>
     <string name="file_list__footer__files_and_folders">%1$d files, %2$d folders</string>
     <string name="action_stream_file">Stream file with external player</string>
+    <string name="stream_expose_password">May expose password?</string>
 
 </resources>
index db64610..15fad66 100644 (file)
@@ -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
                     }