Home
last modified time | relevance | path

Searched refs:Persistence (Results 1 – 5 of 5) sorted by relevance

/packages/modules/OnDevicePersonalization/tests/chronicletests/src/com/android/libraries/pcc/chronicle/test/
DChronicleApiPolicyCapabilitiesTest.kt29 import com.android.libraries.pcc.chronicle.api.policy.capabilities.Capability.Persistence
45 assertThat(Capabilities(Persistence.ON_DISK).isEmpty).isFalse() in testCapabilitiesEmpty()
46 assertThat(Capabilities(listOf(Persistence.ON_DISK)).isEmpty).isFalse() in testCapabilitiesEmpty()
59 assertThat(persistent.persistence).isEqualTo(Persistence.ON_DISK) in testCapabilitiesFromAnnotationsPersistent()
82 assertThat(persistentAndTtl30d.persistence).isEqualTo(Persistence.ON_DISK) in testCapabilitiesFromAnnotationsPersistentAndTtl()
105 assertThat(tiedToRuntime.persistence).isEqualTo(Persistence.IN_MEMORY) in testCapabilitiesFromAnnotationsTiedToRuntimeAndTtl()
116 Persistence.ON_DISK.toRange(), in testCapabilitiesContains()
121 assertThat(capabilities.contains(Persistence.ON_DISK)).isTrue() in testCapabilitiesContains()
122 assertThat(capabilities.contains(Persistence.UNRESTRICTED)).isFalse() in testCapabilitiesContains()
123 assertThat(capabilities.contains(Persistence.IN_MEMORY)).isFalse() in testCapabilitiesContains()
[all …]
DChronicleApiPolicyTest.kt33 import com.android.libraries.pcc.chronicle.api.policy.capabilities.Capability.Persistence
110 Capabilities(listOf(Persistence.ON_DISK, Encryption(true), Ttl.Minutes(120))) in testPolicyTargetToCapabilities()
115 … capabilities[1].isEquivalent(Capabilities(listOf(Persistence.IN_MEMORY, Ttl.Minutes(120)))) in testPolicyTargetToCapabilities()
/packages/modules/OnDevicePersonalization/src/com/android/libraries/pcc/chronicle/api/policy/capabilities/
DCapability.kt46 is Persistence -> compare(other as Persistence) in isLessStrict()
75 data class Persistence(val kind: Kind) : Capability(TAG) { in toRange() dataClass
78 fun compare(other: Persistence): Comparison { in toRange()
88 val UNRESTRICTED = Persistence(Kind.Unrestricted) in toRange()
89 val ON_DISK = Persistence(Kind.OnDisk) in toRange()
90 val IN_MEMORY = Persistence(Kind.InMemory) in toRange()
91 val NONE = Persistence(Kind.None) in toRange()
93 val ANY = Range(Persistence.UNRESTRICTED, Persistence.NONE) in toRange()
95 fun fromAnnotations(annotations: List<Annotation>): Persistence? { in toRange()
119 1 -> Persistence(kinds.elementAt(0)) in toRange()
DCapabilities.kt38 val persistence: Capability.Persistence? in <lambda>()
39 get() = getCapability<Capability.Persistence>() in <lambda>()
91 Capability.Persistence.fromAnnotations(annotations)?.let { in <lambda>()
/packages/modules/OnDevicePersonalization/src/com/android/libraries/pcc/chronicle/api/policy/
DPolicy.kt66 StorageMedium.DISK -> Capability.Persistence.ON_DISK in toCapabilities()
67 StorageMedium.RAM -> Capability.Persistence.IN_MEMORY in toCapabilities()