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

Commit fc1e7adf authored by Andrew Solovay's avatar Andrew Solovay Committed by Android (Google) Code Review
Browse files

Merge "docs: Update permissions docs for Android M" into mnc-mr-docs

parents e2bd0b99 3bdfcefd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@
      <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></li> <!-- ##api level 4## -->
      <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></li>
      <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></li>
      <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-permission-sdk23-element.html">&lt;uses-permission-sdk23&gt;</a></li>
      <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></li>
    </ul>
  </li><!-- end of the manifest file -->
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ parent.link=manifest-intro.html
<br/><code><a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">&lt;uses-configuration&gt;</a></code>  <!-- ##api level 3## -->
<br/><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code>
<br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code>
<br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-sdk23-element.html">&lt;uses-permission-sdk23&gt;</a></code>
<br/><code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></code></dd>

<p>
+11 −6
Original line number Diff line number Diff line
@@ -44,13 +44,14 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions-feat
<dt>description:</dt>
<dd itemprop="description">Requests a permission that the application must be granted in
order for it to operate correctly. Permissions are granted by the user when the 
application is installed, not while it's running.
application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher).

<p>
For more information on permissions, see the 
<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a></code> 
section in the introduction and the separate
<a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> document.  
<a href="{@docRoot}guide/topics/security/permissions.html">System
Permissions</a> API guide.
A list of permissions defined by the base platform can be found at 
{@link android.Manifest.permission android.Manifest.permission}.

@@ -60,8 +61,10 @@ A list of permissions defined by the base platform can be found at
<dd>The name of the permission.  It can be a permission defined by the 
application with the <code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code> 
element, a permission defined by another application, or one of the 
standard system permissions, such as "{@code android.permission.CAMERA}" 
or "{@code android.permission.READ_CONTACTS}".  As these examples show, 
standard system permissions (such as
{@link android.Manifest.permission#CAMERA "android.permission.CAMERA"}
or {@link android.Manifest.permission#READ_CONTACTS
"android.permission.READ_CONTACTS"}).  As these examples show,
a permission name typically includes the package name as a prefix.</dd>

<dt><a name="maxSdk"></a>{@code android:maxSdkVersion}</dt>
@@ -94,6 +97,8 @@ permission is needed only up to API level 18 with a declaration such as this:
<dd>
<ul>
  <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
  <li><a href="uses-permission-sdk23-element.html"
      ><code>&lt;uses-permission-sdk23&gt;</code></a></li>
  <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
</ul>
</dd>
+92 −0
Original line number Diff line number Diff line
page.title=&lt;uses-permission-sdk23&gt;
page.tags="uses-permission-sdk23","permissions"
parent.title=The AndroidManifest.xml File
parent.link=manifest-intro.html
@jd:body

<dl class="xml">

<dt>syntax:</dt>
<dd><pre class="stx">&lt;uses-permission-sdk23 android:<a href="#nm">name</a>="<i>string</i>"
        android:<a href="#maxSdk">maxSdkVersion</a>="<i>integer</i>" /&gt;</pre></dd>

<dt>Contained in:</dt>
<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>

<dt>
  Description:
</dt>

<dd itemprop="description">
  Specifies that an app wants a particular permission, but <em>only</em> if
  the app is running on a device with SDK version 23 or higher. If the device
  is running SDK version 22 or lower, the app does not have the specified
  permission.

<p>
  This element is useful when you update an app to include a new
  feature that requires an additional permission. If a user updates an app on a
  device that is running SDK version 22 or lower, the system prompts the user
  at install time to grant all new permissions that are declared in that
  update. If a new feature is minor enough, you may prefer to disable
  the feature altogether on those devices, so the user does not have to grant
  additional permissions to update the app. By using the
  <code>&lt;uses-permission-sdk23&gt;</code> element instead of <a href=
  "uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a>,
  you can request the permission <em>only</em> if the app is running on
  platforms that support the runtime permissions model, in which the user
  grants permissions to the app while it is running.
</p>

  <p>
    For more information on permissions, see the <a href=
    "{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a>
    section in the introduction and the separate <a href=
    "{@docRoot}guide/topics/security/permissions.html">System Permissions</a>
    API guide. A list of permissions defined by the base platform is available
    at {@link android.Manifest.permission android.Manifest.permission}.
  </p>
</dd>

<dt>Attributes:</dt>

  <dd>
    <dl class="attr">

      <dt><a name="nm"></a>{@code android:name}</dt>

      <dd>
        The name of the permission. This permission can be defined by the
        app with the <code><a href=
        "{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code>
        element, it can be a permission defined by another app, or it can be one
        of the standard system permissions, such as
        {@link android.Manifest.permission#CAMERA "android.permission.CAMERA"}
        or {@link android.Manifest.permission#READ_CONTACTS
        "android.permission.READ_CONTACTS"}.
      </dd>

      <dt><a name="maxSdk"></a>{@code android:maxSdkVersion}</dt>
      <dd>
        The highest API level at which this permission should be granted to your
        app. If the app is installed on a device with a later API level, the app
        is not granted the permission and cannot use any related functionality.
      </dd>
    </dl>
  </dd>

<!-- ##api level indication## -->
<dt>introduced in:</dt>
<dd>API Level 23</dd>

<dt>see also:</dt>
<dd>
<ul>
  <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
  <li><a href=
    "uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
  <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
</ul>
</dd>

</dl>
+173 −0
Original line number Diff line number Diff line
page.title=Normal Permissions
page.tags=permissions,normal
@jd:body


<div id="qv-wrapper">
<div id="qv">

<!--
<h2>In this document</h2>
<ol>
  <li></li>
</ol>
-->

  <h2>Key classes</h2>
  <ol>
    <li>{@link android.Manifest.permission}</li>
  </ol>

  <h2>See Also</h2>
  <ol>
    <li><a href="{@docRoot}training/permissions/index.html">Working with System
        Permissions</a></li>
  </ol>

<!--
<h2>See also</h2>
<ol>
  <li></li>
</ol>
-->

</div>
</div>

<p>
  Many permissions are designated as {@link
  android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL},
  which indicates that
  there's no great risk to the user's privacy or security in letting apps have
  those permissions. For example, users would reasonably want to know whether
  an app can read their contact information, so users have to grant this
  permission explicitly. By contrast, there's no great risk in allowing an app
  to vibrate the device, so that permission is designated as <em>normal.</em>
</p>

<p>
  If an app declares in its
  manifest that it needs a normal permission, the system automatically grants
  the app
  that permission at install time. The system does not prompt the user
  to grant normal
  permissions, and users cannot revoke these permissions.
</p>

<p>As of API level 23, the following permissions are classified as {@link
    android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}:</p>

<ul>
  <li>{@link android.Manifest.permission#ACCESS_LOCATION_EXTRA_COMMANDS
  ACCESS_LOCATION_EXTRA_COMMANDS}
  </li>

  <li>{@link android.Manifest.permission#ACCESS_NETWORK_STATE
  ACCESS_NETWORK_STATE}
  </li>

  <li>{@link android.Manifest.permission#ACCESS_NOTIFICATION_POLICY
  ACCESS_NOTIFICATION_POLICY}
  </li>

  <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE ACCESS_WIFI_STATE}
  </li>

  <li>{@link android.Manifest.permission#BLUETOOTH BLUETOOTH}
  </li>

  <li>{@link android.Manifest.permission#BLUETOOTH_ADMIN BLUETOOTH_ADMIN}
  </li>

  <li>{@link android.Manifest.permission#BROADCAST_STICKY BROADCAST_STICKY}
  </li>

  <li>{@link android.Manifest.permission#CHANGE_NETWORK_STATE
  CHANGE_NETWORK_STATE}
  </li>

  <li>{@link android.Manifest.permission#CHANGE_WIFI_MULTICAST_STATE
  CHANGE_WIFI_MULTICAST_STATE}
  </li>

  <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE CHANGE_WIFI_STATE}
  </li>

  <li>{@link android.Manifest.permission#DISABLE_KEYGUARD DISABLE_KEYGUARD}
  </li>

  <li>{@link android.Manifest.permission#EXPAND_STATUS_BAR EXPAND_STATUS_BAR}
  </li>

  <li>{@link android.Manifest.permission#FLASHLIGHT FLASHLIGHT}
  </li>

  <li>{@link android.Manifest.permission#GET_PACKAGE_SIZE GET_PACKAGE_SIZE}
  </li>

  <li>{@link android.Manifest.permission#INTERNET INTERNET}
  </li>

  <li>{@link android.Manifest.permission#KILL_BACKGROUND_PROCESSES
  KILL_BACKGROUND_PROCESSES}
  </li>

  <li>{@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS
  MODIFY_AUDIO_SETTINGS}
  </li>

  <li>{@link android.Manifest.permission#NFC NFC}
  </li>

  <li>{@link android.Manifest.permission#READ_SYNC_SETTINGS READ_SYNC_SETTINGS}
  </li>

  <li>{@link android.Manifest.permission#READ_SYNC_STATS READ_SYNC_STATS}
  </li>

  <li>{@link android.Manifest.permission#RECEIVE_BOOT_COMPLETED
  RECEIVE_BOOT_COMPLETED}
  </li>

  <li>{@link android.Manifest.permission#REORDER_TASKS REORDER_TASKS}
  </li>

  <li>{@link android.Manifest.permission#REQUEST_INSTALL_PACKAGES
  REQUEST_INSTALL_PACKAGES}
  </li>

  <li>{@link android.Manifest.permission#SET_TIME_ZONE SET_TIME_ZONE}
  </li>

  <li>{@link android.Manifest.permission#SET_WALLPAPER SET_WALLPAPER}
  </li>

  <li>{@link android.Manifest.permission#SET_WALLPAPER_HINTS
  SET_WALLPAPER_HINTS}
  </li>

  <li>{@link android.Manifest.permission#TRANSMIT_IR TRANSMIT_IR}
  </li>

  <li>{@link android.Manifest.permission#USE_FINGERPRINT USE_FINGERPRINT}
  </li>

  <li>{@link android.Manifest.permission#VIBRATE VIBRATE}
  </li>

  <li>{@link android.Manifest.permission#WAKE_LOCK WAKE_LOCK}
  </li>

  <li>{@link android.Manifest.permission#WRITE_SYNC_SETTINGS
  WRITE_SYNC_SETTINGS}
  </li>

  <li>{@link android.Manifest.permission#SET_ALARM SET_ALARM}
  </li>

  <li>{@link android.Manifest.permission#INSTALL_SHORTCUT INSTALL_SHORTCUT}
  </li>

  <li>{@link android.Manifest.permission#UNINSTALL_SHORTCUT UNINSTALL_SHORTCUT}
  </li>
</ul>
Loading