mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:53:40 +00:00
parent
2e253fb6a8
commit
57c17e705f
@ -240,20 +240,21 @@
|
|||||||
<string name="PassphraseChangeActivity_incorrect_old_passphrase_exclamation">Incorrect old passphrase!</string>
|
<string name="PassphraseChangeActivity_incorrect_old_passphrase_exclamation">Incorrect old passphrase!</string>
|
||||||
|
|
||||||
<!-- DeviceProvisioningActivity -->
|
<!-- DeviceProvisioningActivity -->
|
||||||
<string name="DeviceProvisioning_cancel">CANCEL</string>
|
<string name="DeviceProvisioningActivity_link_this_device">Link this device?</string>
|
||||||
<string name="DeviceProvisioning_continue">CONTINUE</string>
|
<string name="DeviceProvisioningActivity_cancel">CANCEL</string>
|
||||||
<string name="DeviceProvisioning_title">Link this device?</string>
|
<string name="DeviceProvisioningActivity_continue">CONTINUE</string>
|
||||||
<string name="DeviceProvisioning_content_intro">It will be able to</string>
|
<string name="DeviceProvisioningActivity_title">Link this device?</string>
|
||||||
<string name="DeviceProvisioning_content_bullets">
|
<string name="DeviceProvisioningActivity_content_intro">It will be able to</string>
|
||||||
|
<string name="DeviceProvisioningActivity_content_bullets">
|
||||||
- Read all your messages
|
- Read all your messages
|
||||||
\n- Send messages in your name
|
\n- Send messages in your name
|
||||||
</string>
|
</string>
|
||||||
<string name="DeviceProvisioning_content_progress_title">Adding device...</string>
|
<string name="DeviceProvisioningActivity_content_progress_title">Adding device...</string>
|
||||||
<string name="DeviceProvisioning_content_progress_content">Adding new device...</string>
|
<string name="DeviceProvisioningActivity_content_progress_content">Adding new device...</string>
|
||||||
<string name="DeviceProvisioning_content_progress_success">Device added!</string>
|
<string name="DeviceProvisioningActivity_content_progress_success">Device added!</string>
|
||||||
<string name="DeviceProvisioning_content_progress_no_device">No device found.</string>
|
<string name="DeviceProvisioningActivity_content_progress_no_device">No device found.</string>
|
||||||
<string name="DeviceProvisioning_content_progress_network_error">Network error.</string>
|
<string name="DeviceProvisioningActivity_content_progress_network_error">Network error.</string>
|
||||||
<string name="DeviceProvisioning_content_progress_key_error">Invalid QR code.</string>
|
<string name="DeviceProvisioningActivity_content_progress_key_error">Invalid QR code.</string>
|
||||||
|
|
||||||
<!-- PassphrasePromptActivity -->
|
<!-- PassphrasePromptActivity -->
|
||||||
<string name="PassphrasePromptActivity_enter_passphrase">Enter passphrase</string>
|
<string name="PassphrasePromptActivity_enter_passphrase">Enter passphrase</string>
|
||||||
|
@ -47,15 +47,15 @@ public class DeviceProvisioningActivity extends PassphraseRequiredActionBarActiv
|
|||||||
initializeResources();
|
initializeResources();
|
||||||
|
|
||||||
SpannableStringBuilder content = new SpannableStringBuilder();
|
SpannableStringBuilder content = new SpannableStringBuilder();
|
||||||
content.append(getString(R.string.DeviceProvisioning_content_intro))
|
content.append(getString(R.string.DeviceProvisioningActivity_content_intro))
|
||||||
.append("\n")
|
.append("\n")
|
||||||
.append(small(getString(R.string.DeviceProvisioning_content_bullets)));
|
.append(small(getString(R.string.DeviceProvisioningActivity_content_bullets)));
|
||||||
|
|
||||||
new Builder(this).title("Link this device?")
|
new Builder(this).title(getString(R.string.DeviceProvisioningActivity_link_this_device))
|
||||||
.iconRes(R.drawable.icon_dialog)
|
.iconRes(R.drawable.icon_dialog)
|
||||||
.content(content)
|
.content(content)
|
||||||
.positiveText(R.string.DeviceProvisioning_continue)
|
.positiveText(R.string.DeviceProvisioningActivity_continue)
|
||||||
.negativeText(R.string.DeviceProvisioning_cancel)
|
.negativeText(R.string.DeviceProvisioningActivity_cancel)
|
||||||
.positiveColorRes(R.color.textsecure_primary)
|
.positiveColorRes(R.color.textsecure_primary)
|
||||||
.negativeColorRes(R.color.gray50)
|
.negativeColorRes(R.color.gray50)
|
||||||
.autoDismiss(false)
|
.autoDismiss(false)
|
||||||
@ -91,8 +91,8 @@ public class DeviceProvisioningActivity extends PassphraseRequiredActionBarActiv
|
|||||||
|
|
||||||
private void handleProvisioning(final MaterialDialog dialog) {
|
private void handleProvisioning(final MaterialDialog dialog) {
|
||||||
new ProgressDialogAsyncTask<Void, Void, Integer>(this,
|
new ProgressDialogAsyncTask<Void, Void, Integer>(this,
|
||||||
R.string.DeviceProvisioning_content_progress_title,
|
R.string.DeviceProvisioningActivity_content_progress_title,
|
||||||
R.string.DeviceProvisioning_content_progress_content)
|
R.string.DeviceProvisioningActivity_content_progress_content)
|
||||||
{
|
{
|
||||||
private static final int SUCCESS = 0;
|
private static final int SUCCESS = 0;
|
||||||
private static final int NO_DEVICE = 1;
|
private static final int NO_DEVICE = 1;
|
||||||
@ -133,16 +133,16 @@ public class DeviceProvisioningActivity extends PassphraseRequiredActionBarActiv
|
|||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
Toast.makeText(context, R.string.DeviceProvisioning_content_progress_success, Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, R.string.DeviceProvisioningActivity_content_progress_success, Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
case NO_DEVICE:
|
case NO_DEVICE:
|
||||||
Toast.makeText(context, R.string.DeviceProvisioning_content_progress_no_device, Toast.LENGTH_LONG).show();
|
Toast.makeText(context, R.string.DeviceProvisioningActivity_content_progress_no_device, Toast.LENGTH_LONG).show();
|
||||||
break;
|
break;
|
||||||
case NETWORK_ERROR:
|
case NETWORK_ERROR:
|
||||||
Toast.makeText(context, R.string.DeviceProvisioning_content_progress_network_error, Toast.LENGTH_LONG).show();
|
Toast.makeText(context, R.string.DeviceProvisioningActivity_content_progress_network_error, Toast.LENGTH_LONG).show();
|
||||||
break;
|
break;
|
||||||
case KEY_ERROR:
|
case KEY_ERROR:
|
||||||
Toast.makeText(context, R.string.DeviceProvisioning_content_progress_key_error, Toast.LENGTH_LONG).show();
|
Toast.makeText(context, R.string.DeviceProvisioningActivity_content_progress_key_error, Toast.LENGTH_LONG).show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user