public static class

Profile.ProfileTrigger

extends Object
implements Parcelable
java.lang.Object
   ↳ lineageos.app.Profile.ProfileTrigger

Class Overview

A Profile.ProfileTrigger is a Profile.TriggerType which can be queried from the OS

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
Profile.ProfileTrigger(int type, String id, int state, String name)
Construct a Profile.ProfileTrigger based on its type Profile.TriggerType and if the trigger should fire on a Profile.TriggerState change.
Public Methods
int describeContents()
String getId()
Get the id associated with the Profile.ProfileTrigger
String getName()
Get the name associated with the Profile.ProfileTrigger
int getState()
Get the state associated with the Profile.ProfileTrigger
int getType()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Public Constructors

public Profile.ProfileTrigger (int type, String id, int state, String name)

added in API level 2

Construct a Profile.ProfileTrigger based on its type Profile.TriggerType and if the trigger should fire on a Profile.TriggerState change. Example:

   triggerId = trigger.getSSID();                  // Use the AP's SSID as identifier
   triggerName = trigger.getTitle();               // Use the AP's name as the trigger name
   triggerType = Profile.TriggerType.WIFI;         // This is a wifi trigger
   triggerState = Profile.TriggerState.ON_CONNECT; // On Connect of this, trigger

   Profile.ProfileTrigger profileTrigger =
           new Profile.ProfileTrigger(triggerType, triggerId, triggerState, triggerName);
 

Parameters
type int: a Profile.TriggerType
id String: an identifier for the ProfileTrigger
state int: Profile.TriggerState depending on the TriggerType
name String: an identifying name for the ProfileTrigger

Public Methods

public int describeContents ()

added in API level 2

Returns
int

public String getId ()

added in API level 2

Get the id associated with the Profile.ProfileTrigger

Returns
String an string identifier

public String getName ()

added in API level 2

Get the name associated with the Profile.ProfileTrigger

Returns
String a string name

public int getState ()

added in API level 2

Get the state associated with the Profile.ProfileTrigger

Returns
int an integer indicating the state

public int getType ()

added in API level 2

public void writeToParcel (Parcel dest, int flags)

added in API level 2

Parameters
dest Parcel
flags int