PropOverride

@RestrictTo([Scope.LIBRARY_GROUP]) @RequiresApi(21) class PropOverride
kotlin.Any
   ↳ androidx.benchmark.PropOverride

PropOverride provides temporary overriding of a platform setprop value, with resetting to avoid polluting device state.

It's recommended to use a try/finally to ensure that resetIfOverridden isn't missed.

Barring that, using a single static instance enables reset to happen later if one reset is missed.

Summary

Public constructors
PropOverride(propName: String, overrideValue: String)

PropOverride provides temporary overriding of a platform setprop value, with resetting to avoid polluting device state.

Public methods
Unit

Unit

Public constructors

PropOverride

PropOverride(
    propName: String,
    overrideValue: String)

PropOverride provides temporary overriding of a platform setprop value, with resetting to avoid polluting device state.

It's recommended to use a try/finally to ensure that resetIfOverridden isn't missed.

Barring that, using a single static instance enables reset to happen later if one reset is missed.

Public methods

forceValue

fun forceValue(): Unit

resetIfOverridden

fun resetIfOverridden(): Unit