This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package dejavu.internal | |
| import android.app.Activity | |
| import android.app.Application | |
| import android.os.Bundle | |
| import androidx.compose.runtime.tooling.CompositionData | |
| import java.lang.ref.WeakReference | |
| import java.lang.reflect.Field | |
| import java.util.Collections | |
| import java.util.IdentityHashMap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package dejavu | |
| import androidx.activity.ComponentActivity | |
| import androidx.compose.ui.test.junit4.ComposeContentTestRule | |
| import androidx.compose.ui.test.junit4.ComposeTestRule | |
| import androidx.compose.ui.test.junit4.AndroidComposeTestRule | |
| import androidx.compose.ui.test.junit4.createAndroidComposeRule | |
| import androidx.test.ext.junit.rules.ActivityScenarioRule | |
| import org.junit.runner.Description | |
| import org.junit.runners.model.Statement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package dev.repro.dejavu | |
| import androidx.activity.ComponentActivity | |
| import androidx.compose.runtime.getValue | |
| import androidx.compose.runtime.mutableStateOf | |
| import androidx.compose.runtime.setValue | |
| import androidx.compose.ui.test.junit4.ComposeTestRule | |
| import androidx.compose.ui.test.onNodeWithTag | |
| import androidx.test.ext.junit.runners.AndroidJUnit4 | |
| import dejavu.assertRecompositions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package dev.repro.dejavu | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.fillMaxWidth | |
| import androidx.compose.foundation.layout.height | |
| import androidx.compose.foundation.layout.padding | |
| import androidx.compose.material3.Card |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onStartupRouteReady { | |
| postToNextUiTurn { | |
| waitBrieflyForFirstFrameToSettle() | |
| trace("DeferredRuntimeStartup") { | |
| startBackgroundService() | |
| requestMissingStorageAccessIfNeeded() | |
| initializeFileWatcher() | |
| connectRuntimeClient() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var postDrawWorkEnabled by remember { mutableStateOf(false) } | |
| onFirstFrameRendered { | |
| markStartupComplete() | |
| postDrawWorkEnabled = true | |
| } | |
| onScreenVisible(postDrawWorkEnabled) { | |
| updateConnectivityFlags() | |
| if (postDrawWorkEnabled) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trace("AppStartup") { | |
| registerEarlyListeners() | |
| resolveInitialState() | |
| renderRootUi() | |
| } | |
| trace("RuntimeConnect") { | |
| startLocalWatchers() | |
| createRuntimeClient() | |
| openRuntimeConnection() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adb shell am broadcast \ | |
| -n "$RECEIVER" \ | |
| -a "$PACKAGE.action.EXECUTE_COMMAND" \ | |
| --es request_id "$request_id" \ | |
| --es operation inspect \ | |
| --es alias "$alias" >/dev/null | |
| adb logcat -d -s "$TAG:I" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Suppress("DEPRECATION") | |
| private fun KeyInfo.toSecurityVerdict(): String { | |
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { | |
| return if (isInsideSecureHardware) "HARDWARE_BACKED" else "SOFTWARE_BACKED" | |
| } | |
| return when (securityLevel) { | |
| KeyProperties.SECURITY_LEVEL_SOFTWARE -> "SOFTWARE_BACKED" | |
| KeyProperties.SECURITY_LEVEL_TRUSTED_ENVIRONMENT -> "HARDWARE_BACKED_TEE" | |
| KeyProperties.SECURITY_LEVEL_STRONGBOX -> "HARDWARE_BACKED_STRONGBOX" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val builder = KeyGenParameterSpec.Builder( | |
| alias, | |
| KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT, | |
| ).setBlockModes(KeyProperties.BLOCK_MODE_GCM) | |
| .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) | |
| .setRandomizedEncryptionRequired(true) | |
| .setKeySize(256) | |
| if (requestStrongBox && Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { | |
| builder.setIsStrongBoxBacked(true) |
NewerOlder