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

Commit 2add6bd2 authored by Iván Budnik's avatar Iván Budnik
Browse files

Check app-op MEDIA_ROUTING_CONTROL without throwing

The previous check would cause a fatal crash in system_server due to the
app-op check throwing a SecurityException when the app op had been
revoked.

Bug: 330863958
Bug: 326387864
Test: atest ProxyMediaRouter2HostSideTest
Change-Id: I2db1fbeee1852e73feaea8b344c97d2f60cc92f4
parent 43fa00ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1022,7 +1022,7 @@ class MediaRouter2ServiceImpl {

        // Uid and package name are shared across all manager records in the list.
        boolean isAppOpAllowed =
                mAppOpsManager.unsafeCheckOp(
                mAppOpsManager.unsafeCheckOpNoThrow(
                                AppOpsManager.OPSTR_MEDIA_ROUTING_CONTROL,
                                record.mOwnerUid,
                                record.mOwnerPackageName)