Merge branch 'development' of https://github.com/siacs/Conversations into development
This commit is contained in:
		
						commit
						813896dbc9
					
				| @ -1,8 +1,8 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|     package="eu.siacs.conversations" |     package="eu.siacs.conversations" | ||||||
|     android:versionCode="12" |     android:versionCode="13" | ||||||
|     android:versionName="0.2.1" > |     android:versionName="0.2.2" > | ||||||
| 
 | 
 | ||||||
|     <uses-sdk |     <uses-sdk | ||||||
|         android:minSdkVersion="14" |         android:minSdkVersion="14" | ||||||
|  | |||||||
| @ -42,11 +42,14 @@ These XEPs are - as of now: | |||||||
| (In order of appearance) | (In order of appearance) | ||||||
| 
 | 
 | ||||||
| ###Code | ###Code | ||||||
| * Rene Treffer @rtreffer | * [Rene Treffer](https://github.com/rtreffer) | ||||||
| * Andreas Straub @strb | * [Andreas Straub](https://github.com/strb) | ||||||
| 
 | 
 | ||||||
| ###Translations | ###Translations | ||||||
| * @beriain (Spanish and Basque) | * [Sergio Cárdenas](https://github.com/kruks23) (Spanish) | ||||||
|  | * [Benoit Bouvarel](https://github.com/BenoitBouvarel) (French) | ||||||
|  | * [Daniel Gultsch](https://github.com/iNPUTmice) (German) | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| ##FAQ | ##FAQ | ||||||
| ###General | ###General | ||||||
|  | |||||||
| @ -20,7 +20,6 @@ | |||||||
|         android:layout_width="wrap_content" |         android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:paddingLeft="8dp" |         android:paddingLeft="8dp" | ||||||
|         android:text="julia@jabber.example.com" |  | ||||||
|         android:textSize="14sp" /> |         android:textSize="14sp" /> | ||||||
|      <TextView |      <TextView | ||||||
|         android:layout_width="wrap_content" |         android:layout_width="wrap_content" | ||||||
| @ -35,7 +34,6 @@ | |||||||
|         android:layout_width="wrap_content" |         android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:paddingLeft="8dp" |         android:paddingLeft="8dp" | ||||||
|         android:text="2674D6A0 0B1421B1 BFC42AEC C56F3719 672437D8" |  | ||||||
|         android:textSize="14sp" |         android:textSize="14sp" | ||||||
|         android:typeface="monospace"/> |         android:typeface="monospace"/> | ||||||
|      <TextView |      <TextView | ||||||
| @ -51,7 +49,6 @@ | |||||||
|         android:layout_width="wrap_content" |         android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:paddingLeft="8dp" |         android:paddingLeft="8dp" | ||||||
|         android:text="2674D6A0 0B1421B1 BFC42AEC C56F3719 672437D8" |  | ||||||
|         android:textSize="14sp" |         android:textSize="14sp" | ||||||
|         android:typeface="monospace"/> |         android:typeface="monospace"/> | ||||||
| </LinearLayout> | </LinearLayout> | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ | |||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:ems="10" |         android:ems="10" | ||||||
|         android:inputType="textEmailAddress" |         android:inputType="textEmailAddress" | ||||||
|         android:hint="username@jabber.example.com"> |         android:hint="username@example.com"> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     </EditText> |     </EditText> | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ | |||||||
|     <string name="app_name">Conversations</string> |     <string name="app_name">Conversations</string> | ||||||
|     <string name="action_settings">Einstellungen</string> |     <string name="action_settings">Einstellungen</string> | ||||||
|     <string name="action_add">Neue Unterhaltung</string> |     <string name="action_add">Neue Unterhaltung</string> | ||||||
|     <string name="action_accounts">Kontos verwalten</string> |     <string name="action_accounts">Konten verwalten</string> | ||||||
|     <string name="action_refresh">Kontaktliste neu laden</string> |     <string name="action_refresh">Kontaktliste neu laden</string> | ||||||
|     <string name="action_end_conversation">Unterhaltung beenden</string> |     <string name="action_end_conversation">Unterhaltung beenden</string> | ||||||
|     <string name="action_contact_details">Kontaktdetails</string> |     <string name="action_contact_details">Kontaktdetails</string> | ||||||
|  | |||||||
| @ -1156,9 +1156,12 @@ public class XmppConnectionService extends Service { | |||||||
| 		this.statusListener.onStatusChanged(account); | 		this.statusListener.onStatusChanged(account); | ||||||
| 		databaseBackend.updateAccount(account); | 		databaseBackend.updateAccount(account); | ||||||
| 		reconnectAccount(account, false); | 		reconnectAccount(account, false); | ||||||
| 		if (accountChangedListener != null) | 		if (accountChangedListener != null) { | ||||||
| 			accountChangedListener.onAccountListChangedListener(); | 			accountChangedListener.onAccountListChangedListener(); | ||||||
| 		} | 		} | ||||||
|  | 		UIHelper.showErrorNotification(getApplicationContext(), | ||||||
|  | 				getAccounts()); | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	public void deleteAccount(Account account) { | 	public void deleteAccount(Account account) { | ||||||
| 		if (account.getXmppConnection() != null) { | 		if (account.getXmppConnection() != null) { | ||||||
| @ -1166,9 +1169,12 @@ public class XmppConnectionService extends Service { | |||||||
| 		} | 		} | ||||||
| 		databaseBackend.deleteAccount(account); | 		databaseBackend.deleteAccount(account); | ||||||
| 		this.accounts.remove(account); | 		this.accounts.remove(account); | ||||||
| 		if (accountChangedListener != null) | 		if (accountChangedListener != null) { | ||||||
| 			accountChangedListener.onAccountListChangedListener(); | 			accountChangedListener.onAccountListChangedListener(); | ||||||
| 		} | 		} | ||||||
|  | 		UIHelper.showErrorNotification(getApplicationContext(), | ||||||
|  | 				getAccounts()); | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	public void setOnConversationListChangedListener( | 	public void setOnConversationListChangedListener( | ||||||
| 			OnConversationListChangedListener listener) { | 			OnConversationListChangedListener listener) { | ||||||
|  | |||||||
| @ -515,9 +515,10 @@ public class ContactsActivity extends XmppActivity { | |||||||
| 			getActionBar().setHomeButtonEnabled(false); | 			getActionBar().setHomeButtonEnabled(false); | ||||||
| 		} | 		} | ||||||
| 		this.rosterContacts.clear(); | 		this.rosterContacts.clear(); | ||||||
| 		for (int i = 0; i < accounts.size(); ++i) { | 		for(Account account : accounts) { | ||||||
| 			rosterContacts.addAll(xmppConnectionService.getRoster(accounts | 			if (account.getStatus() != Account.STATUS_DISABLED) { | ||||||
| 					.get(i))); | 				rosterContacts.addAll(xmppConnectionService.getRoster(account)); | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 		updateAggregatedContacts(); | 		updateAggregatedContacts(); | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -583,8 +583,7 @@ public class ConversationFragment extends Fragment { | |||||||
| 		ConversationActivity activity = (ConversationActivity) getActivity(); | 		ConversationActivity activity = (ConversationActivity) getActivity(); | ||||||
| 		if (this.conversation != null) { | 		if (this.conversation != null) { | ||||||
| 			for (Message message : this.conversation.getMessages()) { | 			for (Message message : this.conversation.getMessages()) { | ||||||
| 				if ((message.getEncryption() == Message.ENCRYPTION_PGP) | 				if (message.getEncryption() == Message.ENCRYPTION_PGP) { | ||||||
| 						&& (message.getStatus() == Message.STATUS_RECIEVED)) { |  | ||||||
| 					decryptMessage(message); | 					decryptMessage(message); | ||||||
| 					break; | 					break; | ||||||
| 				} | 				} | ||||||
| @ -758,7 +757,6 @@ public class ConversationFragment extends Fragment { | |||||||
| 
 | 
 | ||||||
| 	private class BitmapCache { | 	private class BitmapCache { | ||||||
| 		private HashMap<String, Bitmap> bitmaps = new HashMap<String, Bitmap>(); | 		private HashMap<String, Bitmap> bitmaps = new HashMap<String, Bitmap>(); | ||||||
| 		private Bitmap error = null; |  | ||||||
| 
 | 
 | ||||||
| 		public Bitmap get(String name, Contact contact, Context context) { | 		public Bitmap get(String name, Contact contact, Context context) { | ||||||
| 			if (bitmaps.containsKey(name)) { | 			if (bitmaps.containsKey(name)) { | ||||||
|  | |||||||
| @ -12,7 +12,6 @@ import eu.siacs.conversations.entities.Account; | |||||||
| import eu.siacs.conversations.entities.Contact; | import eu.siacs.conversations.entities.Contact; | ||||||
| import eu.siacs.conversations.entities.Conversation; | import eu.siacs.conversations.entities.Conversation; | ||||||
| import eu.siacs.conversations.entities.Message; | import eu.siacs.conversations.entities.Message; | ||||||
| import eu.siacs.conversations.entities.MucOptions; |  | ||||||
| import eu.siacs.conversations.entities.MucOptions.User; | import eu.siacs.conversations.entities.MucOptions.User; | ||||||
| import eu.siacs.conversations.ui.ConversationActivity; | import eu.siacs.conversations.ui.ConversationActivity; | ||||||
| import eu.siacs.conversations.ui.ManageAccountActivity; | import eu.siacs.conversations.ui.ManageAccountActivity; | ||||||
| @ -27,7 +26,6 @@ import android.content.DialogInterface; | |||||||
| import android.content.DialogInterface.OnClickListener; | import android.content.DialogInterface.OnClickListener; | ||||||
| import android.content.Intent; | import android.content.Intent; | ||||||
| import android.content.SharedPreferences; | import android.content.SharedPreferences; | ||||||
| import android.content.res.Resources; |  | ||||||
| import android.graphics.Bitmap; | import android.graphics.Bitmap; | ||||||
| import android.graphics.BitmapFactory; | import android.graphics.BitmapFactory; | ||||||
| import android.graphics.Canvas; | import android.graphics.Canvas; | ||||||
| @ -38,11 +36,9 @@ import android.net.Uri; | |||||||
| import android.preference.PreferenceManager; | import android.preference.PreferenceManager; | ||||||
| import android.provider.ContactsContract.Contacts; | import android.provider.ContactsContract.Contacts; | ||||||
| import android.support.v4.app.NotificationCompat; | import android.support.v4.app.NotificationCompat; | ||||||
| import android.support.v4.app.NotificationCompat.InboxStyle; |  | ||||||
| import android.support.v4.app.TaskStackBuilder; | import android.support.v4.app.TaskStackBuilder; | ||||||
| import android.text.Html; | import android.text.Html; | ||||||
| import android.util.DisplayMetrics; | import android.util.DisplayMetrics; | ||||||
| import android.util.Log; |  | ||||||
| import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||||
| import android.view.View; | import android.view.View; | ||||||
| import android.widget.LinearLayout; | import android.widget.LinearLayout; | ||||||
| @ -235,10 +231,6 @@ public class UIHelper { | |||||||
| 		return bitmap; | 		return bitmap; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	private static Bitmap getUnknownContactPicture(String[] names, int size) { |  | ||||||
| 		return getUnknownContactPicture(names, size, UIHelper.BG_COLOR, UIHelper.FG_COLOR); |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	private static Bitmap getMucContactPicture(Conversation conversation, int size, int bgColor, int fgColor) { | 	private static Bitmap getMucContactPicture(Conversation conversation, int size, int bgColor, int fgColor) { | ||||||
| 		List<User> members = conversation.getMucOptions().getUsers(); | 		List<User> members = conversation.getMucOptions().getUsers(); | ||||||
| 		if (members.size() == 0) { | 		if (members.size() == 0) { | ||||||
| @ -273,10 +265,6 @@ public class UIHelper { | |||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public static Bitmap getContactPicture(Contact contact, int dpSize, Context context, boolean notification) { | 	public static Bitmap getContactPicture(Contact contact, int dpSize, Context context, boolean notification) { | ||||||
| 		int fgColor = UIHelper.FG_COLOR, |  | ||||||
| 			bgColor = (notification) ? |  | ||||||
| 				UIHelper.BG_COLOR : UIHelper.TRANSPARENT; |  | ||||||
| 
 |  | ||||||
| 		String uri = contact.getProfilePhoto(); | 		String uri = contact.getProfilePhoto(); | ||||||
| 		if (uri==null) { | 		if (uri==null) { | ||||||
| 			return getContactPicture(contact.getDisplayName(), dpSize, | 			return getContactPicture(contact.getDisplayName(), dpSize, | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ import java.util.regex.Pattern; | |||||||
| 
 | 
 | ||||||
| public class Validator { | public class Validator { | ||||||
| 	public static final Pattern VALID_JID =  | 	public static final Pattern VALID_JID =  | ||||||
| 		    Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); | 		    Pattern.compile("\\b^[A-Z0-9._%+-]+@([A-Z0-9.-]+\\.)?\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}\\b$|^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); | ||||||
| 	 | 	 | ||||||
| 	public static boolean isValidJid(String jid) { | 	public static boolean isValidJid(String jid) { | ||||||
| 		Matcher matcher = VALID_JID.matcher(jid); | 		Matcher matcher = VALID_JID.matcher(jid); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 kruks23
						kruks23