mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Cleanup.
This commit is contained in:
parent
9075a2599c
commit
e45c8617df
1 changed files with 3 additions and 4 deletions
|
@ -62,20 +62,19 @@ class StatePolycentric {
|
|||
|
||||
val activeProcessHandleString = _activeProcessHandle.value;
|
||||
if (activeProcessHandleString.isNotEmpty()) {
|
||||
val system =
|
||||
PublicKey.fromProto(Protocol.PublicKey.parseFrom(activeProcessHandleString.base64ToByteArray()));
|
||||
val system = PublicKey.fromProto(Protocol.PublicKey.parseFrom(activeProcessHandleString.base64ToByteArray()));
|
||||
setProcessHandle(Store.instance.getProcessSecret(system)?.toProcessHandle());
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
_transientEnabled = false
|
||||
UIDialogs.toast(context, "Polycentric failed to initialize.")
|
||||
UIDialogs.toast(context, "Polycentric failed to initialize due to an error.")
|
||||
Log.i(TAG, "Failed to initialize Polycentric.", e)
|
||||
}
|
||||
}
|
||||
|
||||
fun ensureEnabled() {
|
||||
if (!enabled) {
|
||||
throw Exception("Cannot set process handle when Polycentric is disdabled")
|
||||
throw Exception("Polycentric is disabled")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue