Removed accidentally cmomitted code.

This commit is contained in:
Koen 2024-01-16 20:09:02 +01:00
parent 9b64cde17d
commit a0af8805e7

View file

@ -10,7 +10,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.futo.platformplayer.R
import com.futo.platformplayer.UIDialogs
import com.futo.platformplayer.encryption.GEncryptionProvider
import com.futo.platformplayer.fullyBackfillServersAnnounceExceptions
import com.futo.platformplayer.logging.Logger
import com.futo.platformplayer.setNavigationBarColorAndIcons
@ -21,7 +20,6 @@ import com.futo.polycentric.core.Store
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.util.UUID
class PolycentricCreateProfileActivity : AppCompatActivity() {
private lateinit var _buttonHelp: ImageButton;
@ -72,19 +70,6 @@ class PolycentricCreateProfileActivity : AppCompatActivity() {
processHandle = ProcessHandle.create();
Store.instance.addProcessSecret(processHandle.processSecret);
try {
val encryptedSecret = GEncryptionProvider.instance.encrypt(processHandle.processSecret.toProto().toByteArray())
val fileName = "polycentricProcessSecrets/${UUID.randomUUID()}"
val fileOutput = openFileOutput(fileName, Context.MODE_PRIVATE)
fileOutput.write(encryptedSecret)
fileOutput.close()
Logger.i(TAG, "Process secret saved to file: $fileName")
} catch (e: Exception) {
Logger.e(TAG, "Error saving process secret to file", e)
}
processHandle.addServer("https://srv1-stg.polycentric.io");
processHandle.setUsername(username);
StatePolycentric.instance.setProcessHandle(processHandle);