Class LocationPolicy

Definition

Namespace:
Tizen.Security.DevicePolicyManager
Assembly:
Tizen.Security.DevicePolicyManager.dll

The LocationPolicy provides methods to manage location policies.

C#
Copy
public class LocationPolicy : DevicePolicy, IDisposable
Inheritance
object
LocationPolicy
Implements
System.IDisposable
Remarks

The LocationPolicy is created by GetPolicy<T>(). and the DevicePolicyManager instance must exists when using the LocationPolicy.

Fields

View Source

LocationPolicyName

The Location policy name. This represents IsLocationAllowed.

Declaration
C#
Copy
public static readonly string LocationPolicyName
Field Value
Type Description
string
Remarks

This is used in PolicyName.

Properties

View Source

IsLocationAllowed

Gets whether user is allowed to change location state or not.

Declaration
C#
Copy
public bool IsLocationAllowed { get; }
Property Value
Type Description
bool

true if the location state change is allowed, false otherwise. The default value is true.

Remarks

The LocationPolicy is created by GetPolicy<T>(). and the DevicePolicyManager instance must exists when using the LocationPolicy.

Methods

View Source

Dispose()

Releases any unmanaged resources used by this object.

Declaration
C#
Copy
public void Dispose()
Remarks

The LocationPolicy is created by GetPolicy<T>(). and the DevicePolicyManager instance must exists when using the LocationPolicy.

View Source

Dispose(bool)

Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

If true, disposes any disposable objects. If false, does not dispose disposable objects.

Remarks

The LocationPolicy is created by GetPolicy<T>(). and the DevicePolicyManager instance must exists when using the LocationPolicy.

View Source

~LocationPolicy()

A Destructor of LocationPolicy.

Declaration
C#
Copy
protected ~LocationPolicy()
Remarks

The LocationPolicy is created by GetPolicy<T>(). and the DevicePolicyManager instance must exists when using the LocationPolicy.

Events

View Source

LocationPolicyChanged

The LocationPolicyChanged event is raised when the location policy is changed.

Declaration
C#
Copy
public event EventHandler<PolicyChangedEventArgs> LocationPolicyChanged
Event Type
Type Description
System.EventHandler<TEventArgs><PolicyChangedEventArgs>
Remarks

This event will be removed automatically when LocationPolicy is destroyed.

Implements

System.IDisposable