cmsdk: Expose ProfileTrigger constructor for third parties.

Change-Id: I96dbc4974f49d07df020510be59f6ad23040e448
This commit is contained in:
Adnan Begovic 2015-08-04 16:45:26 -07:00
parent c2d967c092
commit 8481cec918
3 changed files with 21 additions and 1 deletions

View File

@ -172,6 +172,7 @@ package cyanogenmod.app {
}
public static class Profile.ProfileTrigger implements android.os.Parcelable {
ctor public Profile.ProfileTrigger(int, java.lang.String, int, java.lang.String);
method public int describeContents();
method public java.lang.String getId();
method public java.lang.String getName();

View File

@ -180,8 +180,26 @@ public final class Profile implements Parcelable, Comparable {
private String mName;
private int mState;
/**
* @hide
* Construct a {@link ProfileTrigger} based on its type {@link Profile.TriggerType} and if
* the trigger should fire on a {@link Profile.TriggerState} change.
*
* Example:
* <pre class="prettyprint">
* 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);
* </pre>
*
* @param type a {@link Profile.TriggerType}
* @param id an identifier for the ProfileTrigger
* @param state {@link Profile.TriggerState} depending on the TriggerType
* @param name an identifying name for the ProfileTrigger
*/
public ProfileTrigger(int type, String id, int state, String name) {
mType = type;

View File

@ -172,6 +172,7 @@ package cyanogenmod.app {
}
public static class Profile.ProfileTrigger implements android.os.Parcelable {
ctor public Profile.ProfileTrigger(int, java.lang.String, int, java.lang.String);
method public int describeContents();
method public java.lang.String getId();
method public java.lang.String getName();