/*
 * Copyright (C) 2025 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.
 */

syntax = "proto2";

package android.os.statsd.ambientcue;

import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/atoms.proto";

option java_package = "com.android.os.ambientcue";
option java_multiple_files = true;

extend Atom {
  optional AmbientCueEventReported ambient_cue_event_reported = 1119
      [(module) = "framework"];
}

/**
 * Logs when the Cue Bar request is fulfilled/skipped..
 */
message AmbientCueEventReported {
  // Cue bar display duration(from display to dismiss) in milliseconds.
  optional int64 display_duration_millis = 1;

  // Cue bar fulfilled with ma intent duration in milliseconds.
  optional int64 fulfilled_with_ma_intent_millis = 2;

  // Cue bar fulfilled with mr intent duration in milliseconds.
  optional int64 fulfilled_with_mr_intent_millis = 3;

  // Cue bar lost focus duration in milliseconds.
  optional int64 lose_focus_millis = 4;

  // The number of ma generated.
  optional int32 ma_count = 5;

  // The number of mr generated.
  optional int32 mr_count = 6;

  // Ma is fulfilled the user's intent.
  optional bool fulfilled_with_ma_intent = 7;

  // Mr is fulfilled the user's intent.
  optional bool fulfilled_with_mr_intent = 8;

  // Clicked the cue bar close button.
  optional bool clicked_close_button = 9;

  // The cue bar reached the timeout.
  optional bool reached_timeout = 10;

  // The uid of the target app.
  optional int32 uid = 11 [(is_uid) = true];
}
