<?xml version="1.0" encoding="utf-8"?>
<!--
    examples/inert-sample/res/xml/device_admin.xml

    INERT TEACHING SAMPLE. The policy set below is EMPTY, on purpose.

    THE POINT OF THIS FILE IS THE CONTRAST. A device-admin declaration is
    only as strong a signal as the policies it requests, and an analyst who
    reports "the sample requests device admin" without reading this file has
    reported half a fact. The children of <uses-policies> are the request.

    What a hostile declaration would list, and what each one buys:

      <wipe-data />            DevicePolicyManager.wipeData(). Ransomware's
                               threat, and the retaliation some samples
                               performed on deactivation. Deprecated for
                               non-device-owner admins on modern releases,
                               so its presence in a new sample is usually
                               copied code rather than a live capability.
      <reset-password />       Set or clear the lock-screen credential.
                               Restricted from API 26 and effectively
                               removed for ordinary admins from API 29.
      <force-lock />           lockNow(). Still works. The mildest of the
                               set, and the one a legitimate MDM most often
                               genuinely needs.
      <expire-password />      Forces periodic credential changes.
      <limit-password />       Sets minimum complexity.
      <watch-login />          onPasswordFailed callbacks — a sample can
                               count failed unlock attempts.
      <disable-camera />       Disables the camera device-wide.
      <encrypted-storage />    Requires storage encryption.

    THE UNINSTALL-RESISTANCE PROPERTY DOES NOT COME FROM ANY OF THESE. It
    comes from being an ACTIVE admin at all: the package manager refuses to
    uninstall a package with an active DeviceAdminReceiver, regardless of
    which policies it requested. So an admin that requests NOTHING — like
    this one — would still resist uninstall if it were ever activated.

    That is a genuinely counter-intuitive fact and it is the reason this file
    is empty rather than populated: an empty policy list is the minimum
    declaration that would still produce the persistence property, which
    makes it the right shape for a teaching sample and the wrong shape for
    anything that could be misused. Nothing in this sample ever sends
    ACTION_ADD_DEVICE_ADMIN, so activation cannot happen without a person
    doing it by hand in Settings on an emulator.

    Detection command on a device or emulator:
        adb shell dumpsys device_policy
    Removal, if you activated it yourself while experimenting:
        Settings > Security > Device admin apps > deactivate, then uninstall
-->
<device-admin xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-policies>
        <!-- Deliberately empty. See the comment above: an empty policy list
             is not a weaker declaration than a full one for the purposes of
             uninstall resistance, and it is the correct choice for a sample
             that must not be usable. -->
    </uses-policies>
</device-admin>
