mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Clarify networking call order during registration flow.
This commit is contained in:
committed by
Greyson Parrelli
parent
a3d72fc06c
commit
8e32592218
@@ -0,0 +1,24 @@
|
||||
package org.thoughtcrime.securesms.util
|
||||
|
||||
import com.dd.CircularProgressButton
|
||||
|
||||
object CircularProgressButtonUtil {
|
||||
|
||||
@JvmStatic
|
||||
fun setSpinning(button: CircularProgressButton?) {
|
||||
button?.apply {
|
||||
isClickable = false
|
||||
isIndeterminateProgressMode = true
|
||||
progress = 50
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun cancelSpinning(button: CircularProgressButton?) {
|
||||
button?.apply {
|
||||
progress = 0
|
||||
isIndeterminateProgressMode = false
|
||||
isClickable = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ class LifecycleDisposable : DefaultLifecycleObserver {
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
owner.lifecycle.removeObserver(this)
|
||||
disposables.clear()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException;
|
||||
|
||||
public class SignalUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
|
||||
|
||||
private static final String TAG = Log.tag(SignalUncaughtExceptionHandler.class);
|
||||
@@ -20,6 +22,10 @@ public class SignalUncaughtExceptionHandler implements Thread.UncaughtExceptionH
|
||||
|
||||
@Override
|
||||
public void uncaughtException(@NonNull Thread t, @NonNull Throwable e) {
|
||||
if (e instanceof OnErrorNotImplementedException) {
|
||||
e = e.getCause();
|
||||
}
|
||||
|
||||
Log.e(TAG, "", e, true);
|
||||
SignalStore.blockUntilAllWritesFinished();
|
||||
Log.blockUntilAllWritesFinished();
|
||||
|
||||
Reference in New Issue
Block a user