kopia lustrzana https://github.com/ryukoposting/Signal-Android
Keep old device inactive after a successful transfer.
rodzic
31e3e37c9b
commit
45178b3eb3
|
@ -9,6 +9,8 @@ import android.os.Bundle;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.thoughtcrime.securesms.devicetransfer.olddevice.OldDeviceTransferLockedDialog;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.util.AppStartup;
|
||||
import org.thoughtcrime.securesms.util.CachedInflater;
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions;
|
||||
|
@ -70,6 +72,9 @@ public class MainActivity extends PassphraseRequiredActivity {
|
|||
protected void onResume() {
|
||||
super.onResume();
|
||||
dynamicTheme.onResume(this);
|
||||
if (SignalStore.misc().isOldDeviceTransferLocked()) {
|
||||
OldDeviceTransferLockedDialog.show(getSupportFragmentManager());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,6 +49,7 @@ public abstract class PassphraseRequiredActivity extends BaseActivity implements
|
|||
private static final int STATE_CREATE_PROFILE_NAME = 6;
|
||||
private static final int STATE_CREATE_SIGNAL_PIN = 7;
|
||||
private static final int STATE_TRANSFER_ONGOING = 8;
|
||||
private static final int STATE_TRANSFER_LOCKED = 9;
|
||||
|
||||
private SignalServiceNetworkAccess networkAccess;
|
||||
private BroadcastReceiver clearKeyReceiver;
|
||||
|
@ -151,6 +152,7 @@ public abstract class PassphraseRequiredActivity extends BaseActivity implements
|
|||
case STATE_CREATE_SIGNAL_PIN: return getCreateSignalPinIntent();
|
||||
case STATE_CREATE_PROFILE_NAME: return getCreateProfileNameIntent();
|
||||
case STATE_TRANSFER_ONGOING: return getOldDeviceTransferIntent();
|
||||
case STATE_TRANSFER_LOCKED: return getOldDeviceTransferLockedIntent();
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
@ -172,6 +174,8 @@ public abstract class PassphraseRequiredActivity extends BaseActivity implements
|
|||
return STATE_CREATE_SIGNAL_PIN;
|
||||
} else if (EventBus.getDefault().getStickyEvent(TransferStatus.class) != null && getClass() != OldDeviceTransferActivity.class) {
|
||||
return STATE_TRANSFER_ONGOING;
|
||||
} else if (SignalStore.misc().isOldDeviceTransferLocked()) {
|
||||
return STATE_TRANSFER_LOCKED;
|
||||
} else {
|
||||
return STATE_NORMAL;
|
||||
}
|
||||
|
@ -232,6 +236,13 @@ public abstract class PassphraseRequiredActivity extends BaseActivity implements
|
|||
return intent;
|
||||
}
|
||||
|
||||
private @Nullable Intent getOldDeviceTransferLockedIntent() {
|
||||
if (getClass() == MainActivity.class) {
|
||||
return null;
|
||||
}
|
||||
return MainActivity.clearTop(this);
|
||||
}
|
||||
|
||||
private Intent getRoutedIntent(Class<?> destination, @Nullable Intent nextIntent) {
|
||||
final Intent intent = new Intent(this, destination);
|
||||
if (nextIntent != null) intent.putExtra("next_intent", nextIntent);
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.signal.devicetransfer.DeviceToDeviceTransferService;
|
|||
import org.signal.devicetransfer.TransferStatus;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.devicetransfer.DeviceTransferFragment;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
|
||||
/**
|
||||
* Shows transfer progress on the old device. Most logic is in {@link DeviceTransferFragment}
|
||||
|
@ -54,6 +55,7 @@ public final class OldDeviceTransferFragment extends DeviceTransferFragment {
|
|||
ignoreTransferStatusEvents();
|
||||
EventBus.getDefault().removeStickyEvent(TransferStatus.class);
|
||||
DeviceToDeviceTransferService.stop(requireContext());
|
||||
SignalStore.misc().markOldDeviceTransferLocked();
|
||||
NavHostFragment.findNavController(OldDeviceTransferFragment.this).navigate(R.id.action_oldDeviceTransfer_to_oldDeviceTransferComplete);
|
||||
} else {
|
||||
status.setText(getString(R.string.DeviceTransfer__d_messages_so_far, event.getMessageCount()));
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
package org.thoughtcrime.securesms.devicetransfer.olddevice;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.net.DeviceTransferBlockingInterceptor;
|
||||
|
||||
/**
|
||||
* Blocking dialog shown on old devices after a successful transfer to prevent use unless
|
||||
* the user takes action to reactivate.
|
||||
*/
|
||||
public final class OldDeviceTransferLockedDialog extends DialogFragment {
|
||||
|
||||
private static final String TAG = Log.tag(OldDeviceTransferLockedDialog.class);
|
||||
private static final String FRAGMENT_TAG = "OldDeviceTransferLockedDialog";
|
||||
|
||||
public static void show(@NonNull FragmentManager fragmentManager) {
|
||||
if (fragmentManager.findFragmentByTag(FRAGMENT_TAG) != null) {
|
||||
Log.i(TAG, "Locked dialog already being shown");
|
||||
return;
|
||||
}
|
||||
|
||||
new OldDeviceTransferLockedDialog().show(fragmentManager, FRAGMENT_TAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setCancelable(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded);
|
||||
dialogBuilder.setView(R.layout.old_device_transfer_locked_dialog_fragment)
|
||||
.setPositiveButton(R.string.OldDeviceTransferLockedDialog__done, (d, w) -> OldDeviceExitActivity.exit(requireActivity()))
|
||||
.setNegativeButton(R.string.OldDeviceTransferLockedDialog__cancel_and_activate_this_device, (d, w) -> onUnlockRequest());
|
||||
|
||||
Dialog dialog = dialogBuilder.create();
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
private void onUnlockRequest() {
|
||||
SignalStore.misc().clearOldDeviceTransferLocked();
|
||||
DeviceTransferBlockingInterceptor.getInstance().unblockNetwork();
|
||||
}
|
||||
}
|
|
@ -92,7 +92,7 @@ public final class OldDeviceTransferSetupFragment extends DeviceTransferSetupFra
|
|||
switch (step) {
|
||||
case SETTING_UP:
|
||||
case WAITING:
|
||||
return R.string.OldDeviceTransferSetup__searching_for_your_new_android_device;
|
||||
return R.string.OldDeviceTransferSetup__searching_for_new_android_device;
|
||||
case ERROR:
|
||||
return R.string.OldDeviceTransferSetup__an_unexpected_error_occurred_while_attempting_to_connect_to_your_old_device;
|
||||
case TROUBLESHOOTING:
|
||||
|
|
|
@ -4,12 +4,13 @@ import androidx.annotation.NonNull;
|
|||
|
||||
public final class MiscellaneousValues extends SignalStoreValues {
|
||||
|
||||
private static final String LAST_PREKEY_REFRESH_TIME = "last_prekey_refresh_time";
|
||||
private static final String MESSAGE_REQUEST_ENABLE_TIME = "message_request_enable_time";
|
||||
private static final String LAST_PROFILE_REFRESH_TIME = "misc.last_profile_refresh_time";
|
||||
private static final String LAST_GV1_ROUTINE_MIGRATION_TIME = "misc.last_gv1_routine_migration_time";
|
||||
private static final String USERNAME_SHOW_REMINDER = "username.show.reminder";
|
||||
private static final String CLIENT_DEPRECATED = "misc.client_deprecated";
|
||||
private static final String LAST_PREKEY_REFRESH_TIME = "last_prekey_refresh_time";
|
||||
private static final String MESSAGE_REQUEST_ENABLE_TIME = "message_request_enable_time";
|
||||
private static final String LAST_PROFILE_REFRESH_TIME = "misc.last_profile_refresh_time";
|
||||
private static final String LAST_GV1_ROUTINE_MIGRATION_TIME = "misc.last_gv1_routine_migration_time";
|
||||
private static final String USERNAME_SHOW_REMINDER = "username.show.reminder";
|
||||
private static final String CLIENT_DEPRECATED = "misc.client_deprecated";
|
||||
private static final String OLD_DEVICE_TRANSFER_LOCKED = "misc.old_device.transfer.locked";
|
||||
|
||||
MiscellaneousValues(@NonNull KeyValueStore store) {
|
||||
super(store);
|
||||
|
@ -67,4 +68,16 @@ public final class MiscellaneousValues extends SignalStoreValues {
|
|||
public void clearClientDeprecated() {
|
||||
putBoolean(CLIENT_DEPRECATED, false);
|
||||
}
|
||||
|
||||
public boolean isOldDeviceTransferLocked() {
|
||||
return getBoolean(OLD_DEVICE_TRANSFER_LOCKED, false);
|
||||
}
|
||||
|
||||
public void markOldDeviceTransferLocked() {
|
||||
putBoolean(OLD_DEVICE_TRANSFER_LOCKED, true);
|
||||
}
|
||||
|
||||
public void clearOldDeviceTransferLocked() {
|
||||
putBoolean(OLD_DEVICE_TRANSFER_LOCKED, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import androidx.annotation.NonNull;
|
|||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -21,12 +22,16 @@ public final class DeviceTransferBlockingInterceptor implements Interceptor {
|
|||
|
||||
private static final DeviceTransferBlockingInterceptor INSTANCE = new DeviceTransferBlockingInterceptor();
|
||||
|
||||
private volatile boolean blockNetworking = false;
|
||||
private volatile boolean blockNetworking;
|
||||
|
||||
public static DeviceTransferBlockingInterceptor getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public DeviceTransferBlockingInterceptor() {
|
||||
this.blockNetworking = SignalStore.misc().isOldDeviceTransferLocked();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Response intercept(@NonNull Chain chain) throws IOException {
|
||||
if (!blockNetworking) {
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="328dp"
|
||||
android:height="230dp"
|
||||
android:viewportWidth="328"
|
||||
android:viewportHeight="230"
|
||||
tools:ignore="VectorRaster">
|
||||
<path
|
||||
android:fillAlpha="0.1"
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M164,115.39m-92.87,0a92.87,92.87 0,1 1,185.74 0a92.87,92.87 0,1 1,-185.74 0"
|
||||
android:strokeAlpha="0.1" />
|
||||
<path
|
||||
android:fillColor="#848484"
|
||||
android:pathData="M95.73,61.58l-55.65,-0.21A14.58,14.58 0,0 0,25.53 75.92l-0.21,139.33a14.58,14.58 0,0 0,14.55 14.54l55.65,0.21a14.57,14.57 0,0 0,14.54 -14.54l0.21,-139.33A14.57,14.57 0,0 0,95.73 61.58ZM103.1,215.46a7.91,7.91 0,0 1,-7.8 7.79L39.66,223a7.91,7.91 0,0 1,-7.8 -7.79l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.8l55.65,0.21a7.91,7.91 0,0 1,7.79 7.8Z" />
|
||||
<path
|
||||
android:fillColor="#121212"
|
||||
android:pathData="M103.1,215.46a7.91,7.91 0,0 1,-7.8 7.79L39.66,223a7.91,7.91 0,0 1,-7.8 -7.79l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.8l55.65,0.21a7.91,7.91 0,0 1,7.79 7.8Z" />
|
||||
<path
|
||||
android:fillColor="#848484"
|
||||
android:pathData="M287.92,0.21 L232.27,0a14.57,14.57 0,0 0,-14.54 14.54l-0.21,139.33a14.57,14.57 0,0 0,14.54 14.55l55.65,0.21a14.57,14.57 0,0 0,14.54 -14.55l0.22,-139.33A14.58,14.58 0,0 0,287.92 0.21ZM295.3,154.08a7.92,7.92 0,0 1,-7.8 7.8l-55.65,-0.21a7.92,7.92 0,0 1,-7.8 -7.8l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.79L287.71,7a7.91,7.91 0,0 1,7.8 7.79Z" />
|
||||
<path
|
||||
android:fillColor="#121212"
|
||||
android:pathData="M295.3,154.08a7.92,7.92 0,0 1,-7.8 7.8l-55.65,-0.21a7.92,7.92 0,0 1,-7.8 -7.8l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.79L287.71,7a7.91,7.91 0,0 1,7.8 7.79Z" />
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:pathData="M239.61,21.01L282.52,21.01A1.73,1.73 0,0 1,284.25 22.74L284.25,22.74A1.73,1.73 0,0 1,282.52 24.47L239.61,24.47A1.73,1.73 0,0 1,237.88 22.74L237.88,22.74A1.73,1.73 0,0 1,239.61 21.01z" />
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:pathData="M249.08,28.95L273.05,28.95A1.73,1.73 0,0 1,274.78 30.68L274.78,30.68A1.73,1.73 0,0 1,273.05 32.41L249.08,32.41A1.73,1.73 0,0 1,247.35 30.68L247.35,30.68A1.73,1.73 0,0 1,249.08 28.95z" />
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:pathData="M233.81,51.71L285.75,51.71A3.01,3.01 0,0 1,288.76 54.72L288.76,57.5A3.01,3.01 0,0 1,285.75 60.51L233.81,60.51A3.01,3.01 0,0 1,230.8 57.5L230.8,54.72A3.01,3.01 0,0 1,233.81 51.71z" />
|
||||
<path
|
||||
android:fillColor="#3a76f0"
|
||||
android:pathData="M233.81,138.97L285.75,138.97A3.01,3.01 0,0 1,288.76 141.98L288.76,146.49A3.01,3.01 0,0 1,285.75 149.5L233.81,149.5A3.01,3.01 0,0 1,230.8 146.49L230.8,141.98A3.01,3.01 0,0 1,233.81 138.97z" />
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:pathData="M233.81,64.38L242.6,64.38A3.01,3.01 0,0 1,245.61 67.39L245.61,70.17A3.01,3.01 0,0 1,242.6 73.18L233.81,73.18A3.01,3.01 0,0 1,230.8 70.17L230.8,67.39A3.01,3.01 0,0 1,233.81 64.38z" />
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:pathData="M252.7,64.38L285.76,64.38A3.01,3.01 0,0 1,288.77 67.39L288.77,70.17A3.01,3.01 0,0 1,285.76 73.18L252.7,73.18A3.01,3.01 0,0 1,249.69 70.17L249.69,67.39A3.01,3.01 0,0 1,252.7 64.38z" />
|
||||
<path
|
||||
android:fillColor="#ffd624"
|
||||
android:pathData="M305.63,97.55l2.21,6a0.59,0.59 0,0 0,0.54 0.37,0.58 0.58,0 0,0 0.54,-0.37l2.22,-6a17.68,17.68 0,0 1,10.48 -10.48l6,-2.22a0.57,0.57 0,0 0,0.38 -0.54,0.58 0.58,0 0,0 -0.38,-0.54l-6,-2.21a17.67,17.67 0,0 1,-10.48 -10.49l-2.22,-6a0.57,0.57 0,0 0,-0.54 -0.38,0.58 0.58,0 0,0 -0.54,0.38l-2.21,6a17.68,17.68 0,0 1,-10.49 10.49l-6,2.21a0.58,0.58 0,0 0,-0.38 0.54,0.57 0.57,0 0,0 0.38,0.54l6,2.22A17.69,17.69 0,0 1,305.63 97.55Z" />
|
||||
<path
|
||||
android:fillColor="#ffd624"
|
||||
android:pathData="M236.7,182.39l1.21,3.29a0.3,0.3 0,0 0,0.29 0.2,0.32 0.32,0 0,0 0.3,-0.2l1.21,-3.29a9.69,9.69 0,0 1,5.74 -5.74l3.28,-1.21a0.3,0.3 0,0 0,0.21 -0.29,0.32 0.32,0 0,0 -0.21,-0.3l-3.28,-1.21a9.69,9.69 0,0 1,-5.74 -5.74l-1.21,-3.28a0.31,0.31 0,0 0,-0.3 -0.21,0.3 0.3,0 0,0 -0.29,0.21l-1.21,3.28a9.69,9.69 0,0 1,-5.74 5.74l-3.29,1.21a0.33,0.33 0,0 0,-0.2 0.3,0.3 0.3,0 0,0 0.2,0.29l3.29,1.21A9.69,9.69 0,0 1,236.7 182.39Z" />
|
||||
<path
|
||||
android:fillColor="#ffd624"
|
||||
android:pathData="M209.86,50.64l1.8,4.86a0.45,0.45 0,0 0,0.43 0.3,0.47 0.47,0 0,0 0.44,-0.3l1.79,-4.86a14.33,14.33 0,0 1,8.48 -8.48l4.85,-1.79a0.46,0.46 0,0 0,0 -0.87l-4.85,-1.79a14.33,14.33 0,0 1,-8.48 -8.48l-1.79,-4.86a0.47,0.47 0,0 0,-0.44 -0.3,0.45 0.45,0 0,0 -0.43,0.3l-1.8,4.86a14.31,14.31 0,0 1,-8.47 8.48l-4.86,1.79a0.47,0.47 0,0 0,0 0.87l4.86,1.79A14.31,14.31 0,0 1,209.86 50.64Z" />
|
||||
<path
|
||||
android:fillColor="#3a76f0"
|
||||
android:pathData="M139.38,138.19a36.64,36.64 0,0 1,27.16 -13.51v11.94c0,1.65 1,2 2.13,0.88l21.9,-21.9a1.46,1.46 0,0 0,0.27 -0.41,1.27 1.27,0 0,0 0.09,-0.47 1.28,1.28 0,0 0,-0.09 -0.48,1.41 1.41,0 0,0 -0.27,-0.4l-21.9,-21.9c-1.17,-1.17 -2.13,-0.78 -2.13,0.88v11.93c-18.09,2.33 -26.95,15.07 -29.4,32.53C136.78,139.87 137.76,140.24 139.38,138.19Z" />
|
||||
</vector>
|
|
@ -0,0 +1,55 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="328dp"
|
||||
android:height="230dp"
|
||||
android:viewportWidth="328"
|
||||
android:viewportHeight="230"
|
||||
tools:ignore="VectorRaster">
|
||||
<path
|
||||
android:fillAlpha="0.05"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M164,115.39m-92.87,0a92.87,92.87 0,1 1,185.74 0a92.87,92.87 0,1 1,-185.74 0"
|
||||
android:strokeAlpha="0.05" />
|
||||
<path
|
||||
android:fillColor="#c6c6c6"
|
||||
android:pathData="M95.73,61.58l-55.65,-0.21A14.58,14.58 0,0 0,25.53 75.92l-0.21,139.33a14.58,14.58 0,0 0,14.55 14.54l55.65,0.21a14.57,14.57 0,0 0,14.54 -14.54l0.21,-139.33A14.57,14.57 0,0 0,95.73 61.58ZM103.1,215.46a7.91,7.91 0,0 1,-7.8 7.79L39.66,223a7.91,7.91 0,0 1,-7.8 -7.79l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.8l55.65,0.21a7.91,7.91 0,0 1,7.79 7.8Z" />
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M103.1,215.46a7.91,7.91 0,0 1,-7.8 7.79L39.66,223a7.91,7.91 0,0 1,-7.8 -7.79l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.8l55.65,0.21a7.91,7.91 0,0 1,7.79 7.8Z" />
|
||||
<path
|
||||
android:fillColor="#c6c6c6"
|
||||
android:pathData="M287.92,0.21 L232.27,0a14.57,14.57 0,0 0,-14.54 14.54l-0.21,139.33a14.57,14.57 0,0 0,14.54 14.55l55.65,0.21a14.57,14.57 0,0 0,14.54 -14.55l0.22,-139.33A14.58,14.58 0,0 0,287.92 0.21ZM295.3,154.08a7.92,7.92 0,0 1,-7.8 7.8l-55.65,-0.21a7.92,7.92 0,0 1,-7.8 -7.8l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.79L287.71,7a7.91,7.91 0,0 1,7.8 7.79Z" />
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M295.3,154.08a7.92,7.92 0,0 1,-7.8 7.8l-55.65,-0.21a7.92,7.92 0,0 1,-7.8 -7.8l0.21,-139.33a7.92,7.92 0,0 1,7.8 -7.79L287.71,7a7.91,7.91 0,0 1,7.8 7.79Z" />
|
||||
<path
|
||||
android:fillColor="#dbdbdb"
|
||||
android:pathData="M239.61,21.01L282.52,21.01A1.73,1.73 0,0 1,284.25 22.74L284.25,22.74A1.73,1.73 0,0 1,282.52 24.47L239.61,24.47A1.73,1.73 0,0 1,237.88 22.74L237.88,22.74A1.73,1.73 0,0 1,239.61 21.01z" />
|
||||
<path
|
||||
android:fillColor="#dbdbdb"
|
||||
android:pathData="M249.08,28.95L273.05,28.95A1.73,1.73 0,0 1,274.78 30.68L274.78,30.68A1.73,1.73 0,0 1,273.05 32.41L249.08,32.41A1.73,1.73 0,0 1,247.35 30.68L247.35,30.68A1.73,1.73 0,0 1,249.08 28.95z" />
|
||||
<path
|
||||
android:fillColor="#dbdbdb"
|
||||
android:pathData="M233.81,51.71L285.75,51.71A3.01,3.01 0,0 1,288.76 54.72L288.76,57.5A3.01,3.01 0,0 1,285.75 60.51L233.81,60.51A3.01,3.01 0,0 1,230.8 57.5L230.8,54.72A3.01,3.01 0,0 1,233.81 51.71z" />
|
||||
<path
|
||||
android:fillColor="#3a76f0"
|
||||
android:pathData="M233.81,138.97L285.75,138.97A3.01,3.01 0,0 1,288.76 141.98L288.76,146.49A3.01,3.01 0,0 1,285.75 149.5L233.81,149.5A3.01,3.01 0,0 1,230.8 146.49L230.8,141.98A3.01,3.01 0,0 1,233.81 138.97z" />
|
||||
<path
|
||||
android:fillColor="#dbdbdb"
|
||||
android:pathData="M233.81,64.38L242.6,64.38A3.01,3.01 0,0 1,245.61 67.39L245.61,70.17A3.01,3.01 0,0 1,242.6 73.18L233.81,73.18A3.01,3.01 0,0 1,230.8 70.17L230.8,67.39A3.01,3.01 0,0 1,233.81 64.38z" />
|
||||
<path
|
||||
android:fillColor="#dbdbdb"
|
||||
android:pathData="M252.7,64.38L285.76,64.38A3.01,3.01 0,0 1,288.77 67.39L288.77,70.17A3.01,3.01 0,0 1,285.76 73.18L252.7,73.18A3.01,3.01 0,0 1,249.69 70.17L249.69,67.39A3.01,3.01 0,0 1,252.7 64.38z" />
|
||||
<path
|
||||
android:fillColor="#ffd624"
|
||||
android:pathData="M305.63,97.55l2.21,6a0.59,0.59 0,0 0,0.54 0.37,0.58 0.58,0 0,0 0.54,-0.37l2.22,-6a17.68,17.68 0,0 1,10.48 -10.48l6,-2.22a0.57,0.57 0,0 0,0.38 -0.54,0.58 0.58,0 0,0 -0.38,-0.54l-6,-2.21a17.67,17.67 0,0 1,-10.48 -10.49l-2.22,-6a0.57,0.57 0,0 0,-0.54 -0.38,0.58 0.58,0 0,0 -0.54,0.38l-2.21,6a17.68,17.68 0,0 1,-10.49 10.49l-6,2.21a0.58,0.58 0,0 0,-0.38 0.54,0.57 0.57,0 0,0 0.38,0.54l6,2.22A17.69,17.69 0,0 1,305.63 97.55Z" />
|
||||
<path
|
||||
android:fillColor="#ffd624"
|
||||
android:pathData="M236.7,182.39l1.21,3.29a0.3,0.3 0,0 0,0.29 0.2,0.32 0.32,0 0,0 0.3,-0.2l1.21,-3.29a9.69,9.69 0,0 1,5.74 -5.74l3.28,-1.21a0.3,0.3 0,0 0,0.21 -0.29,0.32 0.32,0 0,0 -0.21,-0.3l-3.28,-1.21a9.69,9.69 0,0 1,-5.74 -5.74l-1.21,-3.28a0.31,0.31 0,0 0,-0.3 -0.21,0.3 0.3,0 0,0 -0.29,0.21l-1.21,3.28a9.69,9.69 0,0 1,-5.74 5.74l-3.29,1.21a0.33,0.33 0,0 0,-0.2 0.3,0.3 0.3,0 0,0 0.2,0.29l3.29,1.21A9.69,9.69 0,0 1,236.7 182.39Z" />
|
||||
<path
|
||||
android:fillColor="#ffd624"
|
||||
android:pathData="M209.86,50.64l1.8,4.86a0.45,0.45 0,0 0,0.43 0.3,0.47 0.47,0 0,0 0.44,-0.3l1.79,-4.86a14.33,14.33 0,0 1,8.48 -8.48l4.85,-1.79a0.46,0.46 0,0 0,0 -0.87l-4.85,-1.79a14.33,14.33 0,0 1,-8.48 -8.48l-1.79,-4.86a0.47,0.47 0,0 0,-0.44 -0.3,0.45 0.45,0 0,0 -0.43,0.3l-1.8,4.86a14.31,14.31 0,0 1,-8.47 8.48l-4.86,1.79a0.47,0.47 0,0 0,0 0.87l4.86,1.79A14.31,14.31 0,0 1,209.86 50.64Z" />
|
||||
<path
|
||||
android:fillColor="#3a76f0"
|
||||
android:pathData="M139.38,138.19a36.64,36.64 0,0 1,27.16 -13.51v11.94c0,1.65 1,2 2.13,0.88l21.9,-21.9a1.46,1.46 0,0 0,0.27 -0.41,1.27 1.27,0 0,0 0.09,-0.47 1.28,1.28 0,0 0,-0.09 -0.48,1.41 1.41,0 0,0 -0.27,-0.4l-21.9,-21.9c-1.17,-1.17 -2.13,-0.78 -2.13,0.88v11.93c-18.09,2.33 -26.95,15.07 -29.4,32.53C136.78,139.87 137.76,140.24 139.38,138.19Z" />
|
||||
</vector>
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/group_link_enable_and_share_title"
|
||||
style="@style/TextAppearance.Signal.Title2"
|
||||
style="@style/TextAppearance.Signal.Title2.Bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/GroupJoinUpdateRequiredBottomSheetDialogFragment_update_signal_to_use_group_links"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2.Bold"
|
||||
android:textColor="@color/signal_text_primary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/GroupsLearnMore_legacy_vs_new_groups"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2.Bold"
|
||||
android:textColor="@color/signal_text_primary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/lbs_paragraph_1_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2.Bold"
|
||||
android:text="@string/InviteActivity_friends_dont_let_friends_text_unencrypted"
|
||||
android:textColor="@color/signal_text_primary"
|
||||
android:gravity="center_horizontal"
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingTop="64dp"
|
||||
android:paddingTop="@dimen/transfer_top_padding"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingBottom="64dp">
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/old_device_transfer_complete_fragment_title"
|
||||
|
@ -17,50 +16,38 @@
|
|||
android:gravity="center"
|
||||
android:text="@string/OldDeviceTransferComplete__go_to_your_new_device"
|
||||
android:textAppearance="@style/Signal.Text.Headline.Registration"
|
||||
app:layout_constraintBottom_toTopOf="@+id/old_device_trasnfer_complete_fragment_subtitle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/old_device_trasnfer_complete_fragment_subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/transfer_item_spacing"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="top|center"
|
||||
android:gravity="center"
|
||||
android:text="@string/OldDeviceTransferComplete__your_signal_data_has_Been_transferred_to_your_new_device"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Body1"
|
||||
app:autoSizeMaxTextSize="16sp"
|
||||
app:autoSizeMinTextSize="12sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toTopOf="@+id/old_device_trasnfer_complete_fragment_success"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/old_device_transfer_complete_fragment_title" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SquareImageView
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/old_device_trasnfer_complete_fragment_success"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/circle_tintable"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_check_white_48dp"
|
||||
app:backgroundTint="@color/core_green"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/old_device_transfer_complete_fragment_close"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/old_device_trasnfer_complete_fragment_subtitle"
|
||||
app:srcCompat="@drawable/ic_complete_reg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/transfer_item_spacing"
|
||||
android:text="@string/OldDeviceTransferComplete__transfer_complete"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Body1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/old_device_trasnfer_complete_fragment_success"
|
||||
app:layout_constraintStart_toStartOf="@+id/old_device_trasnfer_complete_fragment_success"
|
||||
app:layout_constraintTop_toBottomOf="@+id/old_device_trasnfer_complete_fragment_success" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/old_device_transfer_complete_fragment_close"
|
||||
|
@ -71,6 +58,7 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/old_device_trasnfer_complete_fragment_success"
|
||||
app:strokeWidth="0dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="?attr/dialogPreferredPadding">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="180dp"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_complete_reg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/OldDeviceTransferLockedDialog__complete_registration_on_your_new_device"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Title2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/OldDeviceTransferLockedDialog__your_signal_account_has_been_transferred_to_your_new_device"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Body1" />
|
||||
|
||||
</LinearLayout>
|
|
@ -36,7 +36,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
style="@style/TextAppearance.Signal.Title2"
|
||||
style="@style/TextAppearance.Signal.Title2.Bold"
|
||||
android:text="@string/Megaphones_get_started"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.Signal.Title2"
|
||||
style="@style/TextAppearance.Signal.Title2.Bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
|
|
@ -86,6 +86,24 @@
|
|||
<item name="colorControlNormal">@color/core_grey_50</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.Widget.Button.Dialog" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
|
||||
<item name="android:textAppearance">@style/Signal.TextAppearance.Button.Dialog</item>
|
||||
<item name="android:textColor">@color/signal_button_secondary_text_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.TextAppearance.Button.Dialog" parent="TextAppearance.MaterialComponents.Button">
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.ShapeOverlay.Rounded" parent="ShapeAppearance.MaterialComponents.MediumComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.MaterialAlertDialog" parent="MaterialAlertDialog.MaterialComponents">
|
||||
<item name="shapeAppearance">@style/Signal.ShapeOverlay.Rounded</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.DayNight.Popup" parent="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="Signal.DayNight.Toolbar.Overflow" parent="@style/Signal.Toolbar.Overflow.Light" />
|
||||
|
@ -95,4 +113,13 @@
|
|||
<style name="Signal.DayNight.Dialog.FullScreen" parent="Signal.DayNight">
|
||||
<item name="android:windowAnimationStyle">@style/TextSecure.Animation.FullScreenDialog</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.ThemeOverlay.Dialog.Rounded" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
|
||||
<item name="alertDialogStyle">@style/Signal.MaterialAlertDialog</item>
|
||||
<item name="android:background">@color/signal_background_dialog</item>
|
||||
<item name="android:textColorPrimary">@color/signal_text_primary_dialog</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
<item name="buttonBarNeutralButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -2787,7 +2787,7 @@
|
|||
<string name="NewDeviceTransferSetup__an_unexpected_error_occurred_while_attempting_to_connect_to_your_old_device">An unexpected error occurred while attempting to connect to your old Android device.</string>
|
||||
|
||||
<!-- OldDeviceTransferSetupFragment -->
|
||||
<string name="OldDeviceTransferSetup__searching_for_your_new_android_device">Searching for your new Android device…</string>
|
||||
<string name="OldDeviceTransferSetup__searching_for_new_android_device">Searching for new Android device…</string>
|
||||
<string name="OldDeviceTransferSetup__signal_needs_the_location_permission_to_discover_and_connect_with_your_new_device">Signal needs the location permission to discover and connect to your new Android device.</string>
|
||||
<string name="OldDeviceTransferSetup__signal_needs_location_services_enabled_to_discover_and_connect_with_your_new_device">Signal needs location services enabled to discover and connect with your new Android device.</string>
|
||||
<string name="OldDeviceTransferSetup__signal_needs_wifi_on_to_discover_and_connect_with_your_new_device">Signal needs Wi-Fi on to discover and connect with your new Android device. Wi-Fi needs to be on but it does not have to be connected to a Wi-Fi network.</string>
|
||||
|
@ -2874,6 +2874,12 @@
|
|||
<string name="DeviceToDeviceTransferService_status_verification_required">Verification required</string>
|
||||
<string name="DeviceToDeviceTransferService_status_service_connected">Transferring account…</string>
|
||||
|
||||
<!-- OldDeviceTransferLockedDialog -->
|
||||
<string name="OldDeviceTransferLockedDialog__complete_registration_on_your_new_device">Complete registration on your new device</string>
|
||||
<string name="OldDeviceTransferLockedDialog__your_signal_account_has_been_transferred_to_your_new_device">Your Signal account has been transferred to your new device, but you must complete registration on it to continue. Signal will be inactive on this device.</string>
|
||||
<string name="OldDeviceTransferLockedDialog__done">Done</string>
|
||||
<string name="OldDeviceTransferLockedDialog__cancel_and_activate_this_device">Cancel and activate this device</string>
|
||||
|
||||
<!-- RecipientBottomSheet -->
|
||||
<string name="RecipientBottomSheet_block">Block</string>
|
||||
<string name="RecipientBottomSheet_unblock">Unblock</string>
|
||||
|
|
|
@ -63,7 +63,9 @@
|
|||
<item name="android:color">@color/signal_text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Signal.Title2" parent="@style/TextAppearance.AppCompat.Title">
|
||||
<style name="TextAppearance.Signal.Title2" parent="@style/TextAppearance.AppCompat.Title" />
|
||||
|
||||
<style name="TextAppearance.Signal.Title2.Bold">
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue