diff --git a/api/cm_current.txt b/api/cm_current.txt index bb1f3ae5..10011f26 100644 --- a/api/cm_current.txt +++ b/api/cm_current.txt @@ -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(); diff --git a/src/java/cyanogenmod/app/Profile.java b/src/java/cyanogenmod/app/Profile.java index ad718ec8..bd51ca2a 100755 --- a/src/java/cyanogenmod/app/Profile.java +++ b/src/java/cyanogenmod/app/Profile.java @@ -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: + *
+ * 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); + *+ * + * @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; diff --git a/system-api/cm_system-current.txt b/system-api/cm_system-current.txt index bb1f3ae5..10011f26 100644 --- a/system-api/cm_system-current.txt +++ b/system-api/cm_system-current.txt @@ -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();