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

Commit 1710da2a authored by Josh Gao's avatar Josh Gao Committed by Automerger Merge Worker
Browse files

Merge changes from topic "adbd_auth_dump" into rvc-dev am: f4facf26

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11992394

Change-Id: I73644cc91a48a1b7a61d450728afe940977f0689
parents 2ebd1390 f4facf26
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -549,7 +549,12 @@ void adbd_auth_notify_disconnect(AdbdAuthContext* ctx, uint64_t id) {

void adbd_auth_prompt_user(AdbdAuthContext* ctx, const char* public_key, size_t len,
                           void* opaque) {
    ctx->PromptUser(std::string_view(public_key, len), opaque);
    adbd_auth_prompt_user_with_id(ctx, public_key, len, opaque);
}

uint64_t adbd_auth_prompt_user_with_id(AdbdAuthContext* ctx, const char* public_key, size_t len,
                                       void* opaque) {
    return ctx->PromptUser(std::string_view(public_key, len), opaque);
}

uint64_t adbd_auth_tls_device_connected(AdbdAuthContext* ctx,
+17 −3
Original line number Diff line number Diff line
@@ -122,9 +122,23 @@ void adbd_auth_notify_disconnect(AdbdAuthContext* ctx,
 * @param len the length of the public_key argument
 * @param arg an opaque userdata argument
 */
void adbd_auth_prompt_user(AdbdAuthContext* ctx,
                           const char* public_key,
                           size_t len, void* opaque) __INTRODUCED_IN(30);
void adbd_auth_prompt_user(AdbdAuthContext* ctx, const char* public_key, size_t len, void* opaque)
        __INTRODUCED_IN(30);

/**
 * Prompt the user to authorize a public key.
 *
 * When this happens, a callback will be run on the auth thread with the result.
 *
 * @param ctx the AdbdAuthContext
 * @param public_key the RSA public key to prompt user with
 * @param len the length of the public_key argument
 * @param arg an opaque userdata argument
 * @return a unique id which will be returned via callback
 */
__attribute__((weak)) uint64_t adbd_auth_prompt_user_with_id(AdbdAuthContext* ctx,
                                                             const char* public_key, size_t len,
                                                             void* opaque) __INTRODUCED_IN(30);

/**
 * Let system_server know that a TLS device has connected.
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ LIBADBD_AUTH {
    adbd_auth_notify_auth; # apex introduced=30
    adbd_auth_notify_disconnect; # apex introduced=30
    adbd_auth_prompt_user; # apex introduced=30
    adbd_auth_prompt_user_with_id; # apex introduced=30
    adbd_auth_tls_device_connected; # apex introduced=30
    adbd_auth_tls_device_disconnected; # apex introduced=30
    adbd_auth_get_max_version; # apex introduced=30