From b94df620959de658990c1ed1263e2e1c42df7f6b Mon Sep 17 00:00:00 2001 From: Scott Main Date: Thu, 2 Dec 2010 15:43:02 -0800 Subject: [PATCH] cherrypick Change-Id: I653e91a47979b24e7ecfcbce013c4ffaaa3c55ee docs: edit manifest samples to indicate element is always last Change-Id: I993d130c26efd87147913d5607a2e7f15bd12fe8 --- docs/html/guide/appendix/api-levels.jd | 1 - docs/html/guide/developing/eclipse-adt.jd | 2 -- docs/html/guide/developing/other-ide.jd | 2 -- docs/html/guide/practices/screens_support.jd | 2 +- docs/html/guide/publishing/licensing.jd | 1 - docs/html/guide/topics/data/backup.jd | 1 + docs/html/guide/topics/manifest/manifest-intro.jd | 4 +--- .../guide/topics/manifest/permission-tree-element.jd | 2 +- .../guide/topics/manifest/uses-feature-element.jd | 12 ++++-------- docs/html/guide/topics/security/security.jd | 6 ++---- .../resources/tutorials/testing/activity_test.jd | 8 ++++---- docs/html/sdk/ndk/overview.jd | 2 -- 12 files changed, 14 insertions(+), 29 deletions(-) diff --git a/docs/html/guide/appendix/api-levels.jd b/docs/html/guide/appendix/api-levels.jd index 50e51498f5451..5898fe5b675b2 100644 --- a/docs/html/guide/appendix/api-levels.jd +++ b/docs/html/guide/appendix/api-levels.jd @@ -160,7 +160,6 @@ documentation for more information about how the system handles this attribute.< element might look like this:

<manifest>
-  ...
   <uses-sdk android:minSdkVersion="5" />
   ...
 </manifest>
diff --git a/docs/html/guide/developing/eclipse-adt.jd b/docs/html/guide/developing/eclipse-adt.jd index 1594159d8fecf..e8d2416bf2d75 100644 --- a/docs/html/guide/developing/eclipse-adt.jd +++ b/docs/html/guide/developing/eclipse-adt.jd @@ -541,7 +541,6 @@ example library project declares the Activity GameActivity:

<activity android:name="GameActivity" /> ... </application> - ... </manifest> @@ -611,7 +610,6 @@ like this:

<activity android:name="com.example.android.tictactoe.library.GameActivity" /> ... </application> - ... </manifest>

For more information about the manifest file, see the documentation for GameActivity:

<activity android:name="GameActivity" /> ... </application> - ... </manifest>

Updating a library project

@@ -796,7 +795,6 @@ like this:

<activity android:name="com.example.android.tictactoe.library.GameActivity" /> ... </application> - ... </manifest>

For more information about the manifest file, see the documentation for

 <manifest xmlns:android="http://schemas.android.com/apk/res/android">
-    ...
     <supports-screens
         android:smallScreens="true"
         android:normalScreens="true"
         android:largeScreens="true"
         android:xlargeScreens="true"
         android:anyDensity="true" />
+    ...
 </manifest>
 
diff --git a/docs/html/guide/publishing/licensing.jd b/docs/html/guide/publishing/licensing.jd index fc83ec03d5739..40439f0c382e2 100644 --- a/docs/html/guide/publishing/licensing.jd +++ b/docs/html/guide/publishing/licensing.jd @@ -784,7 +784,6 @@ android:name="com.android.vending.CHECK_LICENSE">

<?xml version="1.0" encoding="utf-8"?>
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" ...">
-    ...
     <!-- Devices >= 3 have version of Android Market that supports licensing. -->
     <uses-sdk android:minSdkVersion="3" />
     <!-- Required permission to check licensing. -->
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd
index 623ee22dc79a6..7661a0e5f7282 100644
--- a/docs/html/guide/topics/data/backup.jd
+++ b/docs/html/guide/topics/data/backup.jd
@@ -166,6 +166,7 @@ href="{@docRoot}guide/topics/manifest/application-element.html">{@code
 
 
 <manifest ... >
+    ...
     <application android:label="MyApplication"
                  android:backupAgent="MyBackupAgent">
         <activity ... >
diff --git a/docs/html/guide/topics/manifest/manifest-intro.jd b/docs/html/guide/topics/manifest/manifest-intro.jd
index efbfa5a9ae772..d7a3e3ef6a7b2 100644
--- a/docs/html/guide/topics/manifest/manifest-intro.jd
+++ b/docs/html/guide/topics/manifest/manifest-intro.jd
@@ -441,6 +441,7 @@ element.  For example, an activity could be protected as follows:
 
 <manifest . . . >
     <permission android:name="com.example.project.DEBIT_ACCT" . . . />
+    <uses-permission android:name="com.example.project.DEBIT_ACCT" />
     . . .
     <application . . .>
         <activity android:name="com.example.project.FreneticActivity"
@@ -449,9 +450,6 @@ element.  For example, an activity could be protected as follows:
             . . .
         </activity>
     </application>
-    . . .
-    <uses-permission android:name="com.example.project.DEBIT_ACCT" />
-    . . .
 </manifest>
 
diff --git a/docs/html/guide/topics/manifest/permission-tree-element.jd b/docs/html/guide/topics/manifest/permission-tree-element.jd index aecc9307460ef..6d6cd0a1bfddf 100644 --- a/docs/html/guide/topics/manifest/permission-tree-element.jd +++ b/docs/html/guide/topics/manifest/permission-tree-element.jd @@ -42,7 +42,7 @@ when the application is ready to be published, it should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. -
{@code android:name}
+
{@code android:name}
The name that's at the base of the permission tree. It serves as a prefix to all permission names in the tree. Java-style scoping should be used to ensure that the name is unique. The name must have more than diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd index 6652affcc9d8b..2e43c3069f99d 100644 --- a/docs/html/guide/topics/manifest/uses-feature-element.jd +++ b/docs/html/guide/topics/manifest/uses-feature-element.jd @@ -403,10 +403,9 @@ declares a Bluetooth permission, but does not declare the Bluetooth feature in a
<manifest ...>
-...
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
     <uses-sdk android:minSdkVersion="3" />
-...
+    ...
 </manifest>
@@ -418,10 +417,9 @@ including devices running older versions of the platform.
<manifest ...>
-...
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
     <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
-...
+    ...
 </manifest>
@@ -430,11 +428,10 @@ including devices running older versions of the platform.
<manifest ...>
-...
     <uses-feature android:name="android.hardware.bluetooth" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
     <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
-...
+    ...
 </manifest>
@@ -445,11 +442,10 @@ feature support, for all devices.
<manifest ...>
-...
     <uses-feature android:name="android.hardware.bluetooth" android:required="false" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
     <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
-...
+    ...
 </manifest>
diff --git a/docs/html/guide/topics/security/security.jd b/docs/html/guide/topics/security/security.jd index de0c6e57cc507..2e31940fdc29d 100644 --- a/docs/html/guide/topics/security/security.jd +++ b/docs/html/guide/topics/security/security.jd @@ -120,9 +120,8 @@ specify:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.app.myapp" >
-
     <uses-permission android:name="android.permission.RECEIVE_SMS" />
-
+    ...
 </manifest>

At application install time, permissions requested by the application are @@ -175,13 +174,12 @@ of its activities could declare a permission for this operation as follows:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.me.app.myapp" >
-
     <permission android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY"
         android:label="@string/permlab_deadlyActivity"
         android:description="@string/permdesc_deadlyActivity"
         android:permissionGroup="android.permission-group.COST_MONEY"
         android:protectionLevel="dangerous" />
-
+    ...
 </manifest>

The {@link android.R.styleable#AndroidManifestPermission_protectionLevel diff --git a/docs/html/resources/tutorials/testing/activity_test.jd b/docs/html/resources/tutorials/testing/activity_test.jd index 87dd183130618..ec878d21428ed 100644 --- a/docs/html/resources/tutorials/testing/activity_test.jd +++ b/docs/html/resources/tutorials/testing/activity_test.jd @@ -368,14 +368,14 @@ page.title=Activity Testing package="com.android.example.spinner.test" android:versionCode="1" android:versionName="1.0"> - <application android:icon="@drawable/icon" android:label="@string/app_name"> - - <uses-library android:name="android.test.runner" /> - </application> <uses-sdk android:minSdkVersion="3" /> <instrumentation android:targetPackage="com.android.example.spinner" android:name="android.test.InstrumentationTestRunner" /> + <application android:icon="@drawable/icon" android:label="@string/app_name"> + <uses-library android:name="android.test.runner" /> + ... + </application> </manifest>

diff --git a/docs/html/sdk/ndk/overview.jd b/docs/html/sdk/ndk/overview.jd index f6d148a85fab9..56b92012a5be1 100644 --- a/docs/html/sdk/ndk/overview.jd +++ b/docs/html/sdk/ndk/overview.jd @@ -489,7 +489,6 @@ adb install bin/NativeActivity-debug.apk android:minSdkVersion attribute value of "3" or higher. For example:

 <manifest>
-  ...
   <uses-sdk android:minSdkVersion="3" />
   ...
 </manifest>
@@ -540,7 +539,6 @@ adb install bin/NativeActivity-debug.apk
     to users whose devices are capable of supporting your application. For example:
       
 <manifest>
-  ... 
 
   <uses-feature android:glEsVersion="0x00020000" />