diff --git a/MessengerProj/src/main/java/com/b44t/messenger/AndroidUtilities.java b/MessengerProj/src/main/java/com/b44t/messenger/AndroidUtilities.java
index c45aed2e7..af2bcef75 100644
--- a/MessengerProj/src/main/java/com/b44t/messenger/AndroidUtilities.java
+++ b/MessengerProj/src/main/java/com/b44t/messenger/AndroidUtilities.java
@@ -22,15 +22,15 @@
package com.b44t.messenger;
+import android.Manifest;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.Activity;
-import android.app.AlertDialog;
+import android.app.DownloadManager;
import android.content.ContentUris;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
@@ -41,8 +41,6 @@ import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Typeface;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
@@ -64,7 +62,6 @@ import android.widget.AbsListView;
import android.widget.EdgeEffect;
import android.widget.EditText;
import android.widget.ListView;
-import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -80,6 +77,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.nio.channels.FileChannel;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@@ -625,11 +623,11 @@ public class AndroidUtilities {
showHint(context, ApplicationLoader.applicationContext.getString(R.string.ErrorHint));
}
- public static void showHint(Context context, String text)
+ public static Toast showHint(Context context, String text)
{
- if( text != null ) {
- Toast.makeText(context, text, Toast.LENGTH_LONG).show();
- }
+ Toast t = Toast.makeText(context, text, Toast.LENGTH_LONG);
+ t.show();
+ return t;
}
public static void addToClipboard(CharSequence str) {
@@ -787,49 +785,6 @@ public class AndroidUtilities {
return null;
}
- public static CharSequence generateSearchName(String name, String name2, String q) {
- if (name == null && name2 == null) {
- return "";
- }
- SpannableStringBuilder builder = new SpannableStringBuilder();
- String wholeString = name;
- if (wholeString == null || wholeString.length() == 0) {
- wholeString = name2;
- } else if (name2 != null && name2.length() != 0) {
- wholeString += " " + name2;
- }
- wholeString = wholeString.trim();
- String lower = " " + wholeString.toLowerCase();
-
- int index;
- int lastIndex = 0;
- while ((index = lower.indexOf(" " + q, lastIndex)) != -1) {
- int idx = index - (index == 0 ? 0 : 1);
- int end = q.length() + (index == 0 ? 0 : 1) + idx;
-
- if (lastIndex != 0 && lastIndex != idx + 1) {
- builder.append(wholeString.substring(lastIndex, idx));
- } else if (lastIndex == 0 && idx != 0) {
- builder.append(wholeString.substring(0, idx));
- }
-
- String query = wholeString.substring(idx, end);
- if (query.startsWith(" ")) {
- builder.append(" ");
- }
- query = query.trim();
- builder.append(AndroidUtilities.replaceTags("" + query + ""));
-
- lastIndex = end;
- }
-
- if (lastIndex != -1 && lastIndex != wholeString.length()) {
- builder.append(wholeString.substring(lastIndex, wholeString.length()));
- }
-
- return builder;
- }
-
public static File generateVideoPath() {
try {
File storageDir = getAlbumDir();
@@ -918,44 +873,17 @@ public class AndroidUtilities {
return true;
}
- public static byte[] calcAuthKeyHash(byte[] auth_key) {
- byte[] sha1 = Utilities.computeSHA1(auth_key);
- byte[] key_hash = new byte[16];
- System.arraycopy(sha1, 0, key_hash, 0, 16);
- return key_hash;
- }
+ /* open, view, download files
+ **********************************************************************************************/
- /*
- public static void saveToDownloads()
+ public static String getMimetype(MessageObject message)
{
- if (Build.VERSION.SDK_INT >= 23 && getParentActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
- getParentActivity().requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 4);
- selectedObject = null;
- return;
- }
- String fileName = FileLoader.getDocumentFileName(selectedObject.getDocument());
- if (fileName == null || fileName.length() == 0) {
- fileName = selectedObject.getFileName();
- }
- String path = selectedObject.messageOwner.attachPath;
- if (path != null && path.length() > 0) {
- File temp = new File(path);
- if (!temp.exists()) {
- path = null;
- }
- }
- if (path == null || path.length() == 0) {
- path = FileLoader.getPathToMessage(selectedObject.messageOwner).toString();
- }
- MediaController.saveFile(path, getParentActivity(), selectedObject.isMusic() ? 3 : 2, fileName, selectedObject.getDocument() != null ? selectedObject.getDocument().mime_type : "");
-
+ return getMimetype(message.messageOwner.media.document.file_name, message.messageOwner.media.document.mime_type);
}
- */
- public static String getMimetypeForView(MessageObject message)
+ public static String getMimetype(String fileName, String def)
{
String mimeType = "application/octet-stream";
- String fileName = message.messageOwner.media.document.file_name;
try {
MimeTypeMap mimeMap = MimeTypeMap.getSingleton();
int idx = fileName.lastIndexOf('.');
@@ -964,7 +892,7 @@ public class AndroidUtilities {
mimeType = mimeMap.getMimeTypeFromExtension(ext.toLowerCase());
}
if (mimeType == null) {
- mimeType = message.messageOwner.media.document.mime_type;
+ mimeType = def==null? "application/octet-stream" : def;
}
}
catch(Exception e) {
@@ -984,11 +912,133 @@ public class AndroidUtilities {
uri = Uri.fromFile(file);
}
- String mimeType = getMimetypeForView(message);
+ String mimeType = getMimetype(message);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, mimeType);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
activity.startActivity(intent);
}
+
+ private static File getFineFilename(File path, String desiredName)
+ {
+ // get a fine file name by adding a number to the basename and avoid overwrites
+ for( int i = 0; i < 1000; i++ ) {
+ String testName = desiredName;
+ if( i > 0 ) {
+ String baseName=desiredName, ext = "";
+ int idx = desiredName.lastIndexOf('.');
+ if( idx != -1 ) {
+ baseName = desiredName.substring(0, idx);
+ ext = desiredName.substring(idx);
+ }
+ testName = String.format("%s-%d%s", baseName, i, ext);
+ }
+ File pathNFile = new File(path, testName);
+ if (!pathNFile.exists()) {
+ return pathNFile;
+ }
+ }
+ return null;
+ }
+
+ public static void saveMessageFileToExt(final Activity context, int msg_id)
+ {
+ if (Build.VERSION.SDK_INT >= 23 && context.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
+ context.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 4);
+ return;
+ }
+
+ MrMsg msg = MrMailbox.getMsg(msg_id);
+ final int msg_type = msg.getType();
+ String msg_file_path = msg.getParam('f', "");
+ final String msg_mime = msg.getParam('m', "application/octet-stream");
+ final String msg_file_name = msg.getFilename();
+ final File sourceFile = new File(msg_file_path);
+ if( !sourceFile.exists() ) {
+ showErrorHint(context);
+ return;
+ }
+
+ final Toast waitingHint = showHint(context, ApplicationLoader.applicationContext.getString(R.string.OneMomentPlease));
+
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ boolean allOkay = false;
+
+ try {
+ // get destination path
+ File destPath = null;
+ boolean add_to_download_manager = false;
+ if (msg_type == MrMsg.MR_MSG_IMAGE || msg_type == MrMsg.MR_MSG_VIDEO) {
+ destPath = AndroidUtilities.getAlbumDir();
+ } else if (msg_type == MrMsg.MR_MSG_FILE) {
+ destPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
+ add_to_download_manager = true;
+ } else if (msg_type == MrMsg.MR_MSG_AUDIO || msg_type == MrMsg.MR_MSG_VOICE ) {
+ destPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC);
+ }
+
+ // create destination path (must be done, see documentation for getExternalStoragePublicDirectory())
+ destPath.mkdirs();
+
+ File destPathNFile = getFineFilename(destPath, msg_file_name);
+ if( destPathNFile != null )
+ {
+ destPathNFile.createNewFile();
+ boolean copied = true;
+ FileChannel source = null;
+ FileChannel destination = null;
+ try {
+ source = new FileInputStream(sourceFile).getChannel();
+ destination = new FileOutputStream(destPathNFile).getChannel();
+ long size = source.size();
+ for (long a = 0; a < size; a += 4096) {
+ destination.transferFrom(source, a, Math.min(4096, size - a));
+ }
+ } catch (Exception e) {
+ copied = false;
+ } finally {
+ if (source != null) {
+ source.close();
+ }
+ if (destination != null) {
+ destination.close();
+ }
+ }
+
+ if (copied) {
+ if ( add_to_download_manager ) {
+ DownloadManager downloadManager = (DownloadManager) ApplicationLoader.applicationContext.getSystemService(Context.DOWNLOAD_SERVICE);
+ downloadManager.addCompletedDownload(destPathNFile.getName(), destPathNFile.getName(), false, getMimetype(msg_file_name, msg_mime), destPathNFile.getAbsolutePath(), destPathNFile.length(), true);
+ } else {
+ addMediaToGallery(Uri.fromFile(destPathNFile));
+ }
+ allOkay = true;
+ }
+ }
+ }
+ catch (Exception e) {
+ ;
+ }
+
+ final boolean allOkayFinal = allOkay;
+ AndroidUtilities.runOnUIThread(new Runnable() {
+ @Override
+ public void run() {
+ waitingHint.cancel();
+ if( allOkayFinal ) {
+ showDoneHint(context);
+ }
+ else {
+ showHint(context, ApplicationLoader.applicationContext.getString(R.string.AccessError));
+ }
+ }
+ });
+
+ }
+ }).start();
+ }
+
}
diff --git a/MessengerProj/src/main/java/com/b44t/messenger/FileLoader.java b/MessengerProj/src/main/java/com/b44t/messenger/FileLoader.java
index 50166b089..27db9dc8a 100644
--- a/MessengerProj/src/main/java/com/b44t/messenger/FileLoader.java
+++ b/MessengerProj/src/main/java/com/b44t/messenger/FileLoader.java
@@ -92,12 +92,6 @@ public class FileLoader {
mediaDirs = dirs;
}
- /*
- public File checkDirectory(int type) {
- return mediaDirs.get(type);
- }
- */
-
public File getDirectory(int type) { // always returns the cache directory as this is the only one set in mediaDirs[] - we do not use the other directories at the moment
File dir = mediaDirs.get(type);
if (dir == null && type != MEDIA_DIR_CACHE) {
diff --git a/MessengerProj/src/main/java/com/b44t/messenger/ImageLoader.java b/MessengerProj/src/main/java/com/b44t/messenger/ImageLoader.java
index 3c587f4fa..9427f05ed 100644
--- a/MessengerProj/src/main/java/com/b44t/messenger/ImageLoader.java
+++ b/MessengerProj/src/main/java/com/b44t/messenger/ImageLoader.java
@@ -37,7 +37,6 @@ import android.media.ThumbnailUtils;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
-import android.os.Environment;
import android.provider.MediaStore;
import com.b44t.ui.Components.AnimatedFileDrawable;
@@ -96,8 +95,6 @@ public class ImageLoader {
private int lastImageNum = 0;
private long lastProgressUpdateTime = 0;
- private File messengerPath = null;
-
private class ThumbGenerateInfo {
private int count;
private TLRPC.FileLocation fileLocation;
@@ -530,16 +527,6 @@ public class ImageLoader {
kf += "@" + filter;
}
NotificationCenter.getInstance().postNotificationName(NotificationCenter.messageThumbGenerated, bitmapDrawable, kf);
- /*BitmapDrawable old = memCache.get(kf);
- if (old != null) {
- Bitmap image = old.getBitmap();
- if (runtimeHack != null) {
- runtimeHack.trackAlloc(image.getRowBytes() * image.getHeight());
- }
- if (!image.isRecycled()) {
- image.recycle();
- }
- }*/
memCache.put(kf, bitmapDrawable);
}
});
@@ -1256,149 +1243,6 @@ public class ImageLoader {
mediaDirs.put(FileLoader.MEDIA_DIR_CACHE, cachePath);
FileLoader.getInstance().setMediaDirs(mediaDirs);
-
- /*
- cacheOutQueue.postRunnable(new Runnable() {
- @Override
- public void run() {
- final HashMap paths = createMediaPaths();
- AndroidUtilities.runOnUIThread(new Runnable() {
- @Override
- public void run() {
- FileLoader.getInstance().setMediaDirs(paths);
- }
- });
- }
- });
- */
- }
-
- /*
- public HashMap createMediaPaths() { // not sure, but it seems as if these paths are not needed
- HashMap mediaDirs = new HashMap<>();
- File cachePath = AndroidUtilities.getCacheDir();
- if (!cachePath.isDirectory()) {
- try {
- cachePath.mkdirs();
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
- try {
- new File(cachePath, ".nomedia").createNewFile();
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
-
- mediaDirs.put(FileLoader.MEDIA_DIR_CACHE, cachePath);
- FileLog.e("messenger", "cache path = " + cachePath);
-
- try {
- if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
- messengerPath = new File(Environment.getExternalStorageDirectory(), "Delta Chat");
- messengerPath.mkdirs();
-
- if (messengerPath.isDirectory()) {
- try {
- File imagePath = new File(messengerPath, "Delta Chat Images");
- imagePath.mkdir();
- if (imagePath.isDirectory() && canMoveFiles(cachePath, imagePath, FileLoader.MEDIA_DIR_IMAGE)) {
- mediaDirs.put(FileLoader.MEDIA_DIR_IMAGE, imagePath);
- FileLog.e("messenger", "image path = " + imagePath);
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
-
- try {
- File videoPath = new File(messengerPath, "Delta Chat Video");
- videoPath.mkdir();
- if (videoPath.isDirectory() && canMoveFiles(cachePath, videoPath, FileLoader.MEDIA_DIR_VIDEO)) {
- mediaDirs.put(FileLoader.MEDIA_DIR_VIDEO, videoPath);
- FileLog.e("messenger", "video path = " + videoPath);
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
-
- try {
- File audioPath = new File(messengerPath, "Delta Chat Audio");
- audioPath.mkdir();
- if (audioPath.isDirectory() && canMoveFiles(cachePath, audioPath, FileLoader.MEDIA_DIR_AUDIO)) {
- new File(audioPath, ".nomedia").createNewFile();
- mediaDirs.put(FileLoader.MEDIA_DIR_AUDIO, audioPath);
- FileLog.e("messenger", "audio path = " + audioPath);
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
-
- try {
- File documentPath = new File(messengerPath, "Delta Chat Documents");
- documentPath.mkdir();
- if (documentPath.isDirectory() && canMoveFiles(cachePath, documentPath, FileLoader.MEDIA_DIR_DOCUMENT)) {
- new File(documentPath, ".nomedia").createNewFile();
- mediaDirs.put(FileLoader.MEDIA_DIR_DOCUMENT, documentPath);
- FileLog.e("messenger", "documents path = " + documentPath);
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
- } else {
- FileLog.e("messenger", "this Android can't rename files");
- }
- MediaController.getInstance().checkSaveToGalleryFiles();
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
-
- return mediaDirs;
- }
- */
-
- private boolean canMoveFiles(File from, File to, int type) {
- RandomAccessFile file = null;
- try {
- File srcFile = null;
- File dstFile = null;
- if (type == FileLoader.MEDIA_DIR_IMAGE) {
- srcFile = new File(from, "000000000_999999_temp.jpg");
- dstFile = new File(to, "000000000_999999.jpg");
- } else if (type == FileLoader.MEDIA_DIR_DOCUMENT) {
- srcFile = new File(from, "000000000_999999_temp.doc");
- dstFile = new File(to, "000000000_999999.doc");
- } else if (type == FileLoader.MEDIA_DIR_AUDIO) {
- srcFile = new File(from, "000000000_999999_temp.ogg");
- dstFile = new File(to, "000000000_999999.ogg");
- } else if (type == FileLoader.MEDIA_DIR_VIDEO) {
- srcFile = new File(from, "000000000_999999_temp.mp4");
- dstFile = new File(to, "000000000_999999.mp4");
- }
- byte[] buffer = new byte[1024];
- srcFile.createNewFile();
- file = new RandomAccessFile(srcFile, "rws");
- file.write(buffer);
- file.close();
- file = null;
- boolean canRename = srcFile.renameTo(dstFile);
- srcFile.delete();
- dstFile.delete();
- if (canRename) {
- return true;
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- } finally {
- try {
- if (file != null) {
- file.close();
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
- return false;
}
public Float getFileProgress(String location) {
@@ -1408,21 +1252,6 @@ public class ImageLoader {
return fileProgresses.get(location);
}
- private void performReplace(String oldKey, String newKey) {
- BitmapDrawable b = memCache.get(oldKey);
- if (b != null) {
- ignoreRemoval = oldKey;
- memCache.remove(oldKey);
- memCache.put(newKey, b);
- ignoreRemoval = null;
- }
- Integer val = bitmapUseCounts.get(oldKey);
- if (val != null) {
- bitmapUseCounts.put(newKey, val);
- bitmapUseCounts.remove(oldKey);
- }
- }
-
public void incrementUseCount(String key) {
Integer count = bitmapUseCounts.get(key);
if (count == null) {
@@ -1503,65 +1332,6 @@ public class ImageLoader {
});
}
- public BitmapDrawable getImageFromMemory(String key) {
- return memCache.get(key);
- }
-
- public BitmapDrawable getImageFromMemory(TLObject fileLocation, String httpUrl, String filter) {
- if (fileLocation == null && httpUrl == null) {
- return null;
- }
- String key = null;
- if (httpUrl != null) {
- key = Utilities.MD5(httpUrl);
- } else {
- if (fileLocation instanceof TLRPC.FileLocation) {
- TLRPC.FileLocation location = (TLRPC.FileLocation) fileLocation;
- key = location.volume_id + "_" + location.local_id;
- } else if (fileLocation instanceof TLRPC.Document) {
- TLRPC.Document location = (TLRPC.Document) fileLocation;
- key = location.dc_id + "_" + location.id;
- }
- }
- if (filter != null) {
- key += "@" + filter;
- }
- return memCache.get(key);
- }
-
- private void replaceImageInCacheInternal(final String oldKey, final String newKey, final TLRPC.FileLocation newLocation) {
- ArrayList arr = memCache.getFilterKeys(oldKey);
- if (arr != null) {
- for (int a = 0; a < arr.size(); a++) {
- String filter = arr.get(a);
- String oldK = oldKey + "@" + filter;
- String newK = newKey + "@" + filter;
- performReplace(oldK, newK);
- NotificationCenter.getInstance().postNotificationName(NotificationCenter.didReplacedPhotoInMemCache, oldK, newK, newLocation);
- }
- } else {
- performReplace(oldKey, newKey);
- NotificationCenter.getInstance().postNotificationName(NotificationCenter.didReplacedPhotoInMemCache, oldKey, newKey, newLocation);
- }
- }
-
- public void replaceImageInCache(final String oldKey, final String newKey, final TLRPC.FileLocation newLocation, boolean post) {
- if (post) {
- AndroidUtilities.runOnUIThread(new Runnable() {
- @Override
- public void run() {
- replaceImageInCacheInternal(oldKey, newKey, newLocation);
- }
- });
- } else {
- replaceImageInCacheInternal(oldKey, newKey, newLocation);
- }
- }
-
- public void putImageToCache(BitmapDrawable bitmap, String key) {
- memCache.put(key, bitmap);
- }
-
private void generateThumb(int mediaType, File originalPath, TLRPC.FileLocation thumbLocation, String filter) {
if (mediaType != FileLoader.MEDIA_DIR_IMAGE && mediaType != FileLoader.MEDIA_DIR_VIDEO && mediaType != FileLoader.MEDIA_DIR_DOCUMENT || originalPath == null || thumbLocation == null) {
return;
@@ -1619,7 +1389,6 @@ public class ImageLoader {
if (!added) {
boolean onlyCache = false;
- boolean isQuality = false;
File cacheFile = null;
if (httpLocation != null) {
@@ -1932,34 +1701,6 @@ public class ImageLoader {
}
}
- public void loadHttpFile(String url, String defaultExt) {
- if (url == null || url.length() == 0 || httpFileLoadTasksByKeys.containsKey(url)) {
- return;
- }
- String ext = getHttpUrlExtension(url, defaultExt);
- File file = new File(FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE), Utilities.MD5(url) + "_temp." + ext);
- file.delete();
-
- HttpFileTask task = new HttpFileTask(url, file, ext);
- httpFileLoadTasks.add(task);
- httpFileLoadTasksByKeys.put(url, task);
- runHttpFileLoadTasks(null, 0);
- }
-
- public void cancelLoadHttpFile(String url) {
- HttpFileTask task = httpFileLoadTasksByKeys.get(url);
- if (task != null) {
- task.cancel(true);
- httpFileLoadTasksByKeys.remove(url);
- httpFileLoadTasks.remove(task);
- }
- Runnable runnable = retryHttpsTasks.get(url);
- if (runnable != null) {
- AndroidUtilities.cancelRunOnUIThread(runnable);
- }
- runHttpFileLoadTasks(null, 0);
- }
-
private void runHttpFileLoadTasks(final HttpFileTask oldTask, final int reason) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
@@ -2005,7 +1746,6 @@ public class ImageLoader {
InputStream inputStream = null;
if (path == null && uri != null && uri.getScheme() != null) {
- String imageFilePath = null;
if (uri.getScheme().contains("file")) {
path = uri.getPath();
} else {
@@ -2020,7 +1760,6 @@ public class ImageLoader {
if (path != null) {
BitmapFactory.decodeFile(path, bmOptions);
} else if (uri != null) {
- boolean error = false;
try {
inputStream = ApplicationLoader.applicationContext.getContentResolver().openInputStream(uri);
BitmapFactory.decodeStream(inputStream, null, bmOptions);
diff --git a/MessengerProj/src/main/java/com/b44t/messenger/MediaController.java b/MessengerProj/src/main/java/com/b44t/messenger/MediaController.java
index 72678f4ce..381578ccf 100644
--- a/MessengerProj/src/main/java/com/b44t/messenger/MediaController.java
+++ b/MessengerProj/src/main/java/com/b44t/messenger/MediaController.java
@@ -27,8 +27,6 @@ import android.Manifest;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
-import android.app.DownloadManager;
-import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -288,7 +286,6 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
private ArrayList videoDownloadQueue = new ArrayList<>();
private HashMap downloadQueueKeys = new HashMap<>();
- private final boolean saveToGallery = false;
private final boolean autoplayGifs = true;
private boolean raiseToSpeak = true;
private boolean directShare = true;
@@ -613,7 +610,6 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
mobileDataDownloadMask = preferences.getInt("mobileDataDownloadMask", AUTODOWNLOAD_MASK_PHOTO | AUTODOWNLOAD_MASK_AUDIO | AUTODOWNLOAD_MASK_MUSIC | AUTODOWNLOAD_MASK_GIF);
wifiDownloadMask = preferences.getInt("wifiDownloadMask", AUTODOWNLOAD_MASK_PHOTO | AUTODOWNLOAD_MASK_AUDIO | AUTODOWNLOAD_MASK_MUSIC | AUTODOWNLOAD_MASK_GIF);
roamingDownloadMask = preferences.getInt("roamingDownloadMask", 0);
- //saveToGallery = preferences.getBoolean("save_gallery", false);
//autoplayGifs = preferences.getBoolean("autoplay_gif", true);
raiseToSpeak = preferences.getBoolean("raise_to_speak", true);
directShare = preferences.getBoolean("direct_share", true);
@@ -2730,130 +2726,6 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
});
}
- public static void saveFile(String fullPath, Context context, final int type, final String name, final String mime) {
- if (fullPath == null) {
- return;
- }
-
- File file = null;
- if (fullPath != null && fullPath.length() != 0) {
- file = new File(fullPath);
- if (!file.exists()) {
- file = null;
- }
- }
-
- if (file == null) {
- return;
- }
-
- final File sourceFile = file;
- if (sourceFile.exists()) {
- ProgressDialog progressDialog = null;
- if (context != null) {
- try {
- progressDialog = new ProgressDialog(context);
- progressDialog.setMessage(LocaleController.getString("Loading", R.string.Loading));
- progressDialog.setCanceledOnTouchOutside(false);
- progressDialog.setCancelable(false);
- progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
- progressDialog.setMax(100);
- progressDialog.show();
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
-
- final ProgressDialog finalProgress = progressDialog;
-
- new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- File destFile = null;
- if (type == 0) {
- destFile = AndroidUtilities.generatePicturePath();
- } else if (type == 1) {
- destFile = AndroidUtilities.generateVideoPath();
- } else if (type == 2) {
- File f = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
- f.mkdir();
- destFile = new File(f, name);
- } else if (type == 3) {
- File f = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC);
- f.mkdirs();
- destFile = new File(f, name);
- }
-
- if (!destFile.exists()) {
- destFile.createNewFile();
- }
- FileChannel source = null;
- FileChannel destination = null;
- boolean result = true;
- long lastProgress = System.currentTimeMillis() - 500;
- try {
- source = new FileInputStream(sourceFile).getChannel();
- destination = new FileOutputStream(destFile).getChannel();
- long size = source.size();
- for (long a = 0; a < size; a += 4096) {
- destination.transferFrom(source, a, Math.min(4096, size - a));
- if (finalProgress != null) {
- if (lastProgress <= System.currentTimeMillis() - 500) {
- lastProgress = System.currentTimeMillis();
- final int progress = (int) ((float) a / (float) size * 100);
- AndroidUtilities.runOnUIThread(new Runnable() {
- @Override
- public void run() {
- try {
- finalProgress.setProgress(progress);
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
- });
- }
- }
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- result = false;
- } finally {
- if (source != null) {
- source.close();
- }
- if (destination != null) {
- destination.close();
- }
- }
-
- if (result) {
- if (type == 2) {
- DownloadManager downloadManager = (DownloadManager) ApplicationLoader.applicationContext.getSystemService(Context.DOWNLOAD_SERVICE);
- downloadManager.addCompletedDownload(destFile.getName(), destFile.getName(), false, mime, destFile.getAbsolutePath(), destFile.length(), true);
- } else {
- AndroidUtilities.addMediaToGallery(Uri.fromFile(destFile));
- }
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- if (finalProgress != null) {
- AndroidUtilities.runOnUIThread(new Runnable() {
- @Override
- public void run() {
- try {
- finalProgress.dismiss();
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
- });
- }
- }
- }).start();
- }
- }
public static boolean isWebp(Uri uri) {
InputStream inputStream = null;
@@ -2977,15 +2849,6 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
}
/*
- public void toggleSaveToGallery() {
- saveToGallery = !saveToGallery;
- SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
- SharedPreferences.Editor editor = preferences.edit();
- editor.putBoolean("save_gallery", saveToGallery);
- editor.apply();
- checkSaveToGalleryFiles();
- }
-
public void toggleAutoplayGifs() {
autoplayGifs = !autoplayGifs;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
@@ -3011,40 +2874,6 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
editor.apply();
}
- public void checkSaveToGalleryFiles() { // not sure, but it seems as if these paths are not needed
- try {
- File messengerPath = new File(Environment.getExternalStorageDirectory(), "Delta Chat");
- File imagePath = new File(messengerPath, "Delta Chat Images");
- imagePath.mkdir();
- File videoPath = new File(messengerPath, "Delta Chat Video");
- videoPath.mkdir();
-
- if (saveToGallery) {
- if (imagePath.isDirectory()) {
- new File(imagePath, ".nomedia").delete();
- }
- if (videoPath.isDirectory()) {
- new File(videoPath, ".nomedia").delete();
- }
- } else {
- if (imagePath.isDirectory()) {
- new File(imagePath, ".nomedia").createNewFile();
- }
- if (videoPath.isDirectory()) {
- new File(videoPath, ".nomedia").createNewFile();
- }
- }
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
-
- /*
- public boolean canSaveToGallery() {
- return saveToGallery;
- }
- */
-
public boolean canAutoplayGifs() {
return autoplayGifs;
}
diff --git a/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java b/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java
index 5c94bfbff..a7f48fb04 100644
--- a/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java
+++ b/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java
@@ -215,110 +215,6 @@ public class CacheControlActivity extends BaseFragment {
return size;
}
- /*
- private void cleanupFolders() {
- final ProgressDialog progressDialog = new ProgressDialog(getParentActivity());
- progressDialog.setMessage(LocaleController.getString("Loading", R.string.Loading));
- progressDialog.setCanceledOnTouchOutside(false);
- progressDialog.setCancelable(false);
- progressDialog.show();
- Utilities.globalQueue.postRunnable(new Runnable() {
- @Override
- public void run() {
- boolean imagesCleared = false;
- for (int a = 0; a < 6; a++) {
- if (!clear[a]) {
- continue;
- }
- int type = -1;
- int documentsMusicType = 0;
- if (a == 0) {
- type = FileLoader.MEDIA_DIR_IMAGE;
- } else if (a == 1) {
- type = FileLoader.MEDIA_DIR_VIDEO;
- } else if (a == 2) {
- type = FileLoader.MEDIA_DIR_DOCUMENT;
- documentsMusicType = 1;
- } else if (a == 3) {
- type = FileLoader.MEDIA_DIR_DOCUMENT;
- documentsMusicType = 2;
- } else if (a == 4) {
- type = FileLoader.MEDIA_DIR_AUDIO;
- } else if (a == 5) {
- type = FileLoader.MEDIA_DIR_CACHE;
- }
- if (type == -1) {
- continue;
- }
- File file = FileLoader.getInstance().checkDirectory(type);
- if (file != null) {
- try {
- File[] array = file.listFiles();
- if (array != null) {
- for (int b = 0; b < array.length; b++) {
- String name = array[b].getName().toLowerCase();
- if (documentsMusicType == 1 || documentsMusicType == 2) {
- if (name.endsWith(".mp3") || name.endsWith(".m4a")) {
- if (documentsMusicType == 1) {
- continue;
- }
- } else if (documentsMusicType == 2) {
- continue;
- }
- }
- if (name.equals(".nomedia")) {
- continue;
- }
- if (array[b].isFile()) {
- array[b].delete();
- }
- }
- }
- } catch (Throwable e) {
- FileLog.e("messenger", e);
- }
- }
- if (type == FileLoader.MEDIA_DIR_CACHE) {
- cacheSize = getDirectorySize(FileLoader.getInstance().checkDirectory(FileLoader.MEDIA_DIR_CACHE), documentsMusicType);
- imagesCleared = true;
- } else if (type == FileLoader.MEDIA_DIR_AUDIO) {
- audioSize = getDirectorySize(FileLoader.getInstance().checkDirectory(FileLoader.MEDIA_DIR_AUDIO), documentsMusicType);
- } else if (type == FileLoader.MEDIA_DIR_DOCUMENT) {
- if (documentsMusicType == 1) {
- documentsSize = getDirectorySize(FileLoader.getInstance().checkDirectory(FileLoader.MEDIA_DIR_DOCUMENT), documentsMusicType);
- } else {
- musicSize = getDirectorySize(FileLoader.getInstance().checkDirectory(FileLoader.MEDIA_DIR_DOCUMENT), documentsMusicType);
- }
- } else if (type == FileLoader.MEDIA_DIR_IMAGE) {
- imagesCleared = true;
- photoSize = getDirectorySize(FileLoader.getInstance().checkDirectory(FileLoader.MEDIA_DIR_IMAGE), documentsMusicType);
- } else if (type == FileLoader.MEDIA_DIR_VIDEO) {
- videoSize = getDirectorySize(FileLoader.getInstance().checkDirectory(FileLoader.MEDIA_DIR_VIDEO), documentsMusicType);
- }
- }
- final boolean imagesClearedFinal = imagesCleared;
- totalSize = cacheSize + videoSize + audioSize + photoSize + documentsSize + musicSize;
- AndroidUtilities.runOnUIThread(new Runnable() {
- @Override
- public void run() {
- if (imagesClearedFinal) {
- ImageLoader.getInstance().clearMemory();
- }
- if (listAdapter != null) {
- listAdapter.notifyDataSetChanged();
- }
- try {
- progressDialog.dismiss();
- } catch (Exception e) {
- FileLog.e("messenger", e);
- }
- }
- });
- }
- });
- }
- */
-
@Override
public View createView(final Context context) {
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
diff --git a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java
index 0a9662426..c4d7024f0 100644
--- a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java
+++ b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java
@@ -498,7 +498,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
else if( id== ID_SAVE_TO_XX )
{
- Toast.makeText(getParentActivity(), ApplicationLoader.applicationContext.getString(R.string.NotYetImplemented), Toast.LENGTH_SHORT).show();
+ AndroidUtilities.saveMessageFileToExt(getParentActivity(), getFirstSelectedId());
+ actionBar.hideActionMode();
+ updateVisibleRows();
}
else if( id== ID_SHARE )
{
@@ -2817,7 +2819,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if ( getParentActivity()!=null ) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setPositiveButton(ApplicationLoader.applicationContext.getString(R.string.OK), null);
- builder.setMessage(LocaleController.formatString("NoHandleAppInstalled", R.string.NoHandleAppInstalled, AndroidUtilities.getMimetypeForView(message)));
+ builder.setMessage(LocaleController.formatString("NoHandleAppInstalled", R.string.NoHandleAppInstalled, AndroidUtilities.getMimetype(message)));
showDialog(builder.create());
}
}
diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java
index 285ccbf1a..e5b365754 100644
--- a/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java
+++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java
@@ -966,11 +966,6 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f));
parentActivity.startActivityForResult(Intent.createChooser(intent, LocaleController.getString("ShareFile", R.string.ShareFile)), 500);
- } else {
- AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity);
- builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), null);
- builder.setMessage(LocaleController.getString("PleaseDownload", R.string.PleaseDownload));
- showAlertDialog(builder);
}
} catch (Exception e) {
FileLog.e("messenger", e);
@@ -1064,25 +1059,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
}*/
closePhoto(true, false);
} else if (id == gallery_menu_save) {
- if (Build.VERSION.SDK_INT >= 23 && parentActivity.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
- parentActivity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 4);
- return;
- }
-
- File f = null;
if (currentMessageObject != null) {
- f = FileLoader.getPathToMessage(currentMessageObject.messageOwner);
- } else if (currentFileLocation != null) {
- f = FileLoader.getPathToAttach(currentFileLocation, avatarsDialogId != 0);
- }
-
- if (f != null && f.exists()) {
- MediaController.saveFile(f.toString(), parentActivity, currentMessageObject != null && currentMessageObject.isVideo() ? 1 : 0, null, null);
- } else {
- AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity);
- builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), null);
- builder.setMessage(LocaleController.getString("PleaseDownload", R.string.PleaseDownload));
- showAlertDialog(builder);
+ AndroidUtilities.saveMessageFileToExt(parentActivity, currentMessageObject.getId());
}
}
/*else if (id == gallery_menu_showall) {
@@ -1286,8 +1264,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
str = str.substring(0,1).toUpperCase() + str.substring(1).toLowerCase();
}
menuItem.addSubItem(gallery_menu_openin, str, 0);
- menuItem.addSubItem(gallery_menu_save, LocaleController.getString("SaveToGallery", R.string.SaveToGallery), 0);
- //menuItem.addSubItem(gallery_menu_showall, LocaleController.getString("ShowAllMedia", R.string.ShowAllMedia), 0);
+ menuItem.addSubItem(gallery_menu_save, ApplicationLoader.applicationContext.getString(R.string.SaveToGallery), 0);
// the following 3 options are disabled for the moment, we'll add them if we have the time (bp)
// (as a replacement, you can use "save to gallery" for sharing or the options from the chat for forwarding/delete)
diff --git a/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java b/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java
index 6d184877e..46f9a19d3 100644
--- a/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java
+++ b/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java
@@ -120,7 +120,6 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
notificationRow = rowCount++;
backgroundRow = rowCount++;
languageRow = rowCount++;
- // saveToGalleryRow: for now, we do not use this option, this results in confusing folders ("AppName" and "AppName Images" etc.); instead, for now, the user can use the option to manually save a media. Moreover, we also avoid the problem to double-save each image _or_ to handle the case a user deletes an image in the gallery.
messagesSectionRow = rowCount++;
messagesSectionRow2 = rowCount++;
textSizeRow = rowCount++; // incoming messages
diff --git a/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java b/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java
index 5587a27ab..35e5ff9ac 100644
--- a/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java
+++ b/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java
@@ -91,6 +91,9 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent
private final static int done_button = 1;
+ private final static int RC10_TAKE_WALLPAPER_PICTURE = 10;
+ private final static int RC11_SELECT_WALLPAPER_FROM_GALLERY = 11;
+
@Override
public boolean onFragmentCreate() {
super.onFragmentCreate();
@@ -230,11 +233,11 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(image));
currentPicturePath = image.getAbsolutePath();
}
- startActivityForResult(takePictureIntent, 10);
+ startActivityForResult(takePictureIntent, RC10_TAKE_WALLPAPER_PICTURE);
} else if (i == 1) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
- startActivityForResult(photoPickerIntent, 11);
+ startActivityForResult(photoPickerIntent, RC11_SELECT_WALLPAPER_FROM_GALLERY);
}
} catch (Exception e) {
FileLog.e("messenger", e);
@@ -262,7 +265,7 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent
@Override
public void onActivityResultFragment(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK) {
- if (requestCode == 10) {
+ if (requestCode == RC10_TAKE_WALLPAPER_PICTURE) {
AndroidUtilities.addMediaToGallery(currentPicturePath);
FileOutputStream stream = null;
try {
@@ -287,7 +290,7 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent
}
}
currentPicturePath = null;
- } else if (requestCode == 11) {
+ } else if (requestCode == RC11_SELECT_WALLPAPER_FROM_GALLERY) {
if (data == null || data.getData() == null) {
return;
}
diff --git a/MessengerProj/src/main/res/values-de/strings.xml b/MessengerProj/src/main/res/values-de/strings.xml
index 62811aa40..d893cac1b 100644
--- a/MessengerProj/src/main/res/values-de/strings.xml
+++ b/MessengerProj/src/main/res/values-de/strings.xml
@@ -184,7 +184,6 @@
Fingerabdruck bestätigen.
Abdruck nicht erkannt; erneut versuchen
- Zeige alle Medien
In der Galerie speichern
%1$d von %2$d
Galerie
@@ -192,7 +191,6 @@
Alle Videos
Noch keine Bilder
Noch keine Videos
- Medien bitte zuerst herunterladen
Suchverlauf
Suchverlauf
BILDERSUCHE
@@ -274,7 +272,6 @@
Sprachnachricht
Ich
- Lädt …
Um den Dateityp \"%1$s\" öffnen zu können, muss eine entsprechende App installiert werden.
Kontakt befindet sich schon in der Gruppe.
Ausgewählte Nachrichten an ]]>%1$s]]> weiterleiten?
diff --git a/MessengerProj/src/main/res/values-es/strings.xml b/MessengerProj/src/main/res/values-es/strings.xml
index 214b7876f..556d20fe6 100644
--- a/MessengerProj/src/main/res/values-es/strings.xml
+++ b/MessengerProj/src/main/res/values-es/strings.xml
@@ -181,7 +181,6 @@
Confirma la huella digital para continuar
Huella digital no reconocida. Reinténtalo
- Ir a Multimedia
Guardar en galería
%1$d de %2$d
Galería
@@ -189,7 +188,6 @@
Todos los vídeos
Aún sin fotos
Sin vídeos aún
- Por favor, primero descarga la multimedia
No hay fotos recientes
No hay GIF recientes
BUSCA FOTOS
@@ -271,7 +269,6 @@
Mensaje de voz
Tú
- Cargando…
No tienes aplicaciones que puedan manejar el tipo de archivo “%1$s”. Por favor, instala una para continuar.
¿Añadir a ]]>%1$s]]> al grupo?
Este usuario ya está en el grupo
diff --git a/MessengerProj/src/main/res/values-fr/strings.xml b/MessengerProj/src/main/res/values-fr/strings.xml
index 0051ab0cb..7adfe9d79 100644
--- a/MessengerProj/src/main/res/values-fr/strings.xml
+++ b/MessengerProj/src/main/res/values-fr/strings.xml
@@ -179,7 +179,6 @@
Confirmer votre empreinte digitale pour continuer
Empreinte non reconnue. Essayer encore
- Montrer tous les médias
Enregistrer dans la galerie
%1$d de %2$d
Gallerie
@@ -187,7 +186,6 @@
Toutes les vidéos
Aucune photo pour le moment
Aucune vidéo pour le moement
- Veuiller télécharger le média
Aucune photo récente
Aucun GIF récent
TROUVER LES IMAGES
@@ -269,7 +267,6 @@
Message vocal
Moi
- Chargement…
Vous n\'avez pas d\'application qui peut gérer le type \'%1$s\', veuillez en installer un pour continuer
Ce contact est déjà dans ce groupe
Renvoyer les messages sélectionnés à ]]>%1$s]]> ?
diff --git a/MessengerProj/src/main/res/values-it/strings.xml b/MessengerProj/src/main/res/values-it/strings.xml
index c95a4fa78..8de758ad8 100644
--- a/MessengerProj/src/main/res/values-it/strings.xml
+++ b/MessengerProj/src/main/res/values-it/strings.xml
@@ -181,7 +181,6 @@
Conferma impronta digitale per continuare
Impronta digitale non riconosciuta. Riprova
- Mostra tutti i file media
Salva nella galleria
%1$d di %2$d
Galleria
@@ -189,7 +188,6 @@
Tutti i video
Ancora nessuna foto
Ancora nessun video
- Scarica prima il file
Nessuna foto recente
Nessuna GIF recente
CERCA IMMAGINI
@@ -271,7 +269,6 @@
Messaggio vocale
Tu
- Caricamento…
Non hai applicazioni che possono gestire il tipo di file \'%1$s\': installane una per proseguire
Aggiungere ]]>%1$s]]> al gruppo?
Questo utente è già membro del gruppo
diff --git a/MessengerProj/src/main/res/values-nl/strings.xml b/MessengerProj/src/main/res/values-nl/strings.xml
index f969dc32f..95508c4ea 100644
--- a/MessengerProj/src/main/res/values-nl/strings.xml
+++ b/MessengerProj/src/main/res/values-nl/strings.xml
@@ -181,7 +181,6 @@
Vingerafdruk bevestigen
Vingerafdruk niet herkend, probeer opnieuw
- Alle media weergeven
Opslaan in galerij
%1$d van %2$d
Galerij
@@ -189,7 +188,6 @@
Alle video\'s
Nog geen foto\'s
Nog geen video\'s
- Download media eerst
Niets recents
Niets recents
ONLINE ZOEKEN
@@ -271,7 +269,6 @@
Spraakbericht
Jij
- Bezig met laden
Je hebt geen apps die bestandstype \'%1$s\' kunnen verwerken, gelieve een compatibele app te installeren
]]>%1$s]]> toevoegen aan de groep?
Gebruiker is al een groepslid
diff --git a/MessengerProj/src/main/res/values-pl/strings.xml b/MessengerProj/src/main/res/values-pl/strings.xml
index c22c47542..1ac17e719 100644
--- a/MessengerProj/src/main/res/values-pl/strings.xml
+++ b/MessengerProj/src/main/res/values-pl/strings.xml
@@ -184,7 +184,6 @@
Potwierdź odcisk palca, aby kontynuować
Odcisk palca nie rozpoznany. Spróbuj ponownie
- Pokaż wszystkie multimedia
Zapisz w galerii
%1$d z %2$d
Galeria
@@ -192,7 +191,6 @@
Wszystkie wideo
Nie ma zdjęć
Nie ma jeszcze wideo
- Pobierz najpierw multimedia
Nie ma wcześniejszych zdjęć
Nie ma wcześniejszych GIFów
SZUKAJ OBRAZY
@@ -274,7 +272,6 @@
Wiadomość głosowa
Ja
- Wczytywanie…
Nie masz aplikacji obsługujących pliki typu „%1$s”. Zainstaluj jakąś, aby kontynuować.
Ten kontakt jest już w tej grupie
Przekazać wybrane wiadomości do ]]>%1$s]]>?
diff --git a/MessengerProj/src/main/res/values-pt/strings.xml b/MessengerProj/src/main/res/values-pt/strings.xml
index d450148cf..c42374d14 100644
--- a/MessengerProj/src/main/res/values-pt/strings.xml
+++ b/MessengerProj/src/main/res/values-pt/strings.xml
@@ -181,7 +181,6 @@
Confirme a impressão digital para continuar
Impressão digital não reconhecida.
- Mostrar todas as mídias
Salvar na galeria
%1$d de %2$d
Galeria
@@ -189,7 +188,6 @@
Todos os Vídeos
Ainda não há fotos
Nenhum vídeo ainda
- Baixar o vídeo primeiro
Nenhuma foto recente
Nenhum GIF recente
BUSCAR IMAGENS
@@ -271,7 +269,6 @@
Mensagem de voz
Você
- Carregando…
Você não possui um aplicativo que suporte o tipo de arquivo \'%1$s\', por favor instale um para continuar
Adicionar ]]>%1$s]]> no grupo?
Este usuário já está neste grupo
diff --git a/MessengerProj/src/main/res/values/strings.xml b/MessengerProj/src/main/res/values/strings.xml
index f9400b85b..4258e6bd4 100644
--- a/MessengerProj/src/main/res/values/strings.xml
+++ b/MessengerProj/src/main/res/values/strings.xml
@@ -184,7 +184,6 @@
Confirm fingerprint to continue
Fingerprint not recognized. Try again
- Show all media
Save to gallery
%1$d of %2$d
Gallery
@@ -192,7 +191,6 @@
All Videos
No photos yet
No videos yet
- Please download media first
No recent photos
No recent GIFs
FIND IMAGES
@@ -274,7 +272,6 @@
Voice message
Me
- Loading …
You don\'t have applications that can handle the file type \'%1$s\', please install one to continue
This contact is already in this group.
Forward selected messages to ]]>%1$s]]>?