Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12e306c4 authored by David van Tonder's avatar David van Tonder Committed by Gerrit Code Review
Browse files

Merge "Profiles: add PROFILES_STATE_CHANGED_ACTION broadcast intent" into cm-10.1

parents 29fdb24c 2c49d18c
Loading
Loading
Loading
Loading
+37 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,8 @@ package android.app;


import java.util.UUID;
import java.util.UUID;


import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
import android.content.Context;
import android.os.Handler;
import android.os.Handler;
import android.os.IBinder;
import android.os.IBinder;
@@ -43,6 +45,41 @@ public class ProfileManager {


    private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled";
    private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled";


    /**
     * Broadcast intent action indicating that Profiles has been enabled or disabled.
     * One extra provides this state as an int.
     *
     * @see #EXTRA_PROFILES_STATE
     * @hide
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String PROFILES_STATE_CHANGED_ACTION =
        "android.app.profiles.PROFILES_STATE_CHANGED";
    /**
     * The lookup key for an int that indicates whether Profiles are enabled or
     * disabled. Retrieve it with {@link android.content.Intent#getIntExtra(String,int)}.
     *
     * @see #PROFILES_STATE_DISABLED
     * @see #PROFILES_STATE_ENABLED
     * @hide
     */
    public static final String EXTRA_PROFILES_STATE = "profile_state";

    /**
     * Profiles are disabled.
     *
     * @see #PROFILES_STATE_CHANGED_ACTION
     * @hide
     */
    public static final int PROFILES_STATE_DISABLED = 0;
    /**
     * Profiles are enabled.
     *
     * @see #PROFILES_STATE_CHANGED_ACTION
     * @hide
     */
    public static final int PROFILES_STATE_ENABLED = 1;

    // A blank profile that is created to be returned if profiles disabled
    // A blank profile that is created to be returned if profiles disabled
    private static Profile mEmptyProfile;
    private static Profile mEmptyProfile;