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

Commit 608b03fe authored by Manu Prasad's avatar Manu Prasad Committed by Gerrit - the friendly Code Review server
Browse files

PhoneWindowManager: Changes for WiFi Display to comply with Android CDD

Remove definition of Intent action for ACTION_WIFI_DISPLAY_VIDEO from
Intent.java and make it local to PhoneWindowManager.

CRs-Fixed: 766168

Change-Id: I91a6d302e19705080ccc109ee6532c6d43f58165
parent bebb17b6
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -2232,18 +2232,6 @@ public class Intent implements Parcelable, Cloneable {
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_HEADSET_PLUG = android.media.AudioManager.ACTION_HEADSET_PLUG;

    /**
     * Broadcast Action: WiFi Display video is enabled or disabled
     *
     * <p>The intent will have the following extra values:
     * <ul>
     *   <li><em>state</em> - 0 for disabled, 1 for enabled. </li>
     * </ul>
     * @hide
     */

    public static final String ACTION_WIFI_DISPLAY_VIDEO =
            "org.codeaurora.intent.action.WIFI_DISPLAY_VIDEO";

    /**
     * <p>Broadcast Action: The user has switched on advanced settings in the settings app:</p>
+15 −3
Original line number Diff line number Diff line
@@ -198,6 +198,18 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
            .build();

    /**
     * Broadcast Action: WiFi Display video is enabled or disabled
     *
     * <p>The intent will have the following extra values:
     * <ul>
     *   <li><em>state</em> - 0 for disabled, 1 for enabled. </li>
     * </ul>
     */

    private static final String ACTION_WIFI_DISPLAY_VIDEO =
            "org.codeaurora.intent.action.WIFI_DISPLAY_VIDEO";

    /**
     * Keyguard stuff
     */
@@ -1130,8 +1142,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        mVibrator = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);

        // register for WIFI Display intents
        IntentFilter wifiDisplayFilter = new IntentFilter(
                                                Intent.ACTION_WIFI_DISPLAY_VIDEO);
        IntentFilter wifiDisplayFilter = new IntentFilter(ACTION_WIFI_DISPLAY_VIDEO);

        Intent wifidisplayIntent = context.registerReceiver(
                                      mWifiDisplayReceiver, wifiDisplayFilter);

@@ -4866,7 +4878,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    BroadcastReceiver mWifiDisplayReceiver = new BroadcastReceiver() {
        public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
            if (action.equals(Intent.ACTION_WIFI_DISPLAY_VIDEO)) {
            if (action.equals(ACTION_WIFI_DISPLAY_VIDEO)) {
                int state = intent.getIntExtra("state", 0);
                if(state == 1) {
                    mWifiDisplayConnected = true;