Back to top

DA deprecation and Samsung

On Samsung devices, you can still call alternative APIs in the Samsung Knox SDK to manage the four policies deprecated in device admin (DA). This is a temporary measure only. To take advantage of new features in Android Enterprise and differentiate your solutions, you should migrate to the new Android Management APIs as described in the Android Enterprise Migration Bluebook.

USES_POLICY_DISABLE_CAMERA

Impacted Android API:

public void setCameraDisabled (ComponentName admin, boolean disabled)

Alternative Knox API:

RestrictionPolicy.setCameraState (boolean enable)

USES_POLICY_DISABLE_KEYGUARD_FEATURES

Impacted Android APIs:

public void setKeyguardDisabledFeatures (ComponentName admin, int which)
public void setTrustAgentConfiguration (ComponentName admin, ComponentName target, PersistableBundle configuration)

Alternative Knox API:

BasePasswordPolicy.setKeyguardDisabledFeatures (ComponentName admin, int which)

No Knox alternate for setTrustAgentConfiguration.

USES_POLICY_EXPIRE_PASSWORD

Impacted Android API:

public void setPasswordExpirationTimeout (ComponentName admin, long timeout)

Alternative Knox APIs:

PasswordPolicy.setPasswordExpires (ComponentName admin, int value)
BasePasswordPolicy.setPasswordExpirationTimeout (ComponentName admin, long timeout)

USES_POLICY_LIMIT_PASSWORD

Impacted Android APIs:

public boolean isActivePasswordSufficient ()
public void setPasswordHistoryLength (ComponentName admin, int length)
public void setPasswordMinimumLength (ComponentName admin, int length)
public void setPasswordMinimumLetters (ComponentName admin, int length)
public void setPasswordMinimumLowerCase (ComponentName admin, int length)
public void setPasswordMinimumNonLetter (ComponentName admin, int length)
public void setPasswordMinimumNumeric (ComponentName admin, int length)
public void setPasswordMinimumSymbols (ComponentName admin, int length)
public void setPasswordMinimumUpperCase (ComponentName admin, int length)
public void setPasswordQuality (ComponentName admin, int quality)

Alternative Knox APIs:

BasePasswordPolicy.isActivePasswordSufficient ()
PasswordPolicy.setPasswordHistory (ComponentName admin, int value) 
BasePasswordPolicy.setPasswordHistoryLength (ComponentName admin, int length)
BasePasswordPolicy.setPasswordMinimumLength (ComponentName admin, int length)
PasswordPolicy.setMinPasswordComplexChars (ComponentName admin, int size)
BasePasswordPolicy.setPasswordMinimumLetters (ComponentName admin, int length)
BasePasswordPolicy.setPasswordMinimumLowerCase (ComponentName admin, int length)
BasePasswordPolicy.setPasswordMinimumNonLetter (ComponentName admin, int length)
BasePasswordPolicy.setPasswordMinimumNumeric (ComponentName admin, int length)
BasePasswordPolicy.setPasswordMinimumSymbols (ComponentName admin, int length)
BasePasswordPolicy.setPasswordMinimumUpperCase (ComponentName admin, int length)
BasePasswordPolicy.setPasswordQuality (ComponentName admin, int quality)

Is this page helpful?