Some minor improvements

This commit is contained in:
Sylvain Berfini 2019-01-24 11:11:23 +01:00
parent ca65218d13
commit fac1808b3d
10 changed files with 16 additions and 14 deletions

View file

@ -118,7 +118,7 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'com.google.android:flexbox:1.1.0'
if (isLocalAarAvailable()) {

View file

@ -226,9 +226,9 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
if (id == R.id.speaker) {
mIsSpeakerEnabled = !mIsSpeakerEnabled;
if (mIsSpeakerEnabled) {
mSpeaker.setImageResource(R.drawable.speaker_selected);
mSpeaker.setImageResource(R.drawable.route_speaker_selected);
} else {
mSpeaker.setImageResource(R.drawable.speaker_default);
mSpeaker.setImageResource(R.drawable.route_speaker_default);
}
LinphoneManager.getInstance().enableSpeaker(mIsSpeakerEnabled);
}

View file

@ -309,6 +309,7 @@ public class ContactsManager extends ContentObserver implements FriendListListen
} catch (RemoteException e) {
Log.e("[Contacts Manager] Couldn't make contacts account visible: " + e);
}
client.close();
}
public void initializeSyncAccount(Activity activity) {

View file

@ -1503,7 +1503,6 @@ public class LinphonePreferences {
* @throws CoreException
*/
public void saveNewAccount() throws CoreException {
if (tempUsername == null
|| tempUsername.length() < 1
|| tempDomain == null

View file

@ -43,6 +43,7 @@ public class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
private final WeakReference<ImageView> mImageViewReference;
private final Context mContext;
private final Bitmap mDefaultBitmap;
private final int mImageViewHeight;
public BitmapWorkerTask(Context context, ImageView imageView, Bitmap defaultBitmap) {
mContext = context;
@ -50,6 +51,7 @@ public class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
path = null;
// Use a WeakReference to ensure the ImageView can be garbage collected
mImageViewReference = new WeakReference<>(imageView);
mImageViewHeight = imageView.getMeasuredHeight();
}
public static BitmapWorkerTask getBitmapWorkerTask(ImageView imageView) {
@ -103,7 +105,7 @@ public class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
int pictureOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0);
if (pictureOrientation == 6 || pictureOrientation == 3 || pictureOrientation == 8) {
if (imageView != null) {
float factor = (float) imageView.getMeasuredHeight() / height;
float factor = (float) mImageViewHeight / height;
matrix.postScale(factor, factor);
}
if (pictureOrientation == 6) {
@ -125,7 +127,7 @@ public class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
if (thumbnail == null && bm != null) {
if (imageView == null) return bm;
thumbnail = scaleToFitHeight(bm, imageView.getMeasuredHeight());
thumbnail = scaleToFitHeight(bm, mImageViewHeight);
if (thumbnail != bm) {
bm.recycle();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/speaker_selected"
<item android:drawable="@drawable/route_speaker_selected"
android:state_selected="true" />
<item
android:drawable="@drawable/speaker_default" />
android:drawable="@drawable/route_speaker_default" />
</selector>

View file

@ -118,7 +118,7 @@
<bool name="hide_settings_from_side_menu">false</bool>
<!-- Others Parameters-->
<string name="about_text">GNU General Public License V2\n © 2010-2018 Belledonne Communications</string>
<string name="about_text">GNU General Public License V2\n © 20102018 Belledonne Communications</string>
<string name="about_bugreport_email">linphone-android@belledonne-communications.com</string>
<bool name="enable_call_notification">true</bool>
<bool name="kill_service_with_task_manager">true</bool>

View file

@ -183,9 +183,9 @@
<string name="no_chat_history">No conversations</string>
<string name="delete_conversation">Do you want to delete selected conversation?</string>
<string name="delete_message">Do you want to delete selected message?</string>
<string name="remote_composing">Remote is writing...</string>
<string name="remote_composing_single">%s is writing...</string>
<string name="remote_composing_multiple">%s are writing...</string>
<string name="remote_composing">Remote is writing</string>
<string name="remote_composing_single">%s is writing</string>
<string name="remote_composing_multiple">%s are writing</string>
<string name="share_picture_size_small">Small</string>
<string name="share_picture_size_medium">Medium</string>
<string name="share_picture_size_large">Large</string>
@ -195,7 +195,7 @@
<string name="image_picker_title">Select source</string>
<string name="image_saved">Image saved</string>
<string name="image_not_saved">Error, image not saved</string>
<string name="wait">Please wait...</string>
<string name="wait">Please wait</string>
<string name="image_transfert_error">An error occurred during the file transfer</string>
<string name="message_not_encrypted">This message is not encrypted</string>
<string name="message_cant_be_decrypted">You have received an encrypted message you are unable to decrypt from %s\nYou need to call your correspondant in order to exchange your ZRTP keys if you want to decrypt the future messages you will receive.</string>
@ -325,7 +325,7 @@
<string name="error_unauthorized">Unauthorized</string>
<string name="error_io_error">Network error</string>
<string name="download_image_failed">Download failed. Please check your network connection or try again later.</string>
<string name="remote_provisioning_failure">Failed to download or apply remote provisioning profile...</string>
<string name="remote_provisioning_failure">Failed to download or apply remote provisioning profile</string>
<string name="remote_provisioning_again_title">Remote provisioning</string>
<string name="remote_provisioning_again_message">Do you want to change the provisioning URI?</string>