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

Commit 11af8b10 authored by Jimmy Chen's avatar Jimmy Chen
Browse files

Revert "wifidisplay: restrict broadcast by the proper permission"

This reverts commit 1d4c97ff.

Reason for revert: Remove from July 2021 Android Security Bulletin due to break existing applications.

Bug: 176541017
Change-Id: I4d12bbccc30cd572b55cba2b98154b96e590136d
Test: install WFD application and check whether it works normally.
parent 1d4c97ff
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -68,9 +68,6 @@ public final class DisplayManager {
     * {@link #EXTRA_WIFI_DISPLAY_STATUS} extra.
     * </p><p>
     * This broadcast is only sent to registered receivers and can only be sent by the system.
     * </p><p>
     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission is required to
     * receive this broadcast.
     * </p>
     * @hide
     */
+1 −6
Original line number Diff line number Diff line
@@ -91,10 +91,6 @@ final class WifiDisplayAdapter extends DisplayAdapter {

    private boolean mPendingStatusChangeBroadcast;

    private static final String[] RECEIVER_PERMISSIONS_FOR_BROADCAST = {
            android.Manifest.permission.ACCESS_FINE_LOCATION,
    };

    // Called with SyncRoot lock held.
    public WifiDisplayAdapter(DisplayManagerService.SyncRoot syncRoot,
            Context context, Handler handler, Listener listener,
@@ -436,8 +432,7 @@ final class WifiDisplayAdapter extends DisplayAdapter {
        }

        // Send protected broadcast about wifi display status to registered receivers.
        getContext().createContextAsUser(UserHandle.ALL, 0)
                .sendBroadcastWithMultiplePermissions(intent, RECEIVER_PERMISSIONS_FOR_BROADCAST);
        getContext().sendBroadcastAsUser(intent, UserHandle.ALL);
    }

    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {