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

Commit 44208c12 authored by Samiul Islam's avatar Samiul Islam
Browse files

Annotate System Manager classes that are restricted in SdkSandbox 2/n

These manager classes are inaccessible from SdkSandbox due to selinux
policies added back in Android U. Currently, developers trying to access
these managers/api will receive runtime error and crash, if they don't
handle the RTE properly.

To help developers understand if an API is available to the environment
they are running from, we are annotating these managers with the new
@RestrictedForEnvironment annotation.

This is a documentation enhancement feature. We are not adding any new
restriction. We are only highlighting the ALREADY existing restrictions
to users.

The annotation will be used to:
    - Update the javadoc in developer site.
    - Add lint support in IDE.

The annotation cannot be flag guarded (see flag stanza below). This
should still be safe since it's a documentation only change.

Bug: 325606627
Test: atest SdkSandboxSystemServiceRestrictionsTests
Flag: EXEMPT RestrictedForEnvironment makes javadoc changes which cannot
      be disabled with flag. See b/396346859#comment11.

Change-Id: If2667b0bb1bb306b6e8e7cc8066127c4ced2d3ec
parent 89b1b469
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment