Skip to content

Commit d1186cd

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: fix broken links in .jd docs" into ics-mr1
2 parents 62fad76 + cd1b08e commit d1186cd

File tree

27 files changed

+98
-114
lines changed

27 files changed

+98
-114
lines changed

docs/html/guide/appendix/api-levels.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Highlights</a></td></tr>
154154
<td>2</td>
155155
<td>{@link android.os.Build.VERSION_CODES#BASE_1_1}</td><td></td></tr>
156156

157-
<tr><td><a href="{@docRoot}sdk/android-1.0.html">Android 1.0</td>
157+
<tr><td>Android 1.0</td>
158158
<td>1</td>
159159
<td>{@link android.os.Build.VERSION_CODES#BASE}</td>
160160
<td></td></tr>

docs/html/guide/developing/device.jd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,8 @@ located in <strong>Settings > Developer options</strong>).</p>
7979
<a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a> document.</li>
8080
<li>If you're developing on Mac OS X, it just works. Skip this step.</li>
8181

82-
<li>If you're developing on Ubuntu Linux, you need to add a <a
83-
href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html">
84-
<code>udev</code></a>
85-
rules file that contains a USB configuration for each type of device
82+
<li>If you're developing on Ubuntu Linux, you need to add a
83+
<code>udev</code> rules file that contains a USB configuration for each type of device
8684
you want to use for development. In the rules file, each device manufacturer
8785
is identified by a unique vendor ID, as specified by the
8886
<code>ATTR{idVendor}</code> property. For a list of vendor IDs, see <a

docs/html/guide/developing/devices/emulator.jd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ on disk images, use <code>-help-disk-images</code>.</p>
480480
<td>Enable the root shell (as in <code>-shell</code> and specify the QEMU character
481481
device to use for communication with the shell.</td>
482482
<td>&lt;device&gt; must be a QEMU device type. See the documentation for '-serial <em>dev</em>' at
483-
<a href="http://www.nongnu.org/qemu/qemu-doc.html#SEC10">http://www.bellard.org/qemu/qemu-doc.html#SEC10</a>
483+
<a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>
484484
for a list of device types.
485485

486486
<p>Here are some examples: </p>
@@ -619,7 +619,7 @@ scale in direct relationship with &lt;delay&gt; values.</p>
619619
<td>Use this command to emulate an NMEA-compatible GPS unit connected to
620620
an external character device or socket. The format of <code>&lt;device&gt;</code> must be QEMU-specific
621621
serial device specification. See the documentation for 'serial -dev' at
622-
<a href="http://www.bellard.org/qemu/qemu-doc.html#SEC10">http://www.bellard.org/qemu/qemu-doc.html#SEC10</a>.
622+
<a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>.
623623
</td>
624624
</tr>
625625
<tr>
@@ -638,7 +638,7 @@ scale in direct relationship with &lt;delay&gt; values.</p>
638638
<td>Redirect radio mode to the specified character device.</td>
639639
<td>The format of <code>&lt;device&gt;</code> must be QEMU-specific
640640
serial device specification. See the documentation for 'serial -dev' at
641-
<a href="http://www.bellard.org/qemu/qemu-doc.html#SEC10">http://www.bellard.org/qemu/qemu-doc.html#SEC10</a>.
641+
<a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>.
642642
</td>
643643
</tr>
644644
<tr>

docs/html/guide/practices/screens-support-1.5.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ android:targetSdkVersion}</a> set to {@code "4"} or higher, then this document i
4646
default, an application written for Android 1.5 or below that does not set the <a
4747
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
4848
android:targetSdkVersion}</a> set to {@code "4"} or higher runs in <a
49-
href="screen-compat-mode">screen compatibility mode</a> when on a device with a screen larger than
49+
href="screen-compat-mode.html">screen compatibility mode</a> when on a device with a screen larger than
5050
the
5151
<em>normal</em> screen size (basically, the system displays the application in a small window
5252
that is roughly the size of the normal screen size).</p>

docs/html/guide/practices/security.jd

Lines changed: 46 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ applications.</p>
126126
<p>Use of <a
127127
href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_WRITEABLE">
128128
world writable</a> or <a
129-
href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_READABLE
130-
">world readable</a> files for IPC is discouraged because it does not provide
129+
href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_READABLE">world
130+
readable</a> files for IPC is discouraged because it does not provide
131131
the ability to limit data access to particular applications, nor does it
132132
provide any control on data format. As an alternative, you might consider using
133133
a ContentProvider which provides read and write permissions, and can make
@@ -199,10 +199,10 @@ ContentProvider</a></code>.</p>
199199
<p>ContentProviders can also provide more granular access by declaring the <a
200200
href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
201201
grantUriPermissions</a> element and using the <code><a
202-
href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMIS
203-
SION">FLAG_GRANT_READ_URI_PERMISSION</a></code> and <code><a
204-
href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMI
205-
SSION">FLAG_GRANT_WRITE_URI_PERMISSION</a></code> flags in the Intent object
202+
href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION">FLAG_GRANT_READ_URI_PERMISSION</a></code>
203+
and <code><a
204+
href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION">FLAG_GRANT_WRITE_URI_PERMISSION</a></code>
205+
flags in the Intent object
206206
that activates the component. The scope of these permissions can be further
207207
limited by the <code><a
208208
href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
@@ -211,14 +211,9 @@ grant-uri-permission element</a></code>.</p>
211211
<p>When accessing a <code>
212212
<a href="{@docRoot}reference/android/content/ContentProvider.html">
213213
ContentProvider</a></code>, use parameterized query methods such as <code>
214-
<a href="{@docRoot}reference/android/content/ContentProvider.html#query(android.net
215-
.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lan
216-
g.String)">query()</a></code>, <code><a
217-
href="{@docRoot}reference/android/content/ContentProvider.html#update(android.ne
218-
t.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[]
219-
)">update()</a></code>, and <code><a
220-
href="{@docRoot}reference/android/content/ContentProvider.html#delete(android.ne
221-
t.Uri,%20java.lang.String,%20java.lang.String[])">delete()</a></code> to avoid
214+
<a href="{@docRoot}reference/android/content/ContentProvider.html#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String)">query()</a></code>, <code><a
215+
href="{@docRoot}reference/android/content/ContentProvider.html#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])">update()</a></code>, and <code><a
216+
href="{@docRoot}reference/android/content/ContentProvider.html#delete(android.net.Uri,%20java.lang.String,%20java.lang.String[])">delete()</a></code> to avoid
222217
potential <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL
223218
Injection</a> from untrusted data. Note that using parameterized methods is not
224219
sufficient if the <code>selection</code> is built by concatenating user data
@@ -249,8 +244,9 @@ href="{@docRoot}reference/android/R.styleable.html#AndroidManifestActivity">
249244
Activities</a>, and <a
250245
href="{@docRoot}reference/android/R.styleable.html#AndroidManifestService">
251246
Services</a> are all declared in the application manifest. If your IPC mechanism is
252-
not intended for use by other applications, set the android:exported property
253-
to false. This is useful for applications that consist of multiple processes
247+
not intended for use by other applications, set the <a
248+
href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code android:exported}</a>
249+
property to false. This is useful for applications that consist of multiple processes
254250
within the same UID, or if you decide late in development that you do not
255251
actually want to expose functionality as IPC but you don’t want to rewrite
256252
the code.</p>
@@ -276,11 +272,10 @@ activity.</p>
276272

277273
<p>Intents are the preferred mechanism for asynchronous IPC in Android.
278274
Depending on your application requirements, you might use <code><a
279-
href="{@docRoot}reference/android/content/Context.html#sendBroadcast(android.con
280-
tent.Intent)">sendBroadcast()</a></code>, <code><a
281-
href="{@docRoot}reference/android/content/Context.html#sendOrderedBroadcast(andr
282-
oid.content.Intent,%20java.lang.String)">sendOrderedBroadcast()</a></code>, or
283-
direct an intent to a specific application component.</p>
275+
href="{@docRoot}reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast()</a></code>,
276+
<code><a
277+
href="{@docRoot}reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)">sendOrderedBroadcast()</a></code>,
278+
or direct an intent to a specific application component.</p>
284279

285280
<p>Note that ordered broadcasts can be “consumed” by a recipient, so they
286281
may not be delivered to all applications. If you are sending an Intent where
@@ -311,14 +306,13 @@ and/or access controls on a specific binder interface, those controls must be
311306
explicitly added as code in the interface.</p>
312307

313308
<p>If providing an interface that does require access controls, use <code><a
314-
href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(ja
315-
va.lang.String)">checkCallingPermission()</a></code> to verify whether the
309+
href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()</a></code>
310+
to verify whether the
316311
caller of the Binder has a required permission. This is especially important
317312
before accessing a Service on behalf of the caller, as the identify of your
318313
application is passed to other interfaces. If invoking an interface provided
319314
by a Service, the <code><a
320-
href="{@docRoot}reference/android/content/Context.html#bindService(android.conte
321-
nt.Intent,%20android.content.ServiceConnection,%20int)">bindService()</a></code>
315+
href="{@docRoot}reference/android/content/Context.html#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int)">bindService()</a></code>
322316
invocation may fail if you do not have permission to access the given Service.
323317
If calling an interface provided locally by your own application, it may be
324318
useful to use the <code><a
@@ -332,14 +326,14 @@ an intent.</p>
332326

333327
<p>By default, receivers are exported and can be invoked by any other
334328
application. If your <code><a
335-
href={@docRoot}reference/android/content/BroadcastReceiver.html">
329+
href="{@docRoot}reference/android/content/BroadcastReceiver.html">
336330
BroadcastReceivers</a></code> is intended for use by other applications, you
337331
may want to apply security permissions to receivers using the <code><a
338-
href="{@docRoot}reference/android/R.styleable.html#AndroidManifestReceiver">
332+
href="{@docRoot}guide/topics/manifest/receiver-element.html">
339333
&lt;receiver&gt;</a></code> element within the application manifest. This will
340334
prevent applications without appropriate permissions from sending an intent to
341335
the <code><a
342-
href={@docRoot}reference/android/content/BroadcastReceiver.html">
336+
href="{@docRoot}reference/android/content/BroadcastReceiver.html">
343337
BroadcastReceivers</a></code>.</p>
344338

345339
<h3>Using Services</h3>
@@ -349,19 +343,21 @@ use. Each service class must have a corresponding <service> declaration in its
349343
package's AndroidManifest.xml.</p>
350344

351345
<p>By default, Services are exported and can be invoked by any other
352-
application. Services can be protected using the android:permission attribute
346+
application. Services can be protected using the <a
347+
href="{@docRoot}guide/topics/manifest/service-element.html#prmsn">{@code android:permission}</a>
348+
attribute
353349
within the manifest’s <code><a
354-
href="{@docRoot}reference/android/R.styleable.html#AndroidManifestService">
350+
href="{@docRoot}guide/topics/manifest/service-element.html">
355351
&lt;service&gt;</a></code> tag. By doing so, other applications will need to declare
356352
a corresponding <code><a
357-
href="{@docRoot}reference/android/R.styleable.html#AndroidManifestService_permis
358-
sion">&lt;uses-permission&gt;</a></code> element in their own manifest to be
353+
href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a>
354+
</code> element in their own manifest to be
359355
able to start, stop, or bind to the service.</p>
360356

361357
<p>A Service can protect individual IPC calls into it with permissions, by
362358
calling <code><a
363-
href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(ja
364-
va.lang.String)">checkCallingPermission()</a></code>before executing
359+
href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()</a></code>
360+
before executing
365361
the implementation of that call. We generally recommend using the
366362
declarative permissions in the manifest, since those are less prone to
367363
oversight.</p>
@@ -376,9 +372,9 @@ Service to handle IPC, since this modular approach reduces the risk of exposing
376372
functionality that is not intended for use by other applications.</p>
377373

378374
<p>If you do expose an Activity for purposes of IPC, the <code><a
379-
href="{@docRoot}reference/android/R.styleable.html#AndroidManifestActivity_permi
380-
ssion">android:permission</a></code> attribute in the <code><a
381-
href="{@docRoot}reference/android/R.styleable.html#AndroidManifestActivity">
375+
href="{@docRoot}guide/topics/manifest/activity-element.html#prmsn">android:permission</a></code>
376+
attribute in the <code><a
377+
href="{@docRoot}guide/topics/manifest/activity-element.html">
382378
&lt;activity&gt;</a></code> declaration in the application manifest can be used to
383379
restrict access to only those applications which have the stated
384380
permissions.</p>
@@ -432,8 +428,8 @@ rkeley.edu/~afelt/felt_usenixsec2011.pdf</a></p>
432428
<p>Generally, you should strive to create as few permissions as possible while
433429
satisfying your security requirements. Creating a new permission is relatively
434430
uncommon for most applications, since <a
435-
href="{@docRoot}reference/android/Manifest.permission.html">
436-
system-defined permissions</a> cover many situations. Where appropriate,
431+
href="{@docRoot}reference/android/Manifest.permission.html">system-defined
432+
permissions</a> cover many situations. Where appropriate,
437433
perform access checks using existing permissions.</p>
438434

439435
<p>If you must create a new permission, consider whether you can accomplish
@@ -560,31 +556,26 @@ href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code> does
560556
not execute JavaScript so cross-site-scripting is not possible.</p>
561557

562558
<p>Use <code><a
563-
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(jav
564-
a.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> with
559+
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> with
565560
particular care because it allows JavaScript to invoke operations that are
566561
normally reserved for Android applications. Only expose <code><a
567-
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(jav
568-
a.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
562+
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
569563
sources from which all input is trustworthy. If untrusted input is allowed,
570564
untrusted JavaScript may be able to invoke Android methods. In general, we
571565
recommend only exposing <code><a
572-
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(jav
573-
a.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
566+
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
574567
JavaScript that is contained within your application APK.</p>
575568

576569
<p>Do not trust information downloaded over HTTP, use HTTPS instead. Even if
577570
you are connecting only to a single website that you trust or control, HTTP is
578571
subject to <a
579572
href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">MiTM</a> attacks
580573
and interception of data. Sensitive capabilities using <code><a
581-
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(jav
582-
a.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> should
574+
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> should
583575
not ever be exposed to unverified script downloaded over HTTP. Note that even
584576
with the use of HTTPS,
585577
<code><a
586-
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(jav
587-
a.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code>
578+
href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code>
588579
increases the attack surface of your application to include the server
589580
infrastructure and all CAs trusted by the Android-powered device.</p>
590581

@@ -683,8 +674,7 @@ discussed in the Requesting Permissions section.</p>
683674
<p>If a GUID is required, create a large, unique number and store it. Do not
684675
use phone identifiers such as the phone number or IMEI which may be associated
685676
with personal information. This topic is discussed in more detail in the <a
686-
href="http://android-developers.blogspot.com/2011/03/identifying-app-installatio
687-
ns.html">Android Developer Blog</a>.</p>
677+
href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html">Android Developer Blog</a>.</p>
688678

689679
<p>Application developers should be careful writing to on-device logs.
690680
In Android, logs are a shared resource, and are available
@@ -724,9 +714,8 @@ credentials to the wrong application.</p>
724714
<p>If credentials are to be used only by applications that you create, then you
725715
can verify the application which accesses the <code><a
726716
href="{@docRoot}reference/android/accounts/AccountManager.html">
727-
AccountManager</a></code> using <code><a href="<code><a
728-
href="{@docRoot}h/reference/android/content/pm/PackageManager.html#checkSignatur
729-
es(java.lang.String,%20java.lang.String)">checkSignature()</a></code>.
717+
AccountManager</a></code> using <code><a
718+
href="{@docRoot}reference/android/content/pm/PackageManager.html#checkSignatures(java.lang.String,%20java.lang.String)">checkSignature()</a></code>.
730719
Alternatively, if only one application will use the credential, you might use a
731720
<code><a
732721
href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for
@@ -756,15 +745,15 @@ RSA provided in the <code><a
756745
href="{@docRoot}reference/javax/crypto/Cipher.html">Cipher</a></code> class.</p>
757746

758747
<p>Use a secure random number generator (
759-
<a href="http://developer.android.com/reference/java/security/SecureRandom.html">
748+
<a href="{@docRoot}reference/java/security/SecureRandom.html">
760749
<code>SecureRandom</code></a>) to initialize any cryptographic keys (<a
761-
href="http://developer.android.com/reference/javax/crypto/KeyGenerator.html">
750+
href="{@docRoot}reference/javax/crypto/KeyGenerator.html">
762751
<code>KeyGenerator</code></a>). Use of a key that is not generated with a secure random
763752
number generator significantly weakens the strength of the algorithm, and may
764753
allow offline attacks.</p>
765754

766755
<p>If you need to store a key for repeated use, use a mechanism like <code><a
767-
href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that
756+
href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that
768757
provides a mechanism for long term storage and retrieval of cryptographic
769758
keys.</p>
770759

docs/html/guide/practices/tablets-and-handsets.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ href="{@docRoot}guide/topics/ui/actionbar.html#Home">Action Bar</a> developer gu
481481
information in each list item based on the available space. That is, you can create alternative
482482
layouts to be used by the items in your list adapter such that a large screen might display more
483483
detail for each item.</li>
484-
<li>Create <a href="{@docRoot}guide/topics/resources/more-resources.html ">alternative resource
484+
<li>Create <a href="{@docRoot}guide/topics/resources/more-resources.html">alternative resource
485485
files</a> for values such as integers, dimensions, and even booleans. Using size qualifiers for
486486
these resources, you can easily apply different layout sizes, font sizes, or enable/disable features
487487
based on the current screen size.</li>

0 commit comments

Comments
 (0)