Commit 53ddefb8 authored by DrKLO's avatar DrKLO

Bug fixes

parent f7d3faab
......@@ -80,7 +80,7 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 335
versionName "1.9.0"
versionCode 343
versionName "1.9.1"
}
}
......@@ -551,7 +551,7 @@ public class ImageLoader {
@Override
public void run() {
if (location != null) {
if (telegramPath != null && finalFile != null && finalFile.exists() && location.endsWith(".mp4") || location.endsWith(".jpg")) {
if (MediaController.getInstance().canSaveToGallery() && telegramPath != null && finalFile != null && finalFile.exists() && (location.endsWith(".mp4") || location.endsWith(".jpg"))) {
if (finalFile.toString().startsWith(telegramPath.toString())) {
Utilities.addMediaToGallery(finalFile.toString());
}
......@@ -624,7 +624,6 @@ public class ImageLoader {
File videoPath = new File(telegramPath, LocaleController.getString("AppName", R.string.AppName) + " Video");
videoPath.mkdir();
if (videoPath.isDirectory()) {
//new File(videoPath, ".nomedia").delete();
mediaDirs.put(FileLoader.MEDIA_DIR_VIDEO, videoPath);
}
} catch (Exception e) {
......
......@@ -172,6 +172,8 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
private ArrayList<DownloadObject> videoDownloadQueue = new ArrayList<DownloadObject>();
private HashMap<String, DownloadObject> downloadQueueKeys = new HashMap<String, DownloadObject>();
private boolean saveToGallery = true;
private HashMap<String, ArrayList<WeakReference<FileDownloadProgressListener>>> loadingFileObservers = new HashMap<String, ArrayList<WeakReference<FileDownloadProgressListener>>>();
private HashMap<Integer, String> observersByTag = new HashMap<Integer, String>();
private boolean listenerInProgress = false;
......@@ -392,6 +394,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
mobileDataDownloadMask = preferences.getInt("mobileDataDownloadMask", AUTODOWNLOAD_MASK_PHOTO | AUTODOWNLOAD_MASK_AUDIO);
wifiDownloadMask = preferences.getInt("wifiDownloadMask", AUTODOWNLOAD_MASK_PHOTO | AUTODOWNLOAD_MASK_AUDIO);
roamingDownloadMask = preferences.getInt("roamingDownloadMask", 0);
saveToGallery = preferences.getBoolean("save_gallery", false);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileDidFailedLoad);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileDidLoaded);
......@@ -1785,6 +1788,43 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
return null;
}
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.commit();
try {
File telegramPath = new File(Environment.getExternalStorageDirectory(), LocaleController.getString("AppName", R.string.AppName));
File imagePath = new File(telegramPath, LocaleController.getString("AppName", R.string.AppName) + " Images");
imagePath.mkdir();
File videoPath = new File(telegramPath, LocaleController.getString("AppName", R.string.AppName) + " 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("tmessages", e);
}
}
public boolean canSaveToGallery() {
return saveToGallery;
}
public static void loadGalleryPhotosAlbums(final int guid) {
new Thread(new Runnable() {
@Override
......@@ -1972,7 +2012,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
return -5;
}
private void didWriteData(final MessageObject messageObject, final File file, final long finalSize, final boolean error) {
private void didWriteData(final MessageObject messageObject, final File file, final boolean last, final boolean error) {
final boolean firstWrite = videoConvertFirstWrite;
if (firstWrite) {
videoConvertFirstWrite = false;
......@@ -1986,9 +2026,9 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
if (firstWrite) {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.FilePreparingStarted, messageObject, file.toString());
}
NotificationCenter.getInstance().postNotificationName(NotificationCenter.FileNewChunkAvailable, messageObject, file.toString(), finalSize);
NotificationCenter.getInstance().postNotificationName(NotificationCenter.FileNewChunkAvailable, messageObject, file.toString(), last ? file.length() : 0);
}
if (error || finalSize != 0) {
if (error || last) {
synchronized (videoConvertSync) {
cancelCurrentVideoConversion = false;
}
......@@ -2043,7 +2083,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
buffer.putInt(info.size - 4);
}
if (mediaMuxer.writeSampleData(muxerTrackIndex, buffer, info)) {
didWriteData(messageObject, file, 0, false);
didWriteData(messageObject, file, false, false);
}
extractor.advance();
} else {
......@@ -2172,13 +2212,13 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
int colorFormat = 0;
int processorType = PROCESSOR_TYPE_OTHER;
String manufacturer = Build.MANUFACTURER.toLowerCase();
if (Build.VERSION.SDK_INT < 18) {
MediaCodecInfo codecInfo = selectCodec(MIME_TYPE);
colorFormat = selectColorFormat(codecInfo, MIME_TYPE);
if (colorFormat == 0) {
throw new RuntimeException("no supported color format");
}
String manufacturer = Build.MANUFACTURER.toLowerCase();
String codecName = codecInfo.getName();
if (codecName.contains("OMX.qcom.")) {
processorType = PROCESSOR_TYPE_QCOM;
......@@ -2213,7 +2253,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
bufferSize += padding * 5 / 4;
}
} else if (processorType == PROCESSOR_TYPE_QCOM) {
if (!Build.MANUFACTURER.toLowerCase().equals("lge")) {
if (!manufacturer.toLowerCase().equals("lge")) {
int uvoffset = (resultWidth * resultHeight + 2047) & ~2047;
padding = uvoffset - (resultWidth * resultHeight);
bufferSize += padding;
......@@ -2224,6 +2264,12 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
//resultHeightAligned += (16 - (resultHeight % 16));
//padding = resultWidth * (resultHeightAligned - resultHeight);
//bufferSize += padding * 5 / 4;
} else if (processorType == PROCESSOR_TYPE_MTK) {
if (manufacturer.equals("baidu")) {
resultHeightAligned += (16 - (resultHeight % 16));
padding = resultWidth * (resultHeightAligned - resultHeight);
bufferSize += padding * 5 / 4;
}
}
extractor.selectTrack(videoIndex);
......@@ -2328,7 +2374,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
encodedData.position(info.offset);
encodedData.putInt(Integer.reverseBytes(info.size - 4));
if (mediaMuxer.writeSampleData(videoTrackIndex, encodedData, info)) {
didWriteData(messageObject, cacheFile, 0, false);
didWriteData(messageObject, cacheFile, false, false);
}
} else if (videoTrackIndex == -5) {
byte[] csd = new byte[info.size];
......@@ -2504,7 +2550,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
} else {
return false;
}
didWriteData(messageObject, cacheFile, cacheFile.length(), error);
didWriteData(messageObject, cacheFile, true, error);
return true;
}
}
......@@ -105,7 +105,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
} else if (message.type == 1) {
if (media.file == null) {
media.file = file;
performSendDelayedMessage(message);
if (media.thumb == null && message.location != null) {
performSendDelayedMessage(message);
} else {
performSendMessageRequest(message.sendRequest, message.obj, message.originalPath);
}
} else {
media.thumb = file;
performSendMessageRequest(message.sendRequest, message.obj, message.originalPath);
......@@ -261,6 +265,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
if (keyToRemvoe != null) {
FileLoader.getInstance().cancelUploadFile(keyToRemvoe, enc);
stopVideoService(keyToRemvoe);
}
ArrayList<Integer> messages = new ArrayList<Integer>();
messages.add(object.messageOwner.id);
......@@ -610,7 +615,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
} else if (type == 3) {
if (video.access_hash == 0) {
inputMedia = new TLRPC.TL_inputMediaUploadedThumbVideo();
if (video.thumb.location != null) {
inputMedia = new TLRPC.TL_inputMediaUploadedThumbVideo();
} else {
inputMedia = new TLRPC.TL_inputMediaUploadedVideo();
}
inputMedia.duration = video.duration;
inputMedia.w = video.w;
inputMedia.h = video.h;
......@@ -910,7 +919,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
location = FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE) + "/" + message.videoLocation.id + ".mp4";
}
putToDelayedMessages(location, message);
if (message.videoLocation.videoEditedInfo != null) {
if (message.obj.messageOwner.videoEditedInfo != null) {
FileLoader.getInstance().uploadFile(location, true, false, message.videoLocation.size);
} else {
FileLoader.getInstance().uploadFile(location, true, false);
......
......@@ -45,6 +45,7 @@ public class FileUploadOperation {
private int uploadStartTime = 0;
private FileInputStream stream;
private MessageDigest mdEnc = null;
private boolean started = false;
public static interface FileUploadOperationDelegate {
public abstract void didFinishUploadingFile(FileUploadOperation operation, TLRPC.InputFile inputFile, TLRPC.InputEncryptedFile inputEncryptedFile);
......@@ -102,8 +103,10 @@ public class FileUploadOperation {
estimatedSize = 0;
totalFileSize = finalSize;
totalPartsCount = (int) Math.ceil((float) totalFileSize / (float) uploadChunkSize);
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("uploadinfo", Activity.MODE_PRIVATE);
storeFileUploadInfo(preferences);
if (started) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("uploadinfo", Activity.MODE_PRIVATE);
storeFileUploadInfo(preferences);
}
}
if (requestToken == 0) {
startUploadRequest();
......@@ -134,6 +137,7 @@ public class FileUploadOperation {
TLObject finalRequest;
try {
started = true;
if (stream == null) {
File cacheFile = new File(uploadingFilePath);
stream = new FileInputStream(cacheFile);
......
......@@ -169,6 +169,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
private long chatEnterTime = 0;
private long chatLeaveTime = 0;
private String startVideoEdit = null;
private final static int copy = 1;
private final static int forward = 2;
private final static int delete = 3;
......@@ -424,7 +426,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(image));
currentPicturePath = image.getAbsolutePath();
}
getParentActivity().startActivityForResult(takePictureIntent, 0);
startActivityForResult(takePictureIntent, 0);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......@@ -441,7 +443,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
File video = Utilities.generateVideoPath();
if (video != null) {
if (android.os.Build.VERSION.SDK_INT >= 18) {
if (Build.VERSION.SDK_INT >= 18) {
takeVideoIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(video));
}
takeVideoIntent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, (long) (1024 * 1024 * 1000));
......@@ -450,7 +452,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
Intent chooserIntent = Intent.createChooser(pickIntent, "");
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{takeVideoIntent});
getParentActivity().startActivityForResult(chooserIntent, 2);
startActivityForResult(chooserIntent, 2);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......@@ -510,7 +512,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
}
if (str.length() != 0) {
if (android.os.Build.VERSION.SDK_INT < 11) {
if (Build.VERSION.SDK_INT < 11) {
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.setText(str);
} else {
......@@ -897,7 +899,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
if (show) {
if (pagedownButton.getVisibility() == View.GONE) {
if (android.os.Build.VERSION.SDK_INT > 13 && animated) {
if (Build.VERSION.SDK_INT > 13 && animated) {
pagedownButton.setVisibility(View.VISIBLE);
pagedownButton.setAlpha(0);
pagedownButton.animate().alpha(1).setDuration(200).setListener(null).start();
......@@ -907,7 +909,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
} else {
if (pagedownButton.getVisibility() == View.VISIBLE) {
if (android.os.Build.VERSION.SDK_INT > 13 && animated) {
if (Build.VERSION.SDK_INT > 13 && animated) {
pagedownButton.animate().alpha(0).setDuration(200).setListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
......@@ -1366,12 +1368,18 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
currentPicturePath = null;
}
if(android.os.Build.VERSION.SDK_INT >= 16) {
Bundle args = new Bundle();
args.putString("videoPath", videoPath);
VideoEditorActivity fragment = new VideoEditorActivity(args);
fragment.setDelegate(this);
presentFragment(fragment, false, true);
if(Build.VERSION.SDK_INT >= 16) {
if (paused) {
startVideoEdit = videoPath;
} else {
Bundle args = new Bundle();
args.putString("videoPath", videoPath);
VideoEditorActivity fragment = new VideoEditorActivity(args);
fragment.setDelegate(this);
if (!presentFragment(fragment, false, true)) {
processSendingVideo(videoPath, 0, 0, 0, 0, null);
}
}
} else {
processSendingVideo(videoPath, 0, 0, 0, 0, null);
}
......@@ -1662,12 +1670,13 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (video == null) {
Bitmap thumb = ThumbnailUtils.createVideoThumbnail(videoPath, MediaStore.Video.Thumbnails.MINI_KIND);
TLRPC.PhotoSize size = ImageLoader.scaleAndSaveImage(thumb, 90, 90, 55, currentEncryptedChat != null);
if (size == null) {
return;
}
size.type = "s";
video = new TLRPC.TL_video();
video.thumb = size;
if (video.thumb == null) {
video.thumb = new TLRPC.TL_photoSizeEmpty();
} else {
video.thumb.type = "s";
}
video.caption = "";
video.mime_type = "video/mp4";
video.id = 0;
......@@ -1693,7 +1702,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (temp != null && temp.exists()) {
video.size = (int) temp.length();
}
if (Build.VERSION.SDK_INT >= 10) {
if (Build.VERSION.SDK_INT >= 14) {
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
mediaMetadataRetriever.setDataSource(videoPath);
String width = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH);
......@@ -2519,6 +2528,22 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
chatEnterTime = System.currentTimeMillis();
chatLeaveTime = 0;
}
if (startVideoEdit != null) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
Bundle args = new Bundle();
args.putString("videoPath", startVideoEdit);
VideoEditorActivity fragment = new VideoEditorActivity(args);
fragment.setDelegate(ChatActivity.this);
if (!presentFragment(fragment, false, true)) {
processSendingVideo(startVideoEdit, 0, 0, 0, 0, null);
}
startVideoEdit = null;
}
});
}
}
@Override
......@@ -2542,7 +2567,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
try {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
getParentActivity().startActivityForResult(photoPickerIntent, 1);
startActivityForResult(photoPickerIntent, 1);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......@@ -2874,7 +2899,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
fragment.setDelegate(this);
presentFragment(fragment);
} else if (option == 3) {
if(android.os.Build.VERSION.SDK_INT < 11) {
if(Build.VERSION.SDK_INT < 11) {
android.text.ClipboardManager clipboard = (android.text.ClipboardManager)ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.setText(selectedObject.messageText);
} else {
......@@ -2938,7 +2963,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
try {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("*/*");
getParentActivity().startActivityForResult(photoPickerIntent, 21);
startActivityForResult(photoPickerIntent, 21);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......
......@@ -183,7 +183,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
}
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentSound);
getParentActivity().startActivityForResult(tmpIntent, 12);
startActivityForResult(tmpIntent, 12);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......
......@@ -91,6 +91,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
private int mobileDownloadRow;
private int wifiDownloadRow;
private int roamingDownloadRow;
private int saveToGalleryRow;
private int telegramFaqRow;
private int languageRow;
private int versionRow;
......@@ -188,6 +189,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
mobileDownloadRow = rowCount++;
wifiDownloadRow = rowCount++;
roamingDownloadRow = rowCount++;
saveToGalleryRow = rowCount++;
messagesSectionRow = rowCount++;
textSizeRow = rowCount++;
sendByEnterRow = rowCount++;
......@@ -325,6 +327,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (listView != null) {
listView.invalidateViews();
}
} else if (i == saveToGalleryRow) {
MediaController.getInstance().toggleSaveToGallery();
if (listView != null) {
listView.invalidateViews();
}
} else if (i == terminateSessionsRow) {
if (getParentActivity() == null) {
return;
......@@ -717,7 +724,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
return i == textSizeRow || i == enableAnimationsRow || i == blockedRow || i == notificationRow || i == backgroundRow ||
i == askQuestionRow || i == sendLogsRow || i == sendByEnterRow || i == terminateSessionsRow || i == wifiDownloadRow ||
i == mobileDownloadRow || i == clearLogsRow || i == roamingDownloadRow || i == languageRow ||
i == switchBackendButtonRow || i == telegramFaqRow || i == contactsSortRow || i == contactsReimportRow;
i == switchBackendButtonRow || i == telegramFaqRow || i == contactsSortRow || i == contactsReimportRow || i == saveToGalleryRow;
}
@Override
......@@ -921,18 +928,15 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
} else {
checkButton.setImageResource(R.drawable.btn_check_off);
}
} else if (i == saveToGalleryRow) {
textView.setText(LocaleController.getString("SaveToGallerySettings", R.string.SaveToGallerySettings));
divider.setVisibility(View.INVISIBLE);
if (MediaController.getInstance().canSaveToGallery()) {
checkButton.setImageResource(R.drawable.btn_check_on);
} else {
checkButton.setImageResource(R.drawable.btn_check_off);
}
}
// if (i == 7) {
// textView.setText(LocaleController.getString(R.string.SaveIncomingPhotos));
// divider.setVisibility(View.INVISIBLE);
//
// ImageView checkButton = (ImageView)view.findViewById(R.id.settings_row_check_button);
// if (UserConfig.saveIncomingPhotos) {
// checkButton.setImageResource(R.drawable.btn_check_on);
// } else {
// checkButton.setImageResource(R.drawable.btn_check_off);
// }
// }
} else if (type == 4) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
......@@ -1032,7 +1036,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
mask = MediaController.getInstance().wifiDownloadMask;
} else if (i == roamingDownloadRow) {
textView.setText(LocaleController.getString("WhenRoaming", R.string.WhenRoaming));
divider.setVisibility(View.GONE);
divider.setVisibility(View.VISIBLE);
mask = MediaController.getInstance().roamingDownloadMask;
}
String text = "";
......@@ -1073,7 +1077,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
return 1;
} else if (i == textSizeRow || i == languageRow || i == contactsSortRow) {
return 5;
} else if (i == enableAnimationsRow || i == sendByEnterRow) {
} else if (i == enableAnimationsRow || i == sendByEnterRow || i == saveToGalleryRow) {
return 3;
} else if (i == numberRow || i == notificationRow || i == blockedRow || i == backgroundRow || i == askQuestionRow || i == sendLogsRow || i == terminateSessionsRow || i == clearLogsRow || i == switchBackendButtonRow || i == telegramFaqRow || i == contactsReimportRow) {
return 2;
......
......@@ -200,7 +200,7 @@ public class SettingsNotificationsActivity extends BaseFragment implements Notif
}
}
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentSound);
getParentActivity().startActivityForResult(tmpIntent, i);
startActivityForResult(tmpIntent, i);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......
......@@ -184,11 +184,11 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(image));
currentPicturePath = image.getAbsolutePath();
}
getParentActivity().startActivityForResult(takePictureIntent, 10);
startActivityForResult(takePictureIntent, 10);
} else if (i == 1) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
getParentActivity().startActivityForResult(photoPickerIntent, 11);
startActivityForResult(photoPickerIntent, 11);
}
} catch (Exception e) {
FileLog.e("tmessages", e);
......
......@@ -14,6 +14,7 @@ import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.SurfaceTexture;
import android.media.MediaPlayer;
import android.os.Build;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
......@@ -99,10 +100,19 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
@Override
public void run() {
boolean playerCheck = false;
synchronized (sync) {
playerCheck = videoPlayer != null && videoPlayer.isPlaying();
}
while (playerCheck) {
while (true) {
synchronized (sync) {
try {
playerCheck = videoPlayer != null && videoPlayer.isPlaying();
} catch (Exception e) {
playerCheck = false;
FileLog.e("tmessages", e);
}
}
if (!playerCheck) {
break;
}
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
......@@ -176,6 +186,7 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
videoPlayer.prepareAsync();
} catch (Exception e) {
FileLog.e("tmessages", e);
return false;
}
return super.onFragmentCreate();
......@@ -357,10 +368,24 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
parent.removeView(fragmentView);
}
}
fixLayoutInternal();
return fragmentView;
}
private void setPlayerSurface() {
if (textureView == null || !textureView.isAvailable() || videoPlayer == null) {
return;
}
try {
Surface s = new Surface(textureView.getSurfaceTexture());
videoPlayer.setSurface(s);
if (playerPrepared) {
videoPlayer.seekTo((int) (videoTimelineView.getLeftProgress() * videoDuration));
}
} catch (Exception e) {
FileLog.e("tmessages", e);
}
}
@Override
public void onResume() {
super.onResume();
......@@ -375,18 +400,7 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
if (videoPlayer == null) {
return;
}
try {
Surface s = new Surface(surface);
videoPlayer.setSurface(s);
if (playerPrepared) {
videoPlayer.seekTo((int) (videoTimelineView.getLeftProgress() * videoDuration));
}
} catch (Exception e) {
FileLog.e("tmessages", e);
}
setPlayerSurface();
}
@Override
......@@ -515,12 +529,14 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
height = (int) (width / ar);
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams)textureView.getLayoutParams();
layoutParams.width = width;
layoutParams.height = height;
layoutParams.leftMargin = 0;
layoutParams.topMargin = 0;
textureView.setLayoutParams(layoutParams);
if (textureView != null) {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) textureView.getLayoutParams();
layoutParams.width = width;
layoutParams.height = height;
layoutParams.leftMargin = 0;
layoutParams.topMargin = 0;
textureView.setLayoutParams(layoutParams);
}
}
private void fixLayoutInternal() {
......@@ -574,17 +590,20 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
}
private void fixLayout() {
if (originalSizeTextView == null) {
if (fragmentView == null) {
return;
}
fragmentView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
fragmentView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public boolean onPreDraw() {
public void onGlobalLayout() {
fixLayoutInternal();
if (fragmentView != null) {
fragmentView.getViewTreeObserver().removeOnPreDrawListener(this);
if (Build.VERSION.SDK_INT < 16) {
fragmentView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
} else {
fragmentView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
}
return true;
}
});
}
......@@ -644,9 +663,19 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
List<Box> boxes = Path.getPaths(isoFile, "/moov/trak/");
TrackHeaderBox trackHeaderBox = null;
boolean isAvc = true;
boolean isMp4A = true;
Box boxTest = Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/mp4a/");
if (boxTest == null) {
isMp4A = false;
}
if (!isMp4A) {
return false;
}
Box avc = Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/avc1/");
if (avc == null) {
boxTest = Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/avc1/");
if (boxTest == null) {
isAvc = false;
}
......
......@@ -418,8 +418,7 @@ public class ActionBarLayout extends FrameLayout {
}
private void fixLayout() {
ViewTreeObserver obs = getViewTreeObserver();
obs.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
needLayout();
......@@ -790,6 +789,9 @@ public class ActionBarLayout extends FrameLayout {
}
public void startActivityForResult(final Intent intent, final int requestCode) {
if (parentActivity == null) {
return;
}
if (transitionAnimationInProgress) {
if (onCloseAnimationEndRunnable != null) {
closeAnimation.cancel();
......
......@@ -31,6 +31,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
import org.telegram.messenger.R;
import java.lang.reflect.Field;
......@@ -155,7 +156,7 @@ public class ActionBarMenuItem extends ImageView {
delimeter.setBackgroundColor(0xffdcdcdc);
popupLayout.addView(delimeter);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)delimeter.getLayoutParams();
layoutParams.width = AndroidUtilities.dp(196);
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = AndroidUtilities.density >= 3 ? 2 : 1;
delimeter.setLayoutParams(layoutParams);
delimeter.setTag(100 + id);
......@@ -163,7 +164,11 @@ public class ActionBarMenuItem extends ImageView {
TextView textView = new TextView(getContext());
textView.setTextColor(0xff000000);
textView.setBackgroundResource(R.drawable.list_selector);
textView.setGravity(Gravity.CENTER_VERTICAL);
if (!LocaleController.isRTL) {
textView.setGravity(Gravity.CENTER_VERTICAL);
} else {
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.RIGHT);
}
textView.setPadding(AndroidUtilities.dp(16), 0, AndroidUtilities.dp(16), 0);
textView.setTextSize(18);
textView.setMinWidth(AndroidUtilities.dp(196));
......@@ -171,10 +176,17 @@ public class ActionBarMenuItem extends ImageView {
textView.setText(text);
if (icon != 0) {
textView.setCompoundDrawablePadding(AndroidUtilities.dp(12));
textView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(icon), null, null, null);
if (!LocaleController.isRTL) {
textView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(icon), null, null, null);
} else {
textView.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(icon), null);
}
}
popupLayout.addView(textView);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)textView.getLayoutParams();
if (LocaleController.isRTL) {
layoutParams.gravity = Gravity.RIGHT;
}
layoutParams.width = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.height = AndroidUtilities.dp(48);
textView.setLayoutParams(layoutParams);
......
......@@ -139,25 +139,16 @@ public class BaseFragment {
}
public void presentFragment(BaseFragment fragment) {
if (parentLayout == null) {
return;
}
parentLayout.presentFragment(fragment);
public boolean presentFragment(BaseFragment fragment) {
return parentLayout != null && parentLayout.presentFragment(fragment);
}
public void presentFragment(BaseFragment fragment, boolean removeLast) {
if (parentLayout == null) {
return;
}
parentLayout.presentFragment(fragment, removeLast);
public boolean presentFragment(BaseFragment fragment, boolean removeLast) {
return parentLayout != null && parentLayout.presentFragment(fragment, removeLast);
}
public void presentFragment(BaseFragment fragment, boolean removeLast, boolean forceWithoutAnimation) {
if (parentLayout == null) {
return;
}
parentLayout.presentFragment(fragment, removeLast, forceWithoutAnimation, true);
public boolean presentFragment(BaseFragment fragment, boolean removeLast, boolean forceWithoutAnimation) {
return parentLayout != null && parentLayout.presentFragment(fragment, removeLast, forceWithoutAnimation, true);
}
public Activity getParentActivity() {
......@@ -167,6 +158,12 @@ public class BaseFragment {
return null;
}
public void startActivityForResult(final Intent intent, final int requestCode) {
if (parentLayout != null) {
parentLayout.startActivityForResult(intent, requestCode);
}
}
public void showActionBar() {
if (parentLayout != null) {
parentLayout.showActionBar();
......
......@@ -61,7 +61,7 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(image));
currentPicturePath = image.getAbsolutePath();
}
parentFragment.getParentActivity().startActivityForResult(takePictureIntent, 13);
parentFragment.startActivityForResult(takePictureIntent, 13);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......@@ -71,7 +71,7 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg
try {
Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("image/*");
parentFragment.getParentActivity().startActivityForResult(photoPickerIntent, 14);
parentFragment.startActivityForResult(photoPickerIntent, 14);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
......
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#40a0bcdd" />
</shape>
</item>
<item android:state_focused="true">
<shape android:shape="rectangle">
<solid android:color="#40a0bcdd" />
</shape>
</item>
<item android:state_selected="true">
<shape android:shape="rectangle">
<solid android:color="#40a0bcdd" />
</shape>
</item>
<item android:drawable="@drawable/transparent" />
</selector>
\ No newline at end of file
<!--
~ This is the source code of Telegram for Android v. 1.7.x.
~ It is licensed under GNU GPL v. 2 or later.
~ You should have received a copy of the license in this archive (see LICENSE).
~
~ Copyright Nikolai Kudashov, 2013-2014.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/launch_layout">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/cats"
android:scaleType="centerCrop"
android:id="@+id/launch_background"/>
<LinearLayout
android:layout_width="320dp"
android:layout_height="wrap_content"
android:id="@+id/launch_button_layout"
android:layout_centerVertical="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="308dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/btnshadow"
android:layout_gravity="center">
<TextView
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/new_group_button"
android:textColor="#ff54759e"
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingRight="17dp"
android:background="@drawable/launch_button_states"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#ffd6dee4"/>
<TextView
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/new_secret_button"
android:textColor="#ff54759e"
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingRight="17dp"
android:background="@drawable/launch_button_states"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#ffd6dee4"/>
<TextView
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/new_broadcast_button"
android:textColor="#ff54759e"
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingRight="17dp"
android:background="@drawable/launch_button_states"/>
</LinearLayout>
<LinearLayout
android:layout_width="308dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/btnshadow"
android:layout_gravity="center"
android:layout_marginTop="18dp">
<TextView
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/contacts_button"
android:textColor="#ff54759e"
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingRight="17dp"
android:background="@drawable/launch_button_states"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#ffd6dee4"/>
<TextView
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/settings_button"
android:textColor="#ff54759e"
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingRight="17dp"
android:background="@drawable/launch_button_states"/>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_height="match_parent"
android:layout_width="1dp"
android:background="#40295274"
android:id="@+id/shadow_tablet_side"/>
<FrameLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/shadow_tablet"
android:background="#7F000000"
android:visibility="gone"/>
</RelativeLayout>
\ No newline at end of file
......@@ -33,8 +33,6 @@
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingLeft="17dp"
android:paddingStart="17dp"
android:paddingEnd="17dp"
android:background="@drawable/launch_button_states"/>
<FrameLayout
......@@ -50,8 +48,6 @@
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingLeft="17dp"
android:paddingStart="17dp"
android:paddingEnd="17dp"
android:background="@drawable/launch_button_states"/>
<FrameLayout
......@@ -67,8 +63,6 @@
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingLeft="17dp"
android:paddingStart="17dp"
android:paddingEnd="17dp"
android:background="@drawable/launch_button_states"/>
</LinearLayout>
......@@ -89,8 +83,6 @@
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingLeft="17dp"
android:paddingStart="17dp"
android:paddingEnd="17dp"
android:background="@drawable/launch_button_states"/>
<FrameLayout
......@@ -106,8 +98,6 @@
android:gravity="center_vertical"
android:textSize="20dp"
android:paddingLeft="17dp"
android:paddingStart="17dp"
android:paddingEnd="17dp"
android:background="@drawable/launch_button_states"/>
</LinearLayout>
......
......@@ -68,6 +68,7 @@
android:textColor="#f0f0f0"
android:textSize="15dp"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:id="@+id/original_title"/>
<TextView
......@@ -76,6 +77,7 @@
android:textColor="#bebebe"
android:textSize="15dp"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:id="@+id/original_size"/>
<TextView
......@@ -85,6 +87,7 @@
android:textSize="15dp"
android:layout_marginTop="10dp"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:id="@+id/edited_title"/>
<TextView
......@@ -93,12 +96,14 @@
android:textColor="#bebebe"
android:textSize="15dp"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:id="@+id/edited_size"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="6dp"
android:textColor="#f0f0f0"
android:textSize="15dp"
......
......@@ -4,17 +4,14 @@
<resources>
<string name="AppName">Telegram</string>
<string name="LanguageName">English</string>
<string name="LanguageNameInEnglish">English</string>
<string name="LanguageCode">en</string>
<!--signin view-->
<string name="YourPhone">Your phone</string>
<string name="StartText">Please confirm your country code\nand enter your phone number.</string>
<string name="ChooseCountry">Choose a country</string>
<string name="WrongCountry">Wrong country code</string>
<!--code enter view-->
<string name="YourCode">Your code</string>
<string name="SentSmsCode">We\'ve sent an SMS with an activation code to your phone</string>
......@@ -23,7 +20,6 @@
<string name="Code">Code</string>
<string name="WrongNumber">Wrong number?</string>
<string name="DidNotGetTheCode">Didn\'t get the code?</string>
<!--signup view-->
<string name="YourName">Your name</string>
<string name="RegisterText">Set up your first and last name</string>
......@@ -31,7 +27,6 @@
<string name="FirstName">First name (required)</string>
<string name="LastName">Last name (optional)</string>
<string name="CancelRegistration">Cancel registration</string>
<!--chats view-->
<string name="Chats">Chats</string>
<string name="Search">Search</string>
......@@ -56,7 +51,6 @@
<string name="DeleteChat">Delete and exit</string>
<string name="HiddenName">Hidden Name</string>
<string name="SelectChat">Select Chat</string>
<!--broadcasts-->
<string name="BroadcastList">Broadcast List</string>
<string name="NewBroadcastList">New Broadcast List</string>
......@@ -64,7 +58,6 @@
<string name="YouCreatedBroadcastList">You created a broadcast list</string>
<string name="AddRecipient">Add Recipient</string>
<string name="KickFromBroadcast">Remove from broadcast list</string>
<!--documents view-->
<string name="SelectFile">Select File</string>
<string name="FreeOfTotal">Free %1$s of %2$s</string>
......@@ -78,7 +71,6 @@
<string name="ExternalStorage">External Storage</string>
<string name="SystemRoot">System Root</string>
<string name="SdCard">SD Card</string>
<!--chat view-->
<string name="Invisible">invisible</string>
<string name="Typing">typing...</string>
......@@ -119,7 +111,6 @@
<string name="SaveToDownloads">Save to downloads</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<string name="UnsupportedAttachment">Unsupported attachment</string>
<!--notification-->
<string name="EncryptedChatRequested">Secret chat requested</string>
<string name="EncryptedChatAccepted">Secret chat started</string>
......@@ -161,7 +152,6 @@
<string name="NotificationUnrecognizedDevice">%1$s,\nWe detected a login into your account from a new device on %2$s\n\nDevice: %3$s\nLocation: %4$s\n\nIf this wasn\'t you, you can go to Settings - Terminate all sessions.\n\nSincerely,\nThe Telegram Team</string>
<string name="NotificationContactNewPhoto">%1$s updated profile photo</string>
<string name="Reply">Reply</string>
<!--contacts view-->
<string name="SelectContact">Select Contact</string>
<string name="NoContacts">No contacts yet</string>
......@@ -174,14 +164,12 @@
<string name="LastSeen">last seen</string>
<string name="LastSeenDate">last seen</string>
<string name="InviteFriends">Invite Friends</string>
<!--group create view-->
<string name="SendMessageTo">Send message to...</string>
<string name="EnterGroupNamePlaceholder">Enter group name</string>
<string name="GroupName">Group name</string>
<string name="AllContacts">ALL CONTACTS</string>
<string name="MembersCount">%1$d/%2$d members</string>
<!--group info view-->
<string name="EnterGroupNameTitle">ENTER GROUP NAME</string>
<string name="SharedMedia">Shared Media</string>
......@@ -192,7 +180,6 @@
<string name="DeleteAndExit">Delete and leave group</string>
<string name="Notifications">Notifications</string>
<string name="KickFromGroup">Remove from group</string>
<!--contact info view-->
<string name="ShareContact">Share</string>
<string name="AddContact">Add</string>
......@@ -220,7 +207,6 @@
<string name="ShortMessageLifetime1d">1d</string>
<string name="ShortMessageLifetime1w">1w</string>
<string name="EncryptionKeyDescription">This image is a visualization of the encryption key for this secret chat with <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>If this image looks the same on <![CDATA[<b>]]>%2$s\'s<![CDATA[</b>]]> phone, your chat is 200%% secure.<![CDATA[<br><br>]]>Learn more at telegram.org</string>
<!--settings view-->
<string name="ResetNotificationsText">Reset all notification settings to default</string>
<string name="TextSize">Messages Text Size</string>
......@@ -290,11 +276,10 @@
<string name="WhenConnectedOnWiFi">When connected on Wi-Fi</string>
<string name="WhenRoaming">When roaming</string>
<string name="NoMediaAutoDownload">No media</string>
<string name="SaveToGallerySettings">Save to gallery</string>
<!--media view-->
<string name="NoMedia">No shared media yet</string>
<string name="CancelDownload">Cancel Download</string>
<!--map view-->
<string name="MyLocation">My location</string>
<string name="Map">Map</string>
......@@ -304,7 +289,6 @@
<string name="KMetersAway">km away</string>
<string name="SendLocation">Send Location</string>
<string name="ShareLocation">Share Location</string>
<!--photo gallery view-->
<string name="ShowAllMedia">Show all media</string>
<string name="SaveToGallery">Save to gallery</string>
......@@ -312,14 +296,12 @@
<string name="Gallery">Gallery</string>
<string name="AllPhotos">All Photos</string>
<string name="NoPhotos">No photos yet</string>
<!--edit video view-->
<string name="EditVideo">Edit Video</string>
<string name="OriginalVideo">Original Video</string>
<string name="EditedVideo">Edited Video</string>
<string name="SendingVideo">Sending video...</string>
<string name="CompressVideo">Compress Video</string>
<!--button titles-->
<string name="Next">Next</string>
<string name="Back">Back</string>
......@@ -340,7 +322,6 @@
<string name="OpenPhoto">Open photo</string>
<string name="Set">Set</string>
<string name="OK">OK</string>
<!--messages-->
<string name="ActionKickUser">un1 removed un2</string>
<string name="ActionLeftUser">un1 left group</string>
......@@ -368,7 +349,6 @@
<string name="FromYou">You</string>
<string name="ActionTakeScreenshootYou">You took a screenshot!</string>
<string name="ActionTakeScreenshoot">un1 took a screenshot!</string>
<!--Alert messages-->
<string name="InvalidPhoneNumber">Invalid phone number</string>
<string name="CodeExpired">Code expired, please login again</string>
......@@ -397,7 +377,6 @@
<string name="AreYouSureDeleteContact">Are you sure you want to delete this contact?</string>
<string name="AreYouSureSecretChat">Are you sure you want to start a secret chat?</string>
<string name="ForwardFromMyName">forward from my name</string>
<!--Intro view-->
<string name="Page1Title">Telegram</string>
<string name="Page2Title">Fast</string>
......@@ -406,15 +385,14 @@
<string name="Page5Title">Powerful</string>
<string name="Page6Title">Cloud-Based</string>
<string name="Page7Title">Private</string>
<string name="Page1Message">The world\'s <![CDATA[<b>fastest</b>]]> messaging app.\nIt is <![CDATA[<b>free</b>]]> and <![CDATA[<b>secure</b>]]>.</string>
<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> delivers messages faster than<![CDATA[<br/>]]>any other application</string>
<string name="Page3Message"><![CDATA[<b>Telegram</b>]]> is free forever. No ads.<![CDATA[<br/>]]>No subscription fees</string>
<string name="Page4Message"><![CDATA[<b>Telegram</b>]]> keeps your messages safe<![CDATA[<br/>]]>from hacker attacks</string>
<string name="Page5Message"><![CDATA[<b>Telegram</b>]]> has no limits on the size of<![CDATA[<br/>]]>your media and chats</string>
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> lets you access your messages<![CDATA[<br/>]]>from multiple devices</string>
<string name="Page7Message"><![CDATA[<b>Telegram</b>]]> messages are heavily encrypted<![CDATA[<br/>]]>and can self-destruct</string>
<string name="Page1Message">The world\'s <![CDATA[<b>fastest</b>]]> messaging app.<![CDATA[<br/>]]>It is <![CDATA[<b>free</b>]]> and <![CDATA[<b>secure</b>]]>.</string>
<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> delivers messages faster than<![CDATA[<br/>]]>any other application.</string>
<string name="Page3Message"><![CDATA[<b>Telegram</b>]]> is free forever. No ads.<![CDATA[<br/>]]>No subscription fees.</string>
<string name="Page4Message"><![CDATA[<b>Telegram</b>]]> keeps your messages safe<![CDATA[<br/>]]>from hacker attacks.</string>
<string name="Page5Message"><![CDATA[<b>Telegram</b>]]> has no limits on the size of<![CDATA[<br/>]]>your media and chats.</string>
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> lets you access your messages<![CDATA[<br/>]]>from multiple devices.</string>
<string name="Page7Message"><![CDATA[<b>Telegram</b>]]> messages are heavily encrypted<![CDATA[<br/>]]>and can self-destruct.</string>
<string name="StartMessaging">Start Messaging</string>
<!--plurals-->
<string name="Members_zero">no members</string>
<string name="Members_one">%1$d member</string>
......@@ -446,7 +424,6 @@
<string name="FromContacts_few">from %1$d contacts</string>
<string name="FromContacts_many">from %1$d contacts</string>
<string name="FromContacts_other">from %1$d contacts</string>
<!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string>
</resources>
\ No newline at end of file
......@@ -21,7 +21,7 @@
<item name="android:listViewStyle">@style/Theme.TMessages.ListView</item>
<item name="android:listChoiceBackgroundIndicator">@drawable/list_selector</item>
<item name="android:editTextStyle">@style/Theme.TMessages.EditText</item>
<item name="android:actionBarItemBackground">@drawable/bar_selector</item>
<item name="android:actionBarItemBackground">@drawable/bar_selector_style</item>
</style>
<style name="Theme.TMessages.PopupNotification" parent="Theme.TMessages">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment