Update new permission logic to use flagging.

- Add a new flag for the permission.
- Add FlaggedApi annotation to new permission.
- Update APIs to check flag enablement.

Bug: 304478692
Bug: 296056771
Test: atest UsageStatsTest
Change-Id: I59b0634d4cbc956ecfb5eb63dd1100515427d62f
4 files changed