mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +01:00
Simulate slow device, sleep 5 sec after shutdown
This commit is contained in:
@@ -146,6 +146,11 @@ public class BriarControllerImpl implements BriarController {
|
|||||||
// Shut down the service and wait for it to shut down
|
// Shut down the service and wait for it to shut down
|
||||||
LOG.info("Shutting down service");
|
LOG.info("Shutting down service");
|
||||||
service.shutdown();
|
service.shutdown();
|
||||||
|
try {
|
||||||
|
Thread.sleep(5000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
service.waitForShutdown();
|
service.waitForShutdown();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LOG.warning("Interrupted while waiting for service");
|
LOG.warning("Interrupted while waiting for service");
|
||||||
|
|||||||
@@ -118,4 +118,9 @@ public class SettingsActivity extends BriarActivity {
|
|||||||
ConfirmAvatarDialogFragment.TAG);
|
ConfirmAvatarDialogFragment.TAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void languageChanged() {
|
||||||
|
signOut(false, false);
|
||||||
|
finishAffinity();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ import androidx.preference.SwitchPreference;
|
|||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
|
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
||||||
import static android.media.RingtoneManager.ACTION_RINGTONE_PICKER;
|
import static android.media.RingtoneManager.ACTION_RINGTONE_PICKER;
|
||||||
import static android.media.RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI;
|
import static android.media.RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI;
|
||||||
@@ -89,7 +88,6 @@ import static org.briarproject.bramble.util.LogUtils.now;
|
|||||||
import static org.briarproject.briar.android.BriarApplication.ENTRY_ACTIVITY;
|
import static org.briarproject.briar.android.BriarApplication.ENTRY_ACTIVITY;
|
||||||
import static org.briarproject.briar.android.TestingConstants.IS_DEBUG_BUILD;
|
import static org.briarproject.briar.android.TestingConstants.IS_DEBUG_BUILD;
|
||||||
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_RINGTONE;
|
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_RINGTONE;
|
||||||
import static org.briarproject.briar.android.navdrawer.NavDrawerActivity.SIGN_OUT_URI;
|
|
||||||
import static org.briarproject.briar.android.util.UiUtils.getCountryDisplayName;
|
import static org.briarproject.briar.android.util.UiUtils.getCountryDisplayName;
|
||||||
import static org.briarproject.briar.android.util.UiUtils.hasScreenLock;
|
import static org.briarproject.briar.android.util.UiUtils.hasScreenLock;
|
||||||
import static org.briarproject.briar.android.util.UiUtils.triggerFeedback;
|
import static org.briarproject.briar.android.util.UiUtils.triggerFeedback;
|
||||||
@@ -638,11 +636,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
|||||||
builder.setPositiveButton(R.string.sign_out_button,
|
builder.setPositiveButton(R.string.sign_out_button,
|
||||||
(dialogInterface, i) -> {
|
(dialogInterface, i) -> {
|
||||||
language.setValue(newValue);
|
language.setValue(newValue);
|
||||||
Intent intent = new Intent(getContext(), ENTRY_ACTIVITY);
|
listener.languageChanged();
|
||||||
intent.setFlags(FLAG_ACTIVITY_CLEAR_TOP);
|
|
||||||
intent.setData(SIGN_OUT_URI);
|
|
||||||
requireActivity().startActivity(intent);
|
|
||||||
requireActivity().finish();
|
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(R.string.cancel, null);
|
builder.setNegativeButton(R.string.cancel, null);
|
||||||
builder.setCancelable(false);
|
builder.setCancelable(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user