mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-01 06:03:18 +01:00
Add ability to turn off and delete backups.
This commit is contained in:
committed by
Greyson Parrelli
parent
6659700a1c
commit
5ecf60a306
@@ -84,6 +84,18 @@ public final class ServiceResponse<Result> {
|
||||
}
|
||||
}
|
||||
|
||||
public Result getResultOrThrow() throws Throwable {
|
||||
if (result.isPresent()) {
|
||||
return result.get();
|
||||
} else if (applicationError.isPresent()) {
|
||||
throw applicationError.get();
|
||||
} else if (executionError.isPresent()) {
|
||||
throw executionError.get();
|
||||
} else {
|
||||
throw new AssertionError("Should never get here");
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> ServiceResponse<T> forResult(T result, WebsocketResponse response) {
|
||||
return new ServiceResponse<>(result, response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user