From 71b6ca6d4325d7851030486bb4a080ecbc18c9a5 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Thu, 25 Jun 2015 18:19:14 -0700 Subject: [PATCH] Add JavaDoc for permission protection level 1. Add the permission protection level in the java doc 2. Make some system permissions that are not mean to be used by third-parties system API. bug:21402257 Change-Id: Ic0ae8d6ca44dbbbf12848a9164acc0e908c90402 --- api/current.txt | 14 -- core/res/AndroidManifest.xml | 415 +++++++++++++++++++++++++---------- 2 files changed, 303 insertions(+), 126 deletions(-) diff --git a/api/current.txt b/api/current.txt index cd5c0a8fe558f..3cd3ee25e3374 100644 --- a/api/current.txt +++ b/api/current.txt @@ -10,10 +10,8 @@ package android { field public static final java.lang.String ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION"; field public static final java.lang.String ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION"; field public static final java.lang.String ACCESS_LOCATION_EXTRA_COMMANDS = "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"; - field public static final java.lang.String ACCESS_MOCK_LOCATION = "android.permission.ACCESS_MOCK_LOCATION"; field public static final java.lang.String ACCESS_NETWORK_STATE = "android.permission.ACCESS_NETWORK_STATE"; field public static final java.lang.String ACCESS_NOTIFICATION_POLICY = "android.permission.ACCESS_NOTIFICATION_POLICY"; - field public static final java.lang.String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER"; field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE"; field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER"; field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL"; @@ -42,7 +40,6 @@ package android { field public static final java.lang.String BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN"; field public static final java.lang.String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED"; field public static final java.lang.String BODY_SENSORS = "android.permission.BODY_SENSORS"; - field public static final java.lang.String BRICK = "android.permission.BRICK"; field public static final java.lang.String BROADCAST_PACKAGE_REMOVED = "android.permission.BROADCAST_PACKAGE_REMOVED"; field public static final java.lang.String BROADCAST_SMS = "android.permission.BROADCAST_SMS"; field public static final java.lang.String BROADCAST_STICKY = "android.permission.BROADCAST_STICKY"; @@ -59,33 +56,25 @@ package android { field public static final java.lang.String CHANGE_WIFI_MULTICAST_STATE = "android.permission.CHANGE_WIFI_MULTICAST_STATE"; field public static final java.lang.String CHANGE_WIFI_STATE = "android.permission.CHANGE_WIFI_STATE"; field public static final java.lang.String CLEAR_APP_CACHE = "android.permission.CLEAR_APP_CACHE"; - field public static final java.lang.String CLEAR_APP_USER_DATA = "android.permission.CLEAR_APP_USER_DATA"; field public static final java.lang.String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES"; field public static final java.lang.String DELETE_CACHE_FILES = "android.permission.DELETE_CACHE_FILES"; field public static final java.lang.String DELETE_PACKAGES = "android.permission.DELETE_PACKAGES"; - field public static final java.lang.String DEVICE_POWER = "android.permission.DEVICE_POWER"; field public static final java.lang.String DIAGNOSTIC = "android.permission.DIAGNOSTIC"; field public static final java.lang.String DISABLE_KEYGUARD = "android.permission.DISABLE_KEYGUARD"; field public static final java.lang.String DUMP = "android.permission.DUMP"; field public static final java.lang.String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR"; field public static final java.lang.String FACTORY_TEST = "android.permission.FACTORY_TEST"; field public static final java.lang.String FLASHLIGHT = "android.permission.FLASHLIGHT"; - field public static final java.lang.String FORCE_BACK = "android.permission.FORCE_BACK"; field public static final java.lang.String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS"; field public static final java.lang.String GET_PACKAGE_SIZE = "android.permission.GET_PACKAGE_SIZE"; field public static final deprecated java.lang.String GET_TASKS = "android.permission.GET_TASKS"; - field public static final java.lang.String GET_TOP_ACTIVITY_INFO = "android.permission.GET_TOP_ACTIVITY_INFO"; field public static final java.lang.String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH"; - field public static final java.lang.String HARDWARE_TEST = "android.permission.HARDWARE_TEST"; - field public static final java.lang.String INJECT_EVENTS = "android.permission.INJECT_EVENTS"; field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER"; field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES"; field public static final java.lang.String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT"; - field public static final java.lang.String INTERNAL_SYSTEM_WINDOW = "android.permission.INTERNAL_SYSTEM_WINDOW"; field public static final java.lang.String INTERNET = "android.permission.INTERNET"; field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES"; field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE"; - field public static final java.lang.String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS"; field public static final java.lang.String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS"; field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR"; field public static final java.lang.String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL"; @@ -120,13 +109,10 @@ package android { field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES"; field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE"; field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS"; - field public static final java.lang.String SET_ACTIVITY_WATCHER = "android.permission.SET_ACTIVITY_WATCHER"; field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM"; field public static final java.lang.String SET_ALWAYS_FINISH = "android.permission.SET_ALWAYS_FINISH"; field public static final java.lang.String SET_ANIMATION_SCALE = "android.permission.SET_ANIMATION_SCALE"; field public static final java.lang.String SET_DEBUG_APP = "android.permission.SET_DEBUG_APP"; - field public static final java.lang.String SET_ORIENTATION = "android.permission.SET_ORIENTATION"; - field public static final java.lang.String SET_POINTER_SPEED = "android.permission.SET_POINTER_SPEED"; field public static final deprecated java.lang.String SET_PREFERRED_APPLICATIONS = "android.permission.SET_PREFERRED_APPLICATIONS"; field public static final java.lang.String SET_PROCESS_LIMIT = "android.permission.SET_PROCESS_LIMIT"; field public static final java.lang.String SET_TIME = "android.permission.SET_TIME"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 9637cf5bf903e..2cbfae26220df 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -335,14 +335,18 @@ android:description="@string/permgroupdesc_contacts" android:priority="100" /> - + - + - + - + - + - + - + - + - + Protection level: dangerous @hide Pending API council approval --> values are set to 3 or lower, the system implicitly grants your app this permission. If you don't need this permission, be sure your {@code - targetSdkVersion} is 4 or higher.--> + targetSdkVersion} is 4 or higher. +

Protection level: dangerous + --> Starting in API level 19, this permission is not required to read/write files in your application-specific directories returned by {@link android.content.Context#getExternalFilesDir} and - {@link android.content.Context#getExternalCacheDir}. --> + {@link android.content.Context#getExternalCacheDir}. +

Protection level: dangerous + --> - + - + values are set to 3 or lower, the system implicitly grants your app this permission. If you don't need this permission, be sure your {@code - targetSdkVersion} is 4 or higher. --> + targetSdkVersion} is 4 or higher. +

Protection level: dangerous + --> + the Dialer user interface for the user to confirm the call. +

Protection level: dangerous + --> values are set to 15 or lower, the system implicitly grants your app this permission. If you don't need this permission, be sure your {@code - targetSdkVersion} is 16 or higher.

--> + targetSdkVersion} is 16 or higher.

+

Protection level: dangerous + --> values are set to 15 or lower, the system implicitly grants your app this permission. If you don't need this permission, be sure your {@code - targetSdkVersion} is 16 or higher.

--> + targetSdkVersion} is 16 or higher.

+

Protection level: dangerous + --> - + - + + abort the call altogether. +

Protection level: dangerous + --> - + manifest element for all camera features. If you do not require all camera features or can properly operate if a camera is not available, then you must modify your manifest as appropriate in order to - install on devices that don't support all camera features.

--> + install on devices that don't support all camera features.

+

Protection level: dangerous + --> + measure what is happening inside his/her body, such as heart rate. +

Protection level: dangerous --> - + - + - + - + @@ -792,7 +846,9 @@ - + - + @@ -825,25 +884,33 @@ - + - + - + - + - + - + - + - + @@ -978,32 +1053,42 @@ - + - + - + + from dimming. +

Protection level: normal + --> - + - + - + @@ -1146,7 +1235,9 @@ android:protectionLevel="system|signature" /> + to ensure that only the system can bind to it. +

Protection level: system|signature + --> @@ -1160,7 +1251,9 @@ android:protectionLevel="system|signature" /> + to ensure that only the system can bind to it. +

Protection level: system|signature + --> @@ -1185,7 +1278,9 @@ android:protectionLevel="signature|system" /> + of a document picker. +

Protection level: signature + --> @@ -1194,7 +1289,9 @@ - + - + + {@link android.app.ActivityManager#killBackgroundProcesses}. +

Protection level: normal + --> - + - + - + - + - + - + - + - + - + - + + to the user. +

Protection level: normal + --> + to wait for the next broadcast. +

Protection level: normal + --> - + + applications on the device. +

Protection level: system|signature + --> @@ -1634,9 +1763,11 @@ - +

Not for use by third-party applications. + @hide + --> @@ -1654,15 +1785,19 @@ - +

Not for use by third-party applications. + @hide + --> - +

Not for use by third-party applications. + @hide + --> @@ -1671,10 +1806,12 @@ - +

Not for use by third-party applications. + @hide + --> @@ -1695,10 +1832,12 @@ - +

Not for use by third-party applications. + @hide + --> @@ -1716,9 +1855,11 @@ - +

Not for use by third-party applications. + @hide + --> @@ -1730,28 +1871,38 @@ android:protectionLevel="signature" /> + to ensure that only the system can bind to it. +

Protection level: signature + --> + to ensure that only the system can bind to it. +

Protection level: signature + --> + to ensure that only the system can bind to it. +

Protection level: signature + --> + to ensure that only the system can bind to it. +

Protection level: signature + --> + the system can bind to it. +

Protection level: signature + --> @@ -1761,22 +1912,30 @@ android:protectionLevel="signature" /> + to ensure that only the system can bind to it. +

Protection level: signature + --> + to ensure that only the system can bind to it. +

Protection level: signature + --> + to ensure that only the system can bind to it. +

Protection level: system|signature + --> + to ensure that only the system can bind to it. +

Protection level: signature + --> @@ -1793,7 +1952,9 @@ android:protectionLevel="signature" /> + to ensure that only the system can bind to it. +

Protection level: signature + --> @@ -1810,7 +1971,9 @@ android:protectionLevel="signature" /> + system can interact with it. +

Protection level: signature + --> @@ -1820,14 +1983,18 @@ - +

Not for use by third-party applications. + @hide + --> - + @@ -1845,7 +2012,9 @@ + order to use {@link android.content.Intent#ACTION_INSTALL_PACKAGE}. +

Protection level: normal + --> - + @@ -1890,8 +2061,10 @@ - + @@ -1957,8 +2130,10 @@ - + @@ -1967,9 +2142,11 @@ - - Not for use by third-party applications. + @hide + --> + +

Not for use by third-party applications. + --> +

Not for use by third-party applications. + --> +

Not for use by third-party applications. + --> +

Not for use by third-party applications. + --> @@ -2242,7 +2423,9 @@ - + + to ensure that only the system can bind to it. +

Protection level: signature + --> + only the system can bind to it. +

Protection level: signature + --> @@ -2304,7 +2491,9 @@ android:protectionLevel="signature" /> + to ensure that only the system can bind to it. +

Protection level: signature + --> @@ -2359,7 +2548,9 @@ + their services that only the system is allowed to bind to. +

Protection level: system|signature + -->