Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system permissions, so give Doclava the platform AndroidManifest.xml so it can parse the actual permission protection levels to look for APIs that are letting in non-system apps. Also document more @SystemApi permissions. This is purely a docs change; no logic changes are being made. Test: make -j32 update-api Bug: 62263906 Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
This commit is contained in:
@@ -17,6 +17,7 @@ package android.telecom;
|
||||
import android.Manifest;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SuppressAutoDoc;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
import android.content.ComponentName;
|
||||
@@ -736,6 +737,10 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme) {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -817,6 +822,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public List<PhoneAccountHandle> getPhoneAccountsForPackage() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -944,6 +950,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void clearPhoneAccounts() {
|
||||
clearAccounts();
|
||||
}
|
||||
@@ -953,6 +960,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void clearAccounts() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -984,6 +992,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public ComponentName getDefaultPhoneApp() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -1200,6 +1209,10 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isRinging() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -1298,6 +1311,10 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isTtySupported() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -1576,6 +1593,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
||||
public void enablePhoneAccount(PhoneAccountHandle handle, boolean isEnabled) {
|
||||
ITelecomService service = getTelecomService();
|
||||
if (service != null) {
|
||||
|
||||
Reference in New Issue
Block a user