Skip to content

Commit 1014b9a

Browse files
Scott RoweAndroid (Google) Code Review
authored andcommitted
Merge "docs: remove references to resource browser; point to SDK instead" into klp-modular-docs
2 parents 8252117 + bdb05bd commit 1014b9a

1 file changed

Lines changed: 15 additions & 26 deletions

File tree

docs/html/guide/topics/admin/device-admin.jd

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ page.tags="devicepolicymanager","policy","security"
2828
<li>{@link android.app.admin.DevicePolicyManager}</li>
2929
<li>{@link android.app.admin.DeviceAdminInfo}</li>
3030
</ol>
31-
<h2>Related samples</h2>
32-
<ol>
33-
<li><a
34-
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html">
35-
DeviceAdminSample</a></li>
36-
</ol>
3731
</div>
3832
</div>
3933

@@ -232,18 +226,12 @@ Administration API lets you do the following:</p> <ul>
232226

233227
<h2 id="sample">Sample Application</h2>
234228

235-
<p>The examples used in this document are based on the <a
236-
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html">
237-
Device Administration API
238-
sample</a>, which is included in the SDK samples. For information on downloading and
239-
installing the SDK samples, see <a
240-
href="{@docRoot}resources/samples/get.html">
241-
Getting the Samples</a>. Here is the <a
242-
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html">
243-
complete code</a> for
244-
the sample. </p>
245-
<p>The
246-
sample application offers a demo of device admin features. It presents users
229+
<p>The examples used in this document are based on the Device Administration API
230+
sample, which is included in the SDK samples (available through the
231+
Android SDK Manager) and located on your system as
232+
<code>&lt;sdk_root&gt;/ApiDemos/app/src/main/java/com/example/android/apis/app/DeviceAdminSample.java</code>.</p>
233+
234+
<p>The sample application offers a demo of device admin features. It presents users
247235
with a user interface that lets them enable the device admin application. Once
248236
they've enabled the application, they can use the buttons in the user interface
249237
to do the following:</p>
@@ -676,7 +664,8 @@ mDPM.setMaximumTimeToLock(mDeviceAdminSample, timeMs);
676664
<p>You can also programmatically tell the device to lock immediately:</p>
677665
<pre>
678666
DevicePolicyManager mDPM;
679-
mDPM.lockNow();</pre>
667+
mDPM.lockNow();
668+
</pre>
680669

681670

682671

@@ -692,12 +681,12 @@ wiped after a specific number of failed password attempts.</p>
692681
<pre>
693682
DevicePolicyManager mDPM;
694683
mDPM.wipeData(0);</pre>
695-
<p>The {@link android.app.admin.DevicePolicyManager#wipeData wipeData()} method takes as its parameter a bit mask of
696-
additional options. Currently the value must be 0. </p>
684+
<p>The {@link android.app.admin.DevicePolicyManager#wipeData wipeData()} method takes as its
685+
parameter a bit mask of additional options. Currently the value must be 0. </p>
697686

698687
<h4>Disable camera</h4>
699688
<p>Beginning with Android 4.0, you can disable the camera. Note that this doesn't have to be a permanent disabling. The camera can be enabled/disabled dynamically based on context, time, and so on. </p>
700-
<p>You control whether the camera is disabled by using the
689+
<p>You control whether the camera is disabled by using the
701690
{@link android.app.admin.DevicePolicyManager#setCameraDisabled(android.content.ComponentName, boolean) setCameraDisabled()} method. For example, this snippet sets the camera to be enabled or disabled based on a checkbox setting:</p>
702691

703692
<pre>private CheckBoxPreference mDisableCameraCheckbox;
@@ -708,8 +697,8 @@ mDPM.setCameraDisabled(mDeviceAdminSample, mDisableCameraCheckbox.isChecked());<
708697
</pre>
709698

710699

711-
<h4 id=storage">Storage encryption</h4>
712-
<p>Beginning with Android 3.0, you can use the
700+
<h4 id="storage">Storage encryption</h4>
701+
<p>Beginning with Android 3.0, you can use the
713702
{@link android.app.admin.DevicePolicyManager#setStorageEncryption(android.content.ComponentName,boolean) setStorageEncryption()}
714703
method to set a policy requiring encryption of the storage area, where supported.</p>
715704

@@ -722,5 +711,5 @@ ComponentName mDeviceAdminSample;
722711
mDPM.setStorageEncryption(mDeviceAdminSample, true);
723712
</pre>
724713
<p>
725-
See the <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html"> Device Administration API sample</a> for a complete
726-
example of how to enable storage encryption.</p>
714+
See the Device Administration API sample for a complete example of how to enable storage encryption.
715+
</p>

0 commit comments

Comments
 (0)