# Class ShieldSignal

java.lang.Object
com.codename1.security.shield.ShieldSignal

public final class ShieldSignal extends Object

One runtime self-protection observation, such as "a hooking framework is loaded".

Signals are reports, not verdicts. The device never decides it is compromised and never terminates itself over one of these; it reports what it saw and the attestation service decides whether to keep issuing tokens. That ordering matters for two reasons: a hard local exit is trivially patched out of the binary, and it destroys the telemetry that would have told the developer an attack was happening at all.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ACCESSIBILITY`
  An accessibility service that is not on the allow list is enabled.
  `static final String`
  `DEBUGGER`
  A debugger is attached to the process.
  `static final String`
  `EMULATOR`
  The app is running on an emulator or simulator.
  `static final String`
  `HOOK`
  A dynamic instrumentation or hooking framework is present.
  `static final String`
  `JAILBREAK`
  A jailbroken iOS device.
  `static final String`
  `REPACKAGED`
  The app's signing certificate does not match the one it was built with.
  `static final String`
  `ROOT`
  A rooted Android device.
  `static final String`
  `TAPJACK`
  Another application's window was drawn over this app while it was being touched, which is how a tapjacking attack presents itself.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ShieldSignal(String id, int severity, String detail)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDetail()`
  What was actually observed, for example the offending package or library name.
  `String`
  `getId()`
  A stable identifier such as `HOOK`.
  `int`
  `getSeverity()`
  How strongly this points at an attack, 0 to 100.
  `long`
  `getTimestamp()`
  When the observation was made.
  `String`
  `toString()`
  Returns a string representation of the object.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ROOT

    public static final String ROOT
    A rooted Android device.
    See Also:
      - Constant Field Values

  - ### JAILBREAK

    public static final String JAILBREAK
    A jailbroken iOS device.
    See Also:
      - Constant Field Values

  - ### HOOK

    public static final String HOOK
    A dynamic instrumentation or hooking framework is present.
    See Also:
      - Constant Field Values

  - ### EMULATOR

    public static final String EMULATOR
    The app is running on an emulator or simulator.
    See Also:
      - Constant Field Values

  - ### DEBUGGER

    public static final String DEBUGGER
    A debugger is attached to the process.
    See Also:
      - Constant Field Values

  - ### REPACKAGED

    public static final String REPACKAGED
    The app's signing certificate does not match the one it was built with.
    See Also:
      - Constant Field Values

  - ### ACCESSIBILITY

    public static final String ACCESSIBILITY
    An accessibility service that is not on the allow list is enabled.
    See Also:
      - Constant Field Values

  - ### TAPJACK

    public static final String TAPJACK
    Another application's window was drawn over this app while it was being touched, which is how a tapjacking attack presents itself. Unlike the signals above this describes a moment rather than a property of the device: see `DeviceIntegrity.isScreenObscured()`.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ShieldSignal

    public ShieldSignal(String id, int severity, String detail)

- ## Method Details

  - ### getId

    public String getId()
    A stable identifier such as `HOOK`. Engines may report ids this build predates.

  - ### getSeverity

    public int getSeverity()
    How strongly this points at an attack, 0 to 100. Advisory only -- the service applies the policy, so a low severity here does not mean the service will ignore it.

  - ### getDetail

    public String getDetail()
    What was actually observed, for example the offending package or library name. May be null.

  - ### getTimestamp

    public long getTimestamp()
    When the observation was made.

  - ### toString

    public String toString()
    Description copied from class: `Object`
    Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
    Overrides:
      `toString` in class `Object`