| java.lang.Object | |
| ↳ | lineageos.app.ProfileManager | 
 The ProfileManager allows you to create Profiles and ProfileGroups to create
 specific behavior states depending on triggers from hardware devices changing states, such as:
 
     WiFi being enabled
     WiFi connecting to a certain AP
     Bluetooth connecting to a certain device
     Bluetooth disconnecting to a certain device
     NFC tag being scanned
 
 Depending on these triggers, you can override connection settings, lockscreen modes, media stream volumes and various other settings.
To get the instance of this class, utilize ProfileManager#getInstance(Context context)
This manager requires the MODIFY_PROFILES permission.
See also:
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | ACTION_PROFILE_PICKER | Activity Action: Shows a profile picker. | |||||||||
| String | EXTRA_LAST_PROFILE_NAME | Extra for INTENT_ACTION_PROFILE_SELECTED:
 The name of the previously active profile | |||||||||
| String | EXTRA_LAST_PROFILE_UUID | Extra for INTENT_ACTION_PROFILE_SELECTED:
 The string representation of the UUID of the previously active profile | |||||||||
| String | EXTRA_PROFILES_STATE | The lookup key for an int that indicates whether Profiles are enabled or disabled. | |||||||||
| String | EXTRA_PROFILE_DIALOG_THEME | Set the resource id theme to use for the dialog picker activity. | |||||||||
| String | EXTRA_PROFILE_EXISTING_UUID | Given to the profile picker as a UUIDstring representation. | |||||||||
| String | EXTRA_PROFILE_NAME | Extra for INTENT_ACTION_PROFILE_SELECTEDandINTENT_ACTION_PROFILE_UPDATED:
 The name of the newly activated or updated profile | |||||||||
| String | EXTRA_PROFILE_PICKED_UUID | Returned from the profile picker as a UUIDstring representation. | |||||||||
| String | EXTRA_PROFILE_SHOW_NONE | Given to the profile picker as a boolean. | |||||||||
| String | EXTRA_PROFILE_TITLE | Given to the profile picker as a CharSequence. | |||||||||
| String | EXTRA_PROFILE_UUID | Extra for INTENT_ACTION_PROFILE_SELECTEDandINTENT_ACTION_PROFILE_UPDATED:
 The string representation of the UUID of the newly activated or updated profile | |||||||||
| String | INTENT_ACTION_PROFILE_SELECTED | Broadcast Action: A new profile has been selected. | |||||||||
| String | INTENT_ACTION_PROFILE_UPDATED | Broadcast Action: Current profile has been updated. | |||||||||
| String | PROFILES_STATE_CHANGED_ACTION | Broadcast intent action indicating that Profiles has been enabled or disabled. | |||||||||
| int | PROFILES_STATE_DISABLED | Profiles are disabled. | |||||||||
| int | PROFILES_STATE_ENABLED | Profiles are enabled. | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| NO_PROFILE | Constant for NO_PROFILE | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          Add a  Profilethat can be selected by the user | |||||||||||
| 
          Get the active  Profile | |||||||||||
| 
          Get or create an instance of the  ProfileManager | |||||||||||
| 
          
      This method was deprecated
      in API level 2.
    No replacement.
          
    
         | |||||||||||
| 
          Get the profile names currently available to the user
          
    
         | |||||||||||
| 
          Get the  Profiles currently available to the user | |||||||||||
| 
          Check if profiles are currently activated in the system
          
    
         | |||||||||||
| 
          Check if a  Profileexists via its literal name | |||||||||||
| 
          Remove a  Profilefrom user selection | |||||||||||
| 
          Reset all profiles, groups, and notification groups to default state
          
    
         | |||||||||||
| 
          
      This method was deprecated
      in API level 2.
    No replacement.
          
    
         | |||||||||||
| 
          Update a  Profileobject | |||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  java.lang.Object | |||||||||||
Activity Action: Shows a profile picker.
 Input: EXTRA_PROFILE_EXISTING_UUID, EXTRA_PROFILE_SHOW_NONE,
 EXTRA_PROFILE_TITLE.
 
 Output: EXTRA_PROFILE_PICKED_UUID.
Extra for INTENT_ACTION_PROFILE_SELECTED:
 The name of the previously active profile
Extra for INTENT_ACTION_PROFILE_SELECTED:
 The string representation of the UUID of the previously active profile
The lookup key for an int that indicates whether Profiles are enabled or
 disabled. Retrieve it with getIntExtra(String, int).
Set the resource id theme to use for the dialog picker activity.
 The default theme is com.android.internal.R.Theme_Holo_Dialog_Alert.
See also:
Given to the profile picker as a UUID string representation. The UUID
 representation of the current profile, which will be used to show a checkmark next to
 the item for this UUID. If the item is NO_PROFILE then "None" item
 is selected if EXTRA_PROFILE_SHOW_NONE is enabled. Otherwise, the current
 profile is selected.
See also:
Extra for INTENT_ACTION_PROFILE_SELECTED and INTENT_ACTION_PROFILE_UPDATED:
 The name of the newly activated or updated profile
Returned from the profile picker as a UUID string representation.
 
It will be one of:
See also:
Given to the profile picker as a boolean. Whether to show an item for
 deselect the profile. If the "None" item is picked,
 EXTRA_PROFILE_PICKED_UUID will be NO_PROFILE.
See also:
Given to the profile picker as a CharSequence. The title to
 show for the profile picker. This has a default value that is suitable
 in most cases.
See also:
Extra for INTENT_ACTION_PROFILE_SELECTED and INTENT_ACTION_PROFILE_UPDATED:
 The string representation of the UUID of the newly activated or updated profile
Broadcast Action: A new profile has been selected. This can be triggered by the user or by calls to the ProfileManagerService / Profile.
Broadcast Action: Current profile has been updated. This is triggered every time the currently active profile is updated, instead of selected.
For instance, this includes profile updates caused by a locale change, which doesn't trigger a profile selection, but causes its name to change.
Broadcast intent action indicating that Profiles has been enabled or disabled. One extra provides this state as an int.
See also:
Get or create an instance of the ProfileManager
| Returns | |
|---|---|
| ProfileManager | ProfileManager | 
Get the profile names currently available to the user
| Returns | |
|---|---|
| String[] | ERROR(/String[])of profile names | 
Get the Profiles currently available to the user
| Returns | |
|---|---|
| Profile[] | ERROR(/Profile[]) | 
Check if profiles are currently activated in the system
| Returns | |
|---|---|
| boolean | whether profiles are enabled | 
Check if a Profile exists via its literal name
| Parameters | |
|---|---|
| profileName | String: a profile name | 
| Returns | |
|---|---|
| boolean | whether or not the profile exists | 
Reset all profiles, groups, and notification groups to default state
      This method was deprecated
      in API level 2.
    No replacement.
  
| Parameters | |
|---|---|
| profileName | String |