to top
AFEX APIs
public class

AppControlItem

extends Object
implements Parcelable
java.lang.Object
   ↳ com.ardic.android.parcelables.AppControlItem

Class Overview

Holds application related data which is used application running decisions.

Summary

Constants
String PERMISSION_SEPARATOR
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
AppControlItem(AppControlItem item)
AppControlItem(String packageName)
AppControlItem(String packageName, boolean packageBlocked, boolean networkBlocked, boolean forceStopBlocked, boolean uninstallBlocked, boolean clearDataBlocked, List<String> blockedPermissionList)
Public Methods
synchronized boolean addBlockedPermission(String blockedPermission)
Adds the new blocked permission to application blocked permission list.
synchronized boolean clearBlockedPermissions()
Clears the all blocked permissions from application blocked permission list.
static String concatBlockedPermissions(List<String> blockedPermissionList)
Returns the concatenated blocked permissions separated with PERMISSION_SEPARATOR.
synchronized boolean containsBlockedPermission(String blockedPermission)
Returns true if application permission list contains permission else false
boolean equals(Object o)
synchronized List<String> getBlockedPermissionList()
Returns the blocked permission list.
String getPackageName()
Returns the application package name.
int hashCode()
boolean isClearDataBlocked()
Returns the application clear data blocked state.
boolean isForceStopBlocked()
Returns the application force stop blocked state.
boolean isNetworkBlocked()
Returns the application network connection blocked state.
boolean isPackageBlocked()
Returns the application blocked state.
boolean isUninstallBlocked()
Returns the application uninstall blocked state.
synchronized boolean removeBlockedPermission(String blockedPermission)
Removes the blocked permission from application blocked permission list.
void setClearDataBlocked(boolean state)
Sets the application clear data blocked state.
void setForceStopBlocked(boolean state)
Sets the application force stop blocked state.
void setNetworkBlocked(boolean state)
Sets the application network connection blocked state.
void setPackageBlocked(boolean state)
Sets the application blocked state.
void setUninstallBlocked(boolean state)
Sets the application uninstall blocked state.
static List<String> splitBlockedPermissions(String blockedPermissions)
Returns the splitted blocked permission list which is separated with PERMISSION_SEPARATOR.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String PERMISSION_SEPARATOR

Added in API level 1

Constant Value: " "

Public Constructors

public AppControlItem (AppControlItem item)

Added in API level 1

Parameters
item AppControlItem
Throws
RuntimeException if packageName is null

public AppControlItem (String packageName)

Added in API level 1

Parameters
packageName String: Application package name
Throws
RuntimeException if packageName is null

public AppControlItem (String packageName, boolean packageBlocked, boolean networkBlocked, boolean forceStopBlocked, boolean uninstallBlocked, boolean clearDataBlocked, List<String> blockedPermissionList)

Added in API level 1

Parameters
packageName String: Application package name
packageBlocked boolean: Application blocked state
networkBlocked boolean: Application network connectable blocked state
forceStopBlocked boolean: Application force stoppable blocked state
uninstallBlocked boolean: Application uninstallable blocked state
clearDataBlocked boolean: Application data clearable blocked state
blockedPermissionList List: Application blocked permission list
Throws
RuntimeException if packageName is null

Public Methods

public synchronized boolean addBlockedPermission (String blockedPermission)

Added in API level 1

Adds the new blocked permission to application blocked permission list.

Parameters
blockedPermission String: Blocked permission.
Returns
boolean true if the operation succeeds else false

public synchronized boolean clearBlockedPermissions ()

Added in API level 1

Clears the all blocked permissions from application blocked permission list.

Returns
boolean

public static String concatBlockedPermissions (List<String> blockedPermissionList)

Added in API level 1

Returns the concatenated blocked permissions separated with PERMISSION_SEPARATOR.

Parameters
blockedPermissionList List
Returns
String Blocked permissions

public synchronized boolean containsBlockedPermission (String blockedPermission)

Added in API level 1

Returns true if application permission list contains permission else false

Parameters
blockedPermission String: Blocked permission
Returns
boolean true if blocked permission exists in the blocked permission list else false

public boolean equals (Object o)

Parameters
o Object
Returns
boolean

public synchronized List<String> getBlockedPermissionList ()

Added in API level 1

Returns the blocked permission list.

Returns
List<String> Blocked permission list

public String getPackageName ()

Added in API level 1

Returns the application package name.

Returns
String Application package name.

public int hashCode ()

Returns
int

public boolean isClearDataBlocked ()

Added in API level 1

Returns the application clear data blocked state.

Returns
boolean true if clearing application's data, cache and defaults partitions blocked else false

public boolean isForceStopBlocked ()

Added in API level 1

Returns the application force stop blocked state.

Returns
boolean true if application force stoppable blocked else false

public boolean isNetworkBlocked ()

Added in API level 1

Returns the application network connection blocked state.

Returns
boolean true if application network connection blocked else false

public boolean isPackageBlocked ()

Added in API level 1

Returns the application blocked state.

Returns
boolean true if application is blocked completely else false

public boolean isUninstallBlocked ()

Added in API level 1

Returns the application uninstall blocked state.

Returns
boolean true if application uninstallable blocked else false

public synchronized boolean removeBlockedPermission (String blockedPermission)

Added in API level 1

Removes the blocked permission from application blocked permission list.

Parameters
blockedPermission String: Blocked permission.
Returns
boolean true if the operation succeeds else false

public void setClearDataBlocked (boolean state)

Added in API level 1

Sets the application clear data blocked state.

Parameters
state boolean: true to block application data clearable else false

public void setForceStopBlocked (boolean state)

Added in API level 1

Sets the application force stop blocked state.

Parameters
state boolean: true to block application force stoppable else false

public void setNetworkBlocked (boolean state)

Added in API level 1

Sets the application network connection blocked state.

Parameters
state boolean: true to block application network connection else false

public void setPackageBlocked (boolean state)

Added in API level 1

Sets the application blocked state.

Parameters
state boolean: true to block application completely else false

public void setUninstallBlocked (boolean state)

Added in API level 1

Sets the application uninstall blocked state.

Parameters
state boolean: true to blocked application uninstallable else false

public static List<String> splitBlockedPermissions (String blockedPermissions)

Added in API level 1

Returns the splitted blocked permission list which is separated with PERMISSION_SEPARATOR.

Parameters
blockedPermissions String
Returns
List<String> Blocked permissions list