Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3661ff8 authored by Joe Bolinger's avatar Joe Bolinger
Browse files

Add wake reason to OperationContext.

This additional metadata can optionally be used by the HAL to make optimizations when an operation is started.

Bug: 246363169
Test: N/A (builds)
Change-Id: I493cba04f54d09f976b31a68661a18397af02ce9
parent 6a330bf2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -39,4 +39,5 @@ parcelable OperationContext {
  android.hardware.biometrics.common.OperationReason reason = android.hardware.biometrics.common.OperationReason.UNKNOWN;
  boolean isAod = false;
  boolean isCrypto = false;
  android.hardware.biometrics.common.WakeReason wakeReason = android.hardware.biometrics.common.WakeReason.UNKNOWN;
}
+3 −3
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ package android.hardware.biometrics.common;
/* @hide */
@Backing(type="byte") @VintfStability
enum OperationReason {
  UNKNOWN = 0,
  BIOMETRIC_PROMPT = 1,
  KEYGUARD = 2,
  UNKNOWN,
  BIOMETRIC_PROMPT,
  KEYGUARD,
}
+3 −3
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ package android.hardware.biometrics.common;
/* @hide */
@Backing(type="byte") @VintfStability
enum SensorStrength {
  CONVENIENCE = 0,
  WEAK = 1,
  STRONG = 2,
  CONVENIENCE,
  WEAK,
  STRONG,
}
+48 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.biometrics.common;
/* @hide */
@Backing(type="int") @VintfStability
enum WakeReason {
  UNKNOWN,
  POWER_BUTTON,
  GESTURE,
  WAKE_KEY,
  WAKE_MOTION,
  LID,
  DISPLAY_GROUP_ADDED,
  TAP,
  LIFT,
  BIOMETRIC,
}
+11 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.biometrics.common;

import android.hardware.biometrics.common.OperationReason;
import android.hardware.biometrics.common.WakeReason;

/**
 * Additional context associated with an operation.
@@ -47,4 +48,14 @@ parcelable OperationContext {

    /** Flag indicating that crypto was requested. */
    boolean isCrypto = false;

    /**
     * An associated wake reason for this operation or WakeReason.UNKNOWN if this
     * operation was not associated with a device wake up event.
     *
     * This should be interpreted as a hint to enable optimizations or tracing. The
     * framework may choose to use WakeReason.UNKNOWN at any time based on the device's
     * policy.
     */
    WakeReason wakeReason = WakeReason.UNKNOWN;
}
Loading