/*
 * 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 perfetto.protos;

// Data source that lists details (such as version code) about users on an
// Android device.
message AndroidUserListConfig {
  // An allowlist of user type strings, used to control the granularity of
  // user type information emitted in the trace. Exact, case-sensitive string
  // matching is used.
  //
  // Any user type read from the device that is NOT present in the
  // effective allowlist will have its type reported as
  // "android.os.usertype.FILTERED".
  //
  // The effective allowlist is determined as follows:
  //
  // 1. If this 'user_type_filter' field is provided and non-empty:
  //    This list itself is the effective allowlist.
  //    Example TraceConfig:
  //    --------------------
  //    data_sources {
  //        config {
  //            name: "android.user_list"
  //            target_buffer: 0
  //            user_list_config {
  //              # Only report these specific types, others become FILTERED.
  //              user_type_filter: "android.os.usertype.full.SYSTEM"
  //              user_type_filter: "android.os.usertype.system.HEADLESS"
  //            }
  //        }
  //    }
  //
  //
  // Note: This field does not support regular expressions.
  repeated string user_type_filter = 1;
}
