PropOverride

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])  @RequiresApi(value = 21) public final class 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(String propName, String overrideValue)

Public methods

final void
final void

Public constructors

PropOverride

public final PropOverride(String propName, String overrideValue)

Public methods

forceValue

public final void forceValue()

resetIfOverridden

public final void resetIfOverridden()