Moved some hard coded text to resources + revert Market setting to enable TLS/SRTP/ZRTP

This commit is contained in:
Sylvain Berfini 2012-12-17 16:19:48 +01:00
parent ff1c086196
commit 9788fa5542
2 changed files with 7 additions and 6 deletions

View file

@ -49,8 +49,10 @@
<bool name="allow_edit_in_dialer">true</bool>
<bool name="forbid_self_call">false</bool>
<bool name="disable_chat">false</bool>
<bool name="disable_all_security_features_for_markets">true</bool>
<bool name="disable_all_security_features_for_markets">false</bool>
<string name="about_bugreport_email">linphone-android@belledonne-communications.com</string>
<string name="temp_photo_name">linphone-android-photo-temp.jpg</string>
<string name="temp_photo_name_with_date">linphone-android-photo-%s.jpg</string>
</resources>

View file

@ -562,7 +562,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
private void pickImage() {
final List<Intent> cameraIntents = new ArrayList<Intent>();
final Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File file = new File(Environment.getExternalStorageDirectory(), "linphone-android-photo-temp.jpg");
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name));
imageToUploadUri = Uri.fromFile(file);
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageToUploadUri);
cameraIntents.add(captureIntent);
@ -630,7 +630,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
File sourceFile = new File(filePath);
fileName = sourceFile.getName();
} else {
fileName = "linphone-android-photo-" + System.currentTimeMillis() + ".jpg";
fileName = getString(R.string.temp_photo_name_with_date).replace("%s", String.valueOf(System.currentTimeMillis()));
}
String response = null;
@ -711,7 +711,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
return null;
}
@SuppressLint("NewApi")
private void showPopupMenuAskingImageSize(final String filePath, final Bitmap image) {
fileToUploadPath = filePath;
imageToUpload = image;
@ -772,7 +771,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (!uploadThread.isInterrupted() && bm != null) {
url = uploadImage(filePath, bm, COMPRESSOR_QUALITY, outStream.size());
File file = new File(Environment.getExternalStorageDirectory(), "linphone-android-photo-temp.jpg");
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name));
file.delete();
}
@ -814,7 +813,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
showPopupMenuAskingImageSize(filePath, null);
}
else {
File file = new File(Environment.getExternalStorageDirectory(), "linphone-android-photo-temp.jpg");
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name));
if (file.exists()) {
imageToUploadUri = Uri.fromFile(file);
String filePath = imageToUploadUri.getPath();