1page.title=<permission-tree> 2@jd:body 3 4<dl class="xml"> 5<dt>syntax:</dt> 6<dd><pre class="stx"><permission-tree android:<a href="#icon">icon</a>="<i>drawable resource</i>" 7 android:<a href="#label">label</a>="<i>string resource</i>" ] 8 android:<a href="#nm">name</a>="<i>string</i>" /></pre></dd> 9 10<dt>contained in:</dt> 11<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code></dd> 12 13<dt>description:</dt> 14<dd>Declares the base name for a tree of permissions. The application takes 15ownership of all names within the tree. It can dynamically add new permissions 16to the tree by calling <code>{@link android.content.pm.PackageManager#addPermission PackageManager.addPermission()}</code>. Names within the tree are separated by 17periods ('{@code .}'). For example, if the base name is 18{@code com.example.project.taxes}, permissions like the following might be 19added: 20 21<p style="margin-left: 2em">{@code com.example.project.taxes.CALCULATE} 22<br/>{@code com.example.project.taxes.deductions.MAKE_SOME_UP} 23<br/>{@code com.example.project.taxes.deductions.EXAGGERATE}</p> 24 25<p> 26Note that this element does not declare a permission itself, only a 27namespace in which further permissions can be placed. See the 28<code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 29element for information on declaring permissions. 30 31<dt>attributes:</dt> 32<dd><dl class="attr"> 33<dt><a name="icon"></a>{@code android:icon}</dt> 34<dd>An icon representing all the permissions in the tree. This attribute 35must be set as a reference to a drawable resource containing the image 36definition.</dd> 37 38<dt><a name="label"></a>{@code android:label}</dt> 39<dd>A user-readable name for the group. As a convenience, the label can 40be directly set as a raw string for quick and dirty programming. However, 41when the application is ready to be published, it should be set as a 42reference to a string resource, so that it can be localized like other 43strings in the user interface.</dd> 44 45<dt><a name="nm"</a>{@code android:name}</dt> 46<dd>The name that's at the base of the permission tree. It serves as 47a prefix to all permission names in the tree. Java-style scoping should 48be used to ensure that the name is unique. The name must have more than 49two period-separated seqments in its path — for example, 50{@code com.example.base} is OK, but {@code com.example} is not.</dd> 51 52</dl></dd> 53 54<!-- ##api level indication## --> 55<dt>introduced in:</dt> 56<dd>API Level 1</dd> 57 58<dt>see also:</dt> 59<dd><code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 60<br/><code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html"><permission-group></a></code> 61<br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission></a></code> 62</dd> 63 64</dl> 65