show correct end-to-end-encryption icons, closes #56
|
After Width: | Height: | Size: 369 B |
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 374 B |
|
After Width: | Height: | Size: 297 B |
|
After Width: | Height: | Size: 255 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 428 B |
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 598 B |
|
After Width: | Height: | Size: 441 B |
|
After Width: | Height: | Size: 604 B |
@@ -57,10 +57,10 @@
|
||||
tools:text="to SIM1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/footer_insecure_indicator"
|
||||
android:id="@+id/footer_secure_indicator"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="11dp"
|
||||
android:src="@drawable/ic_unlocked_white_18dp"
|
||||
android:src="@drawable/msg_encr_out"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:contentDescription="@string/conversation_item__secure_message_description"
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.b44t.messenger.DcMsg;
|
||||
import org.thoughtcrime.securesms.ApplicationContext;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord;
|
||||
import org.thoughtcrime.securesms.permissions.Permissions;
|
||||
import org.thoughtcrime.securesms.service.ExpiringMessageManager;
|
||||
import org.thoughtcrime.securesms.util.DateUtils;
|
||||
@@ -33,7 +32,7 @@ public class ConversationItemFooter extends LinearLayout {
|
||||
private TextView dateView;
|
||||
private TextView simView;
|
||||
private ExpirationTimerView timerView;
|
||||
private ImageView insecureIndicatorView;
|
||||
private ImageView secureIndicatorView;
|
||||
private DeliveryStatusView deliveryStatusView;
|
||||
|
||||
public ConversationItemFooter(Context context) {
|
||||
@@ -57,7 +56,7 @@ public class ConversationItemFooter extends LinearLayout {
|
||||
dateView = findViewById(R.id.footer_date);
|
||||
simView = findViewById(R.id.footer_sim_info);
|
||||
timerView = findViewById(R.id.footer_expiration_timer);
|
||||
insecureIndicatorView = findViewById(R.id.footer_insecure_indicator);
|
||||
secureIndicatorView = findViewById(R.id.footer_secure_indicator);
|
||||
deliveryStatusView = findViewById(R.id.footer_delivery_status);
|
||||
|
||||
if (attrs != null) {
|
||||
@@ -78,7 +77,7 @@ public class ConversationItemFooter extends LinearLayout {
|
||||
presentDate(messageRecord, locale);
|
||||
presentSimInfo(messageRecord);
|
||||
presentTimer(messageRecord);
|
||||
presentInsecureIndicator(messageRecord);
|
||||
presentSecureIndicator(messageRecord);
|
||||
presentDeliveryStatus(messageRecord);
|
||||
}
|
||||
|
||||
@@ -89,7 +88,7 @@ public class ConversationItemFooter extends LinearLayout {
|
||||
|
||||
public void setIconColor(int color) {
|
||||
timerView.setColorFilter(color);
|
||||
insecureIndicatorView.setColorFilter(color);
|
||||
secureIndicatorView.setColorFilter(color);
|
||||
deliveryStatusView.setTint(color);
|
||||
}
|
||||
|
||||
@@ -158,8 +157,8 @@ public class ConversationItemFooter extends LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
private void presentInsecureIndicator(@NonNull DcMsg messageRecord) {
|
||||
insecureIndicatorView.setVisibility(messageRecord.isSecure() ? View.GONE : View.VISIBLE);
|
||||
private void presentSecureIndicator(@NonNull DcMsg messageRecord) {
|
||||
secureIndicatorView.setVisibility(messageRecord.isSecure() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void presentDeliveryStatus(@NonNull DcMsg messageRecord) {
|
||||
|
||||
@@ -63,6 +63,7 @@ public class ApplicationDcContext extends DcContext {
|
||||
|
||||
File dbfile = new File(context.getFilesDir(), "messenger.db");
|
||||
open(dbfile.getAbsolutePath());
|
||||
setConfig("e2ee_enabled", "1");
|
||||
|
||||
try {
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
|
||||