Merge "Give Doclava our manifest; more permission docs." into oc-dev am: 65d4cbba37
am: 67cb5f5210
Change-Id: Ic4c30cdb8bbfda5b3703eb3c7c36c1bf8ab3a216
This commit is contained in:
@@ -967,6 +967,7 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \
|
||||
-android \
|
||||
-knowntags ./frameworks/base/docs/knowntags.txt \
|
||||
-knowntags ./libcore/known_oj_tags.txt \
|
||||
-manifest ./frameworks/base/core/res/AndroidManifest.xml \
|
||||
-hidePackage com.android.org.conscrypt \
|
||||
-since $(SRC_API_DIR)/1.xml 1 \
|
||||
-since $(SRC_API_DIR)/2.xml 2 \
|
||||
|
||||
@@ -1625,6 +1625,7 @@ public class DevicePolicyManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
|
||||
public boolean packageHasActiveAdmins(String packageName) {
|
||||
return packageHasActiveAdmins(packageName, myUserId());
|
||||
}
|
||||
@@ -4536,11 +4537,10 @@ public class DevicePolicyManager {
|
||||
/**
|
||||
* @return device owner component name, even if it's running on a different user.
|
||||
*
|
||||
* <p>Requires the MANAGE_USERS permission.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
|
||||
public ComponentName getDeviceOwnerComponentOnAnyUser() {
|
||||
return getDeviceOwnerComponentInner(/* callingUserOnly =*/ false);
|
||||
}
|
||||
@@ -4624,6 +4624,7 @@ public class DevicePolicyManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
|
||||
public @Nullable String getDeviceOwner() {
|
||||
throwIfParentInstance("getDeviceOwner");
|
||||
final ComponentName name = getDeviceOwnerComponentOnCallingUser();
|
||||
@@ -4641,6 +4642,7 @@ public class DevicePolicyManager {
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
@SuppressLint("Doclava125")
|
||||
public boolean isDeviceManaged() {
|
||||
try {
|
||||
return mService.hasDeviceOwner();
|
||||
@@ -4653,11 +4655,10 @@ public class DevicePolicyManager {
|
||||
* Returns the device owner name. Note this method *will* return the device owner
|
||||
* name when it's running on a different user.
|
||||
*
|
||||
* <p>Requires the MANAGE_USERS permission.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
|
||||
public String getDeviceOwnerNameOnAnyUser() {
|
||||
throwIfParentInstance("getDeviceOwnerNameOnAnyUser");
|
||||
if (mService != null) {
|
||||
@@ -5030,6 +5031,7 @@ public class DevicePolicyManager {
|
||||
* @throws IllegalArgumentException if the userId is invalid.
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
|
||||
public @Nullable String getProfileOwnerNameAsUser(int userId) throws IllegalArgumentException {
|
||||
throwIfParentInstance("getProfileOwnerNameAsUser");
|
||||
if (mService != null) {
|
||||
@@ -7548,6 +7550,7 @@ public class DevicePolicyManager {
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
@SuppressLint("Doclava125")
|
||||
public @Nullable CharSequence getDeviceOwnerOrganizationName() {
|
||||
try {
|
||||
return mService.getDeviceOwnerOrganizationName();
|
||||
@@ -7759,6 +7762,7 @@ public class DevicePolicyManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
|
||||
public boolean isDeviceProvisioningConfigApplied() {
|
||||
try {
|
||||
return mService.isDeviceProvisioningConfigApplied();
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
package android.hardware.hdmi;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SdkConstant.SdkConstantType;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
@@ -298,6 +300,7 @@ public final class HdmiControlManager {
|
||||
* See {@link HdmiDeviceInfo#DEVICE_TV}
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressLint("Doclava125")
|
||||
public HdmiClient getClient(int type) {
|
||||
if (mService == null) {
|
||||
return null;
|
||||
@@ -322,6 +325,7 @@ public final class HdmiControlManager {
|
||||
* @return {@link HdmiPlaybackClient} instance. {@code null} on failure.
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressLint("Doclava125")
|
||||
public HdmiPlaybackClient getPlaybackClient() {
|
||||
return (HdmiPlaybackClient) getClient(HdmiDeviceInfo.DEVICE_PLAYBACK);
|
||||
}
|
||||
@@ -336,6 +340,7 @@ public final class HdmiControlManager {
|
||||
* @return {@link HdmiTvClient} instance. {@code null} on failure.
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressLint("Doclava125")
|
||||
public HdmiTvClient getTvClient() {
|
||||
return (HdmiTvClient) getClient(HdmiDeviceInfo.DEVICE_TV);
|
||||
}
|
||||
@@ -346,6 +351,7 @@ public final class HdmiControlManager {
|
||||
*
|
||||
* @param isStandbyModeOn target status of the system's standby mode
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.HDMI_CEC)
|
||||
public void setStandbyMode(boolean isStandbyModeOn) {
|
||||
try {
|
||||
mService.setStandbyMode(isStandbyModeOn);
|
||||
@@ -406,6 +412,7 @@ public final class HdmiControlManager {
|
||||
* @param listener {@link HotplugEventListener} instance
|
||||
* @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.HDMI_CEC)
|
||||
public void addHotplugEventListener(HotplugEventListener listener) {
|
||||
if (mService == null) {
|
||||
Log.e(TAG, "HdmiControlService is not available");
|
||||
@@ -429,6 +436,7 @@ public final class HdmiControlManager {
|
||||
*
|
||||
* @param listener {@link HotplugEventListener} instance to be removed
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.HDMI_CEC)
|
||||
public void removeHotplugEventListener(HotplugEventListener listener) {
|
||||
if (mService == null) {
|
||||
Log.e(TAG, "HdmiControlService is not available");
|
||||
|
||||
@@ -25,6 +25,7 @@ import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
import android.annotation.WorkerThread;
|
||||
@@ -1699,6 +1700,7 @@ public class StorageManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public long getAllocatableBytes(@NonNull UUID storageUuid,
|
||||
@RequiresPermission @AllocateFlags int flags) throws IOException {
|
||||
try {
|
||||
@@ -1713,6 +1715,7 @@ public class StorageManager {
|
||||
|
||||
/** @removed */
|
||||
@Deprecated
|
||||
@SuppressLint("Doclava125")
|
||||
public long getAllocatableBytes(@NonNull File path,
|
||||
@RequiresPermission @AllocateFlags int flags) throws IOException {
|
||||
return getAllocatableBytes(getUuidForPath(path), flags);
|
||||
@@ -1747,6 +1750,7 @@ public class StorageManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void allocateBytes(@NonNull UUID storageUuid, @BytesLong long bytes,
|
||||
@RequiresPermission @AllocateFlags int flags) throws IOException {
|
||||
try {
|
||||
@@ -1760,6 +1764,7 @@ public class StorageManager {
|
||||
|
||||
/** @removed */
|
||||
@Deprecated
|
||||
@SuppressLint("Doclava125")
|
||||
public void allocateBytes(@NonNull File path, @BytesLong long bytes,
|
||||
@RequiresPermission @AllocateFlags int flags) throws IOException {
|
||||
allocateBytes(getUuidForPath(path), bytes, flags);
|
||||
@@ -1796,6 +1801,7 @@ public class StorageManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void allocateBytes(FileDescriptor fd, @BytesLong long bytes,
|
||||
@RequiresPermission @AllocateFlags int flags) throws IOException {
|
||||
final File file = ParcelFileDescriptor.getFile(fd);
|
||||
|
||||
@@ -828,6 +828,7 @@ public class LocationManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||
public void requestLocationUpdates(LocationRequest request, LocationListener listener,
|
||||
Looper looper) {
|
||||
checkListener(listener);
|
||||
@@ -856,6 +857,7 @@ public class LocationManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||
public void requestLocationUpdates(LocationRequest request, PendingIntent intent) {
|
||||
checkPendingIntent(intent);
|
||||
requestLocationUpdates(request, null, null, intent);
|
||||
|
||||
@@ -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;
|
||||
@@ -765,6 +766,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()) {
|
||||
@@ -846,6 +851,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public List<PhoneAccountHandle> getPhoneAccountsForPackage() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -973,6 +979,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void clearPhoneAccounts() {
|
||||
clearAccounts();
|
||||
}
|
||||
@@ -982,6 +989,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void clearAccounts() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -1013,6 +1021,7 @@ public class TelecomManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public ComponentName getDefaultPhoneApp() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
@@ -1229,6 +1238,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()) {
|
||||
@@ -1327,6 +1340,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()) {
|
||||
@@ -1605,6 +1622,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) {
|
||||
|
||||
@@ -2759,6 +2759,7 @@ public class TelephonyManager {
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||
@SuppressLint("Doclava125")
|
||||
public boolean isVisualVoicemailEnabled(PhoneAccountHandle phoneAccountHandle){
|
||||
return false;
|
||||
}
|
||||
@@ -2777,6 +2778,7 @@ public class TelephonyManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
@Nullable
|
||||
public Bundle getVisualVoicemailSettings(){
|
||||
try {
|
||||
@@ -5000,6 +5002,7 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public int checkCarrierPrivilegesForPackage(String pkgName) {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5015,6 +5018,7 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5066,6 +5070,7 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void dial(String number) {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5118,6 +5123,7 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void silenceRinger() {
|
||||
try {
|
||||
getTelecomService().silenceRinger(getOpPackageName());
|
||||
@@ -5128,6 +5134,10 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isOffhook() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5141,6 +5151,10 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isRinging() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5154,6 +5168,10 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isIdle() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5167,6 +5185,10 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isRadioOn() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5411,6 +5433,7 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void updateServiceLocation() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -5599,6 +5622,10 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@RequiresPermission(anyOf = {
|
||||
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isVideoCallingEnabled() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
|
||||
@@ -2066,6 +2066,7 @@ public class WifiManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
|
||||
public int getWifiApState() {
|
||||
try {
|
||||
return mService.getWifiApEnabledState();
|
||||
@@ -2082,6 +2083,7 @@ public class WifiManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
|
||||
public boolean isWifiApEnabled() {
|
||||
return getWifiApState() == WIFI_AP_STATE_ENABLED;
|
||||
}
|
||||
@@ -2093,6 +2095,7 @@ public class WifiManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
|
||||
public WifiConfiguration getWifiApConfiguration() {
|
||||
try {
|
||||
return mService.getWifiApConfiguration();
|
||||
@@ -2108,6 +2111,7 @@ public class WifiManager {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
|
||||
public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
|
||||
try {
|
||||
mService.setWifiApConfiguration(wifiConfig);
|
||||
|
||||
Reference in New Issue
Block a user