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

Commit 76724683 authored by Arnaud Berry's avatar Arnaud Berry
Browse files

Add BIND_INCLUDE_CAPABILITIES flag when binding to the service.

This allows headless media applications to access the location if they
have the permission and is needed for AAOS apps in particular.

Bug: 169242810
Bug: 156904507
Test: manual with AAOS Media app
Change-Id: I1196718638fba336a815809578f643814545baf4
parent 8b9d4058
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ public final class MediaBrowser {
                boolean bound = false;
                try {
                    bound = mContext.bindService(intent, mServiceConnection,
                            Context.BIND_AUTO_CREATE);
                            Context.BIND_AUTO_CREATE | Context.BIND_INCLUDE_CAPABILITIES);
                } catch (Exception ex) {
                    Log.e(TAG, "Failed binding to service " + mServiceComponent);
                }