Handle MEDIA_ROUTING_CONTROL runtime revocation
When the app op permission is revoked, MR2SI must unregister the relevant manager records and invalidate the matching proxy router instances. We need to add a new listener so that apps get notified of a proxy router invalidation and know when to stop using it. The alternative approach of listening directly to app-op permission changes from AppOpsManager would create a race condition between the permission change and the invalidation + cleanup of the instance, leading to undefined behaviour. getInstance(Context, String) was promoted from system to public API for Android V ag/25997373, but the promotion becomes unnecessary with the new getInstance() overload. Reverting getInstance(Context, String) back to SystemAPI. Bug: 326387864 Test: atest CtsMediaBetterTogetherTestCases Change-Id: I417eb09cd08a3b61388c69f1a33a4116b399d61d
Loading
Please register or sign in to comment