aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/Config.java2
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java5
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java11
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java30
4 files changed, 13 insertions, 35 deletions
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java
index fd8dc7be..91bc1431 100644
--- a/src/main/java/eu/siacs/conversations/Config.java
+++ b/src/main/java/eu/siacs/conversations/Config.java
@@ -96,8 +96,6 @@ public final class Config {
public static final boolean REPORT_WRONG_FILESIZE_IN_OTR_JINGLE = true;
- public static final boolean SHOW_REGENERATE_AXOLOTL_KEYS_BUTTON = false;
-
public static final boolean X509_VERIFICATION = false; //use x509 certificates to verify OMEMO keys
public static final boolean ONLY_INTERNAL_STORAGE = false; //use internal storage instead of sdcard to save attachments
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 5524241c..053cbde1 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -879,7 +879,10 @@ public class XmppConnectionService extends Service {
this.databaseBackend = DatabaseBackend.getInstance(getApplicationContext());
this.accounts = databaseBackend.getAccounts();
- if (!keepForegroundService() && databaseBackend.startTimeCountExceedsThreshold()) {
+ if (Config.FREQUENT_RESTARTS_THRESHOLD != 0
+ && Config.FREQUENT_RESTARTS_DETECTION_WINDOW != 0
+ && !keepForegroundService()
+ && databaseBackend.startTimeCountExceedsThreshold()) {
getPreferences().edit().putBoolean(SettingsActivity.KEEP_FOREGROUND_SERVICE,true).commit();
Log.d(Config.LOGTAG,"number of restarts exceeds threshold. enabling foreground service");
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
index 4db06b96..8bcbe998 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
@@ -2,10 +2,8 @@ package eu.siacs.conversations.ui;
import android.app.AlertDialog;
import android.app.PendingIntent;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
-import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.os.Bundle;
import android.view.ContextMenu;
@@ -44,6 +42,9 @@ import eu.siacs.conversations.xmpp.jid.Jid;
public class ConferenceDetailsActivity extends XmppActivity implements OnConversationUpdate, OnMucRosterUpdate, XmppConnectionService.OnAffiliationChanged, XmppConnectionService.OnRoleChanged, XmppConnectionService.OnConferenceOptionsPushed {
public static final String ACTION_VIEW_MUC = "view_muc";
+
+ private static final float INACTIVE_ALPHA = 0.4684f; //compromise between dark and light theme
+
private Conversation mConversation;
private OnClickListener inviteListener = new OnClickListener() {
@@ -621,6 +622,12 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
}
ImageView iv = (ImageView) view.findViewById(R.id.contact_photo);
iv.setImageBitmap(avatarService().get(user, getPixel(48), false));
+ if (user.getRole() == MucOptions.Role.NONE) {
+ tvDisplayName.setAlpha(INACTIVE_ALPHA);
+ tvKey.setAlpha(INACTIVE_ALPHA);
+ tvStatus.setAlpha(INACTIVE_ALPHA);
+ iv.setAlpha(INACTIVE_ALPHA);
+ }
membersView.addView(view);
if (mConversation.getMucOptions().canInvite()) {
mInviteButton.setVisibility(View.VISIBLE);
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index 3f6bd434..4a876d71 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -99,7 +99,6 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
private RelativeLayout mAxolotlFingerprintBox;
private ImageButton mOtrFingerprintToClipboardButton;
private ImageButton mAxolotlFingerprintToClipboardButton;
- private ImageButton mRegenerateAxolotlKeyButton;
private LinearLayout keys;
private LinearLayout keysCard;
private LinearLayout mNamePort;
@@ -510,7 +509,6 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.mAxolotlFingerprint = (TextView) findViewById(R.id.axolotl_fingerprint);
this.mAxolotlFingerprintBox = (RelativeLayout) findViewById(R.id.axolotl_fingerprint_box);
this.mAxolotlFingerprintToClipboardButton = (ImageButton) findViewById(R.id.action_copy_axolotl_to_clipboard);
- this.mRegenerateAxolotlKeyButton = (ImageButton) findViewById(R.id.action_regenerate_axolotl_key);
this.mOwnFingerprintDesc = (TextView) findViewById(R.id.own_fingerprint_desc);
this.keysCard = (LinearLayout) findViewById(R.id.other_device_keys_card);
this.keys = (LinearLayout) findViewById(R.id.other_device_keys);
@@ -939,18 +937,6 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
copyOmemoFingerprint(ownAxolotlFingerprint);
}
});
- if (Config.SHOW_REGENERATE_AXOLOTL_KEYS_BUTTON) {
- this.mRegenerateAxolotlKeyButton
- .setVisibility(View.VISIBLE);
- this.mRegenerateAxolotlKeyButton
- .setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(final View v) {
- showRegenerateAxolotlKeyDialog();
- }
- });
- }
} else {
this.mAxolotlFingerprintBox.setVisibility(View.GONE);
}
@@ -1038,22 +1024,6 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
}
}
- public void showRegenerateAxolotlKeyDialog() {
- Builder builder = new Builder(this);
- builder.setTitle("Regenerate Key");
- builder.setIconAttribute(android.R.attr.alertDialogIcon);
- builder.setMessage("Are you sure you want to regenerate your Identity Key? (This will also wipe all established sessions and contact Identity Keys)");
- builder.setNegativeButton(getString(R.string.cancel), null);
- builder.setPositiveButton("Yes",
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- mAccount.getAxolotlService().regenerateKeys(false);
- }
- });
- builder.create().show();
- }
-
public void showWipePepDialog() {
Builder builder = new Builder(this);
builder.setTitle(getString(R.string.clear_other_devices));