Package com.unitech.api.safemodelock
Class SafeModeLockCtrl
java.lang.Object
com.unitech.api.safemodelock.SafeModeLockCtrl
Created by USER
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SafeModeLockCtrlgetInstance(Context context) BundleCheck SafeModeLock bind with which packageNameBundleCheck whether SafeMode is being locked or notBundlesetSafeModeLock(boolean enabled, String launcherPackageName) Set SafeMode LockBundlesetSafeModeLock(boolean enabled, String launcherPackageName, String password) Set SafeMode Lock
-
Field Details
-
BUNDLE_ERROR_CODE
- See Also:
-
BUNDLE_ERROR_MSG
- See Also:
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS- See Also:
-
-
Method Details
-
getInstance
-
isSafeModeLockEnabled
public Bundle isSafeModeLockEnabled()Check whether SafeMode is being locked or not- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (1: safemodeLock not enable, 0: safemodeLock enable)
String errorMsg = bundle.getString("errorMsg");
-
getLauncherPackageName
public Bundle getLauncherPackageName()Check SafeModeLock bind with which packageName- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (1: fail, 0: success)
String errorMsg = bundle.getString("errorMsg");
String packageName = bundle.getString("packageName");
-
setSafeModeLock
Set SafeMode Lock- Parameters:
enabled- true or false (boolean)launcherPackageName- Lancher PackageName (String) (If it set empty, it will clean default lancher setting.)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
-
setSafeModeLock
Set SafeMode Lock- Parameters:
enabled- true or false (boolean)launcherPackageName- Lancher PackageName (String) (If it set empty, it will clean default lancher setting.)password- password (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
-