diff options
31 files changed, 85 insertions, 27 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index da73b4630..6954995d9 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -699,9 +699,9 @@ public class MucOptions { private MucOptions options; private ChatState chatState = Config.DEFAULT_CHATSTATE; - public User(MucOptions options, Jid from) { + public User(MucOptions options, Jid fullJid) { this.options = options; - this.fullJid = from; + this.fullJid = fullJid; } public String getName() { diff --git a/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java b/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java index 710a4fb8e..94d73fdac 100644 --- a/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java +++ b/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java @@ -111,7 +111,6 @@ public abstract class AbstractGenerator { public List<String> getFeatures(Account account) { ArrayList<String> features = new ArrayList<>(Arrays.asList(FEATURES)); - features.addAll(Arrays.asList(FEATURES)); if (mXmppConnectionService.confirmMessages()) { features.addAll(Arrays.asList(MESSAGE_CONFIRMATION_FEATURES)); } diff --git a/src/main/java/de/pixart/messenger/parser/IqParser.java b/src/main/java/de/pixart/messenger/parser/IqParser.java index fae27730d..24e8aad98 100644 --- a/src/main/java/de/pixart/messenger/parser/IqParser.java +++ b/src/main/java/de/pixart/messenger/parser/IqParser.java @@ -321,7 +321,7 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { account.getBlocklist().addAll(jids); if (packet.getType() == IqPacket.TYPE.SET) { boolean removed = false; - for(Jid jid : jids) { + for (Jid jid : jids) { removed |= mXmppConnectionService.removeBlockedConversations(account, jid); } if (removed) { @@ -359,7 +359,7 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { mXmppConnectionService.sendIqPacket(account, response, null); } else if (packet.hasChild("open", "http://jabber.org/protocol/ibb") || packet.hasChild("data", "http://jabber.org/protocol/ibb") - || packet.hasChild("close","http://jabber.org/protocol/ibb")) { + || packet.hasChild("close", "http://jabber.org/protocol/ibb")) { mXmppConnectionService.getJingleConnectionManager() .deliverIbbPacket(account, packet); } else if (packet.hasChild("query", "http://jabber.org/protocol/disco#info")) { diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 5efadd3ff..2703f0538 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -371,7 +371,7 @@ public class FileBackend { } public void copyFileToPrivateStorage(Message message, Uri uri, String type) throws FileCopyException { - String mime = type != null ? type : MimeUtils.guessMimeTypeFromUri(mXmppConnectionService, uri); + String mime = MimeUtils.guessMimeTypeFromUriAndMime(mXmppConnectionService, uri, type); Log.d(Config.LOGTAG, "copy " + uri.toString() + " to private storage (mime=" + mime + ")"); String extension = MimeUtils.guessExtensionFromMimeType(mime); if (extension == null) { diff --git a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java index d2f623c45..192d9221d 100644 --- a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java +++ b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java @@ -44,7 +44,7 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod this.mXmppConnectionService = xmppConnectionService; this.message = message; this.callback = callback; - final String mimeType = type != null ? type : MimeUtils.guessMimeTypeFromUri(mXmppConnectionService, uri); + final String mimeType = MimeUtils.guessMimeTypeFromUriAndMime(mXmppConnectionService, uri, type); final int autoAcceptFileSize = Config.FILE_SIZE; this.originalFileSize = FileBackend.getFileSize(mXmppConnectionService, uri); this.isVideoMessage = !getFileBackend().useFileAsIs(uri) diff --git a/src/main/java/de/pixart/messenger/services/MessageArchiveService.java b/src/main/java/de/pixart/messenger/services/MessageArchiveService.java index d9394d4dc..c9c0c0672 100644 --- a/src/main/java/de/pixart/messenger/services/MessageArchiveService.java +++ b/src/main/java/de/pixart/messenger/services/MessageArchiveService.java @@ -338,6 +338,7 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded { query.getConversation().setFirstMamReference(first == null ? null : first.getContent()); } if (complete || relevant == null || abort) { + //TODO: FIX done logic to look at complete. using count is probably unreliable because it can be ommited and doesn’t work with paging. boolean done; if (query.isCatchup()) { done = false; diff --git a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java index ca4c01183..e2021e7ea 100644 --- a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java @@ -12,6 +12,7 @@ import de.pixart.messenger.R; import de.pixart.messenger.entities.Account; import de.pixart.messenger.services.XmppConnectionService; import de.pixart.messenger.ui.widget.DisabledActionModeCallback; +import de.pixart.messenger.ui.widget.TextInputEditText; public class ChangePasswordActivity extends XmppActivity implements XmppConnectionService.OnAccountPasswordChanged { @@ -40,11 +41,11 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti } } }; - private EditText mCurrentPassword; - private EditText mNewPassword; - private Account mAccount; + private TextInputEditText mCurrentPassword; + private TextInputEditText mNewPassword; private TextInputLayout mNewPasswordLayout; - private TextInputLayout mCurrentPasswordLayout; + private TextInputLayout mCurrentPasswordLayout; + private Account mAccount; @Override void onBackendConnected() { diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index e5ad20447..cd0a6e4d6 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2034,7 +2034,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke if (scrollState != null) { outState.putParcelable(STATE_SCROLL_POSITION, scrollState); } - final ArrayList<Attachment> attachments = mediaPreviewAdapter.getAttachments(); + final ArrayList<Attachment> attachments = mediaPreviewAdapter == null ? new ArrayList<>() : mediaPreviewAdapter.getAttachments(); if (attachments.size() > 0) { outState.putParcelableArrayList(STATE_MEDIA_PREVIEWS, attachments); } diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index bb579b8f1..123591b03 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -139,6 +139,13 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat } return; } + if (inNeedOfSaslAccept()) { + mAccount.setKey(Account.PINNED_MECHANISM_KEY, String.valueOf(-1)); + if (!xmppConnectionService.updateAccount(mAccount)) { + Toast.makeText(EditAccountActivity.this, R.string.unable_to_update_account, Toast.LENGTH_SHORT).show(); + } + return; + } final boolean openRegistrationUrl = registerNewAccount && !accountInfoEdited && mAccount != null && mAccount.getStatus() == Account.State.REGISTRATION_WEB; final boolean openPaymentUrl = mAccount != null && mAccount.getStatus() == Account.State.PAYMENT_REQUIRED; final boolean redirectionWorthyStatus = openPaymentUrl || openRegistrationUrl; @@ -510,6 +517,8 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat URL url = connection != null && mAccount.getStatus() == Account.State.PAYMENT_REQUIRED ? connection.getRedirectionUrl() : null; if (url != null) { this.binding.saveButton.setText(R.string.open_website); + } else if (inNeedOfSaslAccept()) { + this.binding.saveButton.setText(R.string.accept); } else { this.binding.saveButton.setText(R.string.connect); } @@ -847,6 +856,10 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat return super.onOptionsItemSelected(item); } + private boolean inNeedOfSaslAccept() { + return mAccount != null && mAccount.getLastErrorStatus() == Account.State.DOWNGRADE_ATTACK && mAccount.getKeyAsInt(Account.PINNED_MECHANISM_KEY, -1) >= 0 && !accountInfoEdited(); + } + private void publishOpenPGPPublicKey(Account account) { if (EditAccountActivity.this.hasPgp()) { announcePgp(account, null, null, onOpenPGPKeyPublished); @@ -1171,7 +1184,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat } else { final TextInputLayout errorLayout; if (this.mAccount.errorStatus()) { - if (this.mAccount.getStatus() == Account.State.UNAUTHORIZED) { + if (this.mAccount.getStatus() == Account.State.UNAUTHORIZED || this.mAccount.getStatus() == Account.State.DOWNGRADE_ATTACK) { errorLayout = this.binding.accountPasswordLayout; } else if (mShowOptions && this.mAccount.getStatus() == Account.State.SERVER_NOT_FOUND diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java index 0472c6d11..8b8c05d05 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java @@ -78,6 +78,8 @@ public class MediaAdapter extends RecyclerView.Adapter<MediaAdapter.MediaViewHol attr = R.attr.media_preview_app; } else if (mime.equals("application/zip") || mime.equals("application/rar")) { attr = R.attr.media_preview_archive; + } else if (mime.equals("application/epub+zip") || mime.equals("application/vnd.amazon.mobi8-ebook")) { + attr = R.attr.media_preview_ebook; } else if (DOCUMENT_MIMES.contains(mime)) { attr = R.attr.media_preview_document; } else { diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java index ae4c42816..64cb63439 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java @@ -81,7 +81,11 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter<MediaPreviewAdapte } holder.binding.deleteButton.setOnClickListener(v -> { int pos = mediaPreviews.indexOf(attachment); - mediaPreviews.remove(pos); + try { + mediaPreviews.remove(pos); + } catch (Exception e) { + e.printStackTrace(); + } notifyItemRemoved(pos); conversationFragment.toggleInputMethod(); }); diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 95ccda7d2..fd9074771 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -237,9 +237,10 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie viewHolder.edit_indicator.setVisibility(View.GONE); } } + final Transferable transferable = message.getTransferable(); boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI && message.getMergedStatus() <= Message.STATUS_RECEIVED; - if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.getTransferable() != null) { + if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || transferable != null) { FileParams params = message.getFileParams(); if (params.size > (1 * 1024 * 1024)) { filesize = Math.round(params.size * 1f / (1024 * 1024)) + " MiB"; @@ -248,7 +249,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } else if (params.size > 0){ filesize = params.size + " B"; } - if (message.getTransferable() != null && message.getTransferable().getStatus() == Transferable.STATUS_FAILED) { + if (transferable != null && transferable.getStatus() == Transferable.STATUS_FAILED) { error = true; } } @@ -257,9 +258,8 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie info = getContext().getString(R.string.waiting); break; case Message.STATUS_UNSEND: - Transferable d = message.getTransferable(); - if (d != null) { - info = getContext().getString(R.string.sending_file, d.getProgress()); + if (transferable != null) { + info = getContext().getString(R.string.sending_file, transferable.getProgress()); } else { info = getContext().getString(R.string.sending); } diff --git a/src/main/java/de/pixart/messenger/ui/util/Attachment.java b/src/main/java/de/pixart/messenger/ui/util/Attachment.java index 96159c1bd..b63510209 100644 --- a/src/main/java/de/pixart/messenger/ui/util/Attachment.java +++ b/src/main/java/de/pixart/messenger/ui/util/Attachment.java @@ -115,13 +115,13 @@ public class Attachment implements Parcelable { for (int i = 0; i < clipData.getItemCount(); ++i) { final Uri uri = clipData.getItemAt(i).getUri(); Log.d(Config.LOGTAG, "uri=" + uri + " contentType=" + contentType); - final String mime = contentType != null ? contentType : MimeUtils.guessMimeTypeFromUri(context, uri); + final String mime = MimeUtils.guessMimeTypeFromUriAndMime(context, uri, contentType); Log.d(Config.LOGTAG, "mime=" + mime); uris.add(new Attachment(uri, type, mime)); } } } else { - final String mime = contentType != null ? contentType : MimeUtils.guessMimeTypeFromUri(context, data); + final String mime = MimeUtils.guessMimeTypeFromUriAndMime(context, data, contentType); uris.add(new Attachment(data, type, mime)); } return uris; diff --git a/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java b/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java index a95278723..18238ae60 100644 --- a/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java +++ b/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java @@ -5,6 +5,7 @@ import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.Signature; +import android.os.Build; import android.preference.PreferenceManager; import android.support.v7.app.AlertDialog; import android.util.Log; @@ -60,8 +61,11 @@ public class ExceptionHelper { final StringBuilder report = new StringBuilder(); PackageManager pm = activity.getPackageManager(); PackageInfo packageInfo; + String release = Build.VERSION.RELEASE; + int sdkVersion = Build.VERSION.SDK_INT; try { packageInfo = pm.getPackageInfo(activity.getPackageName(), PackageManager.GET_SIGNATURES); + report.append("Android SDK: ").append(sdkVersion).append(" (").append(release).append(")").append('\n'); report.append("Version: ").append(packageInfo.versionName).append('\n'); report.append("Last Update: ").append(DATE_FORMAT.format(new Date(packageInfo.lastUpdateTime))).append('\n'); Signature[] signatures = packageInfo.signatures; diff --git a/src/main/java/de/pixart/messenger/utils/MimeUtils.java b/src/main/java/de/pixart/messenger/utils/MimeUtils.java index e485dc88f..0babfdf9d 100644 --- a/src/main/java/de/pixart/messenger/utils/MimeUtils.java +++ b/src/main/java/de/pixart/messenger/utils/MimeUtils.java @@ -17,6 +17,7 @@ package de.pixart.messenger.utils; import android.content.Context; import android.net.Uri; +import android.util.Log; import java.io.File; import java.io.FileInputStream; @@ -27,6 +28,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; +import de.pixart.messenger.Config; import de.pixart.messenger.entities.Transferable; /** @@ -51,6 +53,7 @@ public final class MimeUtils { // by guessExtensionFromMimeType. add("application/andrew-inset", "ez"); add("application/dsptype", "tsp"); + add("application/epub+zip","epub"); add("application/hta", "hta"); add("application/mac-binhex40", "hqx"); add("application/mathematica", "nb"); @@ -66,6 +69,9 @@ public final class MimeUtils { add("application/rdf+xml", "rdf"); add("application/rss+xml", "rss"); add("application/zip", "zip"); + add("application/vnd.amazon.mobi8-ebook","azw3"); + add("application/vnd.amazon.mobi8-ebook","azw"); + add("application/vnd.amazon.mobi8-ebook","kfx"); add("application/vnd.android.package-archive", "apk"); add("application/vnd.cinderella", "cdy"); add("application/vnd.ms-pki.stl", "stl"); @@ -177,6 +183,7 @@ public final class MimeUtils { add("application/x-maker", "book"); add("application/x-maker", "fbdoc"); add("application/x-mif", "mif"); + add("application/x-mobipocket-ebook","mobi"); add("application/x-ms-wmd", "wmd"); add("application/x-ms-wmz", "wmz"); add("application/x-msi", "msi"); @@ -508,6 +515,19 @@ public final class MimeUtils { return mimeTypeToExtensionMap.get(mimeType.split(";")[0]); } + public static String guessMimeTypeFromUriAndMime(final Context context, final Uri uri, final String mime) { + Log.d(Config.LOGTAG, "guessMimeTypeFromUriAndMime " + uri + " and mime=" + mime); + if (mime == null || mime.equals("application/octet-stream")) { + final String guess = guessMimeTypeFromUri(context, uri); + if (guess != null) { + return guess; + } else { + return mime; + } + } + return guessMimeTypeFromUri(context, uri); + } + public static String guessMimeTypeFromUri(Context context, Uri uri) { // try the content resolver String mimeType; @@ -520,11 +540,14 @@ public final class MimeUtils { mimeType = null; } // try the extension - if (mimeType == null && uri.getPath() != null) { + if ((mimeType == null || mimeType.equals("application/octet-stream")) && uri.getPath() != null) { String path = uri.getPath(); int start = path.lastIndexOf('.') + 1; if (start < path.length()) { - mimeType = MimeUtils.guessMimeTypeFromExtension(path.substring(start)); + final String guess = MimeUtils.guessMimeTypeFromExtension(path.substring(start)); + if (guess != null) { + mimeType = guess; + } } } // sometimes this works (as with the commit content api) diff --git a/src/main/java/de/pixart/messenger/utils/UIHelper.java b/src/main/java/de/pixart/messenger/utils/UIHelper.java index 81eef7ac1..03af31e23 100644 --- a/src/main/java/de/pixart/messenger/utils/UIHelper.java +++ b/src/main/java/de/pixart/messenger/utils/UIHelper.java @@ -475,6 +475,8 @@ public class UIHelper { return context.getString(R.string.apk); } else if (mime.contains("vcard")) { return context.getString(R.string.vcard); + } else if (mime.equals("application/epub+zip") || mime.equals("application/vnd.amazon.mobi8-ebook")) { + return context.getString(R.string.ebook); } else { return mime; } diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index c92653444..f364a0155 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -617,10 +617,11 @@ public class XmppConnection implements Runnable { boolean accountUiNeedsRefresh = false; synchronized (NotificationService.CATCHUP_LOCK) { if (mWaitingForSmCatchup.compareAndSet(true, false)) { - int count = mSmCatchupMessageCounter.get(); - Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": SM catchup complete (" + count + ")"); + final int messageCount = mSmCatchupMessageCounter.get(); + final int pendingIQs = packetCallbacks.size(); + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": SM catchup complete (messages=" + messageCount + ", pending IQs=" + pendingIQs + ")"); accountUiNeedsRefresh = true; - if (count > 0) { + if (messageCount > 0) { mXmppConnectionService.getNotificationService().finishBacklog(true, account); } } @@ -1339,6 +1340,10 @@ public class XmppConnection implements Runnable { } else if (streamError.hasChild("host-unknown")) { throw new StateChangingException(Account.State.HOST_UNKNOWN); } else if (streamError.hasChild("policy-violation")) { + final String text = streamError.findChildContent("text"); + if (text != null) { + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": policy violation. " + text); + } throw new StateChangingException(Account.State.POLICY_VIOLATION); } else { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": stream error " + streamError.toString()); diff --git a/src/main/res/drawable-hdpi/ic_book_black_48dp.png b/src/main/res/drawable-hdpi/ic_book_black_48dp.png Binary files differnew file mode 100644 index 000000000..cb34dff1e --- /dev/null +++ b/src/main/res/drawable-hdpi/ic_book_black_48dp.png diff --git a/src/main/res/drawable-hdpi/ic_book_white_48dp.png b/src/main/res/drawable-hdpi/ic_book_white_48dp.png Binary files differnew file mode 100644 index 000000000..a01bde3e2 --- /dev/null +++ b/src/main/res/drawable-hdpi/ic_book_white_48dp.png diff --git a/src/main/res/drawable-mdpi/ic_book_black_48dp.png b/src/main/res/drawable-mdpi/ic_book_black_48dp.png Binary files differnew file mode 100644 index 000000000..1cdaa97a2 --- /dev/null +++ b/src/main/res/drawable-mdpi/ic_book_black_48dp.png diff --git a/src/main/res/drawable-mdpi/ic_book_white_48dp.png b/src/main/res/drawable-mdpi/ic_book_white_48dp.png Binary files differnew file mode 100644 index 000000000..0a1430a08 --- /dev/null +++ b/src/main/res/drawable-mdpi/ic_book_white_48dp.png diff --git a/src/main/res/drawable-xhdpi/ic_book_black_48dp.png b/src/main/res/drawable-xhdpi/ic_book_black_48dp.png Binary files differnew file mode 100644 index 000000000..2ef86b3d4 --- /dev/null +++ b/src/main/res/drawable-xhdpi/ic_book_black_48dp.png diff --git a/src/main/res/drawable-xhdpi/ic_book_white_48dp.png b/src/main/res/drawable-xhdpi/ic_book_white_48dp.png Binary files differnew file mode 100644 index 000000000..9cd630b85 --- /dev/null +++ b/src/main/res/drawable-xhdpi/ic_book_white_48dp.png diff --git a/src/main/res/drawable-xxhdpi/ic_book_black_48dp.png b/src/main/res/drawable-xxhdpi/ic_book_black_48dp.png Binary files differnew file mode 100644 index 000000000..4e72afbcd --- /dev/null +++ b/src/main/res/drawable-xxhdpi/ic_book_black_48dp.png diff --git a/src/main/res/drawable-xxhdpi/ic_book_white_48dp.png b/src/main/res/drawable-xxhdpi/ic_book_white_48dp.png Binary files differnew file mode 100644 index 000000000..0b3b484e1 --- /dev/null +++ b/src/main/res/drawable-xxhdpi/ic_book_white_48dp.png diff --git a/src/main/res/drawable-xxxhdpi/ic_book_black_48dp.png b/src/main/res/drawable-xxxhdpi/ic_book_black_48dp.png Binary files differnew file mode 100644 index 000000000..55e539982 --- /dev/null +++ b/src/main/res/drawable-xxxhdpi/ic_book_black_48dp.png diff --git a/src/main/res/drawable-xxxhdpi/ic_book_white_48dp.png b/src/main/res/drawable-xxxhdpi/ic_book_white_48dp.png Binary files differnew file mode 100644 index 000000000..6a74253ee --- /dev/null +++ b/src/main/res/drawable-xxxhdpi/ic_book_white_48dp.png diff --git a/src/main/res/layout/activity_change_password.xml b/src/main/res/layout/activity_change_password.xml index 7f79bffc8..c16bc07be 100644 --- a/src/main/res/layout/activity_change_password.xml +++ b/src/main/res/layout/activity_change_password.xml @@ -39,7 +39,7 @@ app:passwordToggleEnabled="true" app:passwordToggleTint="?android:textColorSecondary"> - <de.pixart.messenger.ui.widget.TextInputEditText.widget.TextInputEditText + <de.pixart.messenger.ui.widget.TextInputEditText android:id="@+id/current_password" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index 8c824c7a6..e3f355814 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -51,6 +51,7 @@ <attr name="media_preview_app" format="reference" /> <attr name="media_preview_calendar" format="reference" /> <attr name="media_preview_archive" format="reference" /> + <attr name="media_preview_ebook" format="reference" /> <attr name="media_preview_unknown" format="reference" /> <attr name="icon_add_group" format="reference" /> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 4be0790c8..1fcd8c745 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -849,4 +849,5 @@ <string name="start_orbot">Start Orbot</string> <string name="no_market_app_installed">No market app installed.</string> <string name="group_chat_will_make_your_jabber_id_public">This group chat will make your Jabber ID public</string> + <string name="ebook">e-book</string> </resources> diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index c10f8bffd..92e7cd49c 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -74,6 +74,7 @@ <item name="media_preview_app" type="reference">@drawable/ic_android_black_48dp</item> <item name="media_preview_calendar" type="reference">@drawable/ic_event_black_48dp</item> <item name="media_preview_archive" type="reference">@drawable/ic_archive_black_48dp</item> + <item name="media_preview_ebook" type="reference">@drawable/ic_book_black_48dp</item> <item name="media_preview_unknown" type="reference">@drawable/ic_help_black_48dp</item> <item name="icon_add_group" type="reference">@drawable/ic_group_add_white_24dp</item> @@ -249,6 +250,7 @@ <item name="media_preview_app" type="reference">@drawable/ic_android_white_48dp</item> <item name="media_preview_calendar" type="reference">@drawable/ic_event_white_48dp</item> <item name="media_preview_archive" type="reference">@drawable/ic_archive_white_48dp</item> + <item name="media_preview_ebook" type="reference">@drawable/ic_book_white_48dp</item> <item name="media_preview_unknown" type="reference">@drawable/ic_help_white_48dp</item> <item name="icon_add_group" type="reference">@drawable/ic_group_add_white_24dp</item> |